mdedit-cli 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -13
- package/dist/index.js +248 -93
- package/dist/index.js.map +1 -1
- package/openclaw.json +10 -9
- package/package.json +5 -5
- package/skills/catalog.json +164 -0
- package/skills/find-mdedit-document/cli/SKILL.md +21 -0
- package/skills/find-mdedit-document/mcp/SKILL.md +23 -0
- package/skills/publish-mdedit-document/cli/SKILL.md +20 -0
- package/skills/publish-mdedit-document/mcp/SKILL.md +20 -0
- package/skills/revise-mdedit-document/cli/SKILL.md +19 -0
- package/skills/revise-mdedit-document/mcp/SKILL.md +23 -0
- package/skills/save-mdedit-document/cli/SKILL.md +22 -0
- package/skills/save-mdedit-document/mcp/SKILL.md +21 -0
- package/skill.md +0 -333
package/openclaw.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"display_name": "MDEdit.ai",
|
|
5
5
|
"description": "Manage articles, reviews, suggestions, folders, workspaces, and existing API keys on mdedit.ai from any AI agent. Supports server-authoritative review workflows, markdown editing, and JSON output.",
|
|
6
6
|
"homepage_url": "https://mdedit.ai",
|
|
7
|
-
"docs_url": "https://
|
|
7
|
+
"docs_url": "https://mdedit.ai/docs/cli",
|
|
8
8
|
"auth": {
|
|
9
9
|
"type": "env",
|
|
10
10
|
"env_var": "MDEDIT_API_KEY",
|
|
11
|
-
"instructions": "Set MDEDIT_API_KEY to your mdedit.ai API key. Get one at https://
|
|
11
|
+
"instructions": "Set MDEDIT_API_KEY to your mdedit.ai API key. Get one at https://mdedit.ai/docs/api-keys"
|
|
12
12
|
},
|
|
13
13
|
"setup": {
|
|
14
14
|
"command": "npm install -g mdedit-cli",
|
|
@@ -341,19 +341,20 @@
|
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
"name": "skill_show",
|
|
344
|
-
"description": "Print
|
|
345
|
-
"command": "mdedit skill show",
|
|
346
|
-
"example": "mdedit skill show"
|
|
344
|
+
"description": "Print one canonical mdedit skill variant to stdout",
|
|
345
|
+
"command": "mdedit skill show <skillId> --via <cli|mcp>",
|
|
346
|
+
"example": "mdedit skill show save-mdedit-document --via cli"
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
"name": "skill_install",
|
|
350
|
-
"description": "Install
|
|
350
|
+
"description": "Install canonical mdedit skills into native host skill directories.",
|
|
351
351
|
"command": "mdedit skill install",
|
|
352
352
|
"flags": {
|
|
353
|
-
"--target <claude|cursor|
|
|
354
|
-
"--
|
|
353
|
+
"--target <agents|claude|cursor|gemini>": "Native skill directory target (default: agents)",
|
|
354
|
+
"--via <cli|mcp>": "Choose the CLI-backed or MCP-backed variant (default: cli)",
|
|
355
|
+
"--scope <project|user>": "Install for the current project or the current user (default: project)"
|
|
355
356
|
},
|
|
356
|
-
"example": "mdedit skill install --target
|
|
357
|
+
"example": "mdedit skill install --target cursor --via mcp"
|
|
357
358
|
}
|
|
358
359
|
],
|
|
359
360
|
"workflows": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdedit-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Command-line interface for mdedit.ai.",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"bin",
|
|
33
33
|
"dist",
|
|
34
|
-
"
|
|
34
|
+
"skills",
|
|
35
35
|
"openclaw.json",
|
|
36
36
|
"README.md",
|
|
37
37
|
"LICENSE"
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"dev": "tsx src/index.ts",
|
|
42
42
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
43
|
"test": "yarn build && vitest run",
|
|
44
|
-
"prepack": "yarn build"
|
|
44
|
+
"prepack": "yarn --cwd ../.. check:agent-skills && yarn build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@mdedit/agent-client": "1.0.
|
|
48
|
-
"@mdedit/sdk": "0.3.
|
|
47
|
+
"@mdedit/agent-client": "1.0.4",
|
|
48
|
+
"@mdedit/sdk": "0.3.6",
|
|
49
49
|
"@napi-rs/keyring": "^1.3.0",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"commander": "^14.0.3",
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"evidenceDate": "2026-08-02",
|
|
5
|
+
"product": "mdedit",
|
|
6
|
+
"docsUrl": "https://mdedit.ai/docs/skills",
|
|
7
|
+
"installUrl": "https://mdedit.ai/docs/skills/install",
|
|
8
|
+
"publicInstallationUrl": "https://mdedit.ai",
|
|
9
|
+
"portableCompatibility": "Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit profile or scoped API key.",
|
|
10
|
+
"channels": [
|
|
11
|
+
{
|
|
12
|
+
"id": "portable",
|
|
13
|
+
"name": "Portable Agent Skills",
|
|
14
|
+
"status": "release-candidate",
|
|
15
|
+
"detail": "CLI-backed skills generated for the open Agent Skills format. Public installation begins with mdedit-cli 0.4.0."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "openai",
|
|
19
|
+
"name": "ChatGPT and Codex plugin",
|
|
20
|
+
"status": "release-candidate",
|
|
21
|
+
"detail": "Package and live workflow qualification are complete; directory submission and publication remain human-gated."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "claude-code",
|
|
25
|
+
"name": "Claude Code plugin",
|
|
26
|
+
"status": "release-candidate",
|
|
27
|
+
"detail": "The package validates locally; production OAuth and marketplace publication remain release gates."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "cursor",
|
|
31
|
+
"name": "Cursor plugin",
|
|
32
|
+
"status": "planned",
|
|
33
|
+
"detail": "A generated candidate package exists, but IDE and CLI authentication and upstream acceptance are not yet verified."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "gemini-cli",
|
|
37
|
+
"name": "Gemini CLI extension",
|
|
38
|
+
"status": "planned",
|
|
39
|
+
"detail": "A generated API-key candidate exists; OAuth compatibility and public extension distribution remain unverified."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"skills": [
|
|
43
|
+
{
|
|
44
|
+
"id": "save-mdedit-document",
|
|
45
|
+
"anchor": "save",
|
|
46
|
+
"title": "Save a document",
|
|
47
|
+
"shortDescription": "Create and durably save a private Markdown document in mdedit.",
|
|
48
|
+
"description": "Create and durably save a private Markdown Document in mdedit. Use when the user explicitly asks to save, persist, archive, or turn conversation content into a document in mdedit. Do not use for generic Markdown writing, formatting, or local-file creation that does not require mdedit storage.",
|
|
49
|
+
"examplePrompt": "Save this conversation as a private Markdown document in mdedit.",
|
|
50
|
+
"triggers": [
|
|
51
|
+
"save to mdedit",
|
|
52
|
+
"persist this document",
|
|
53
|
+
"archive this conversation"
|
|
54
|
+
],
|
|
55
|
+
"exclusions": [
|
|
56
|
+
"generic Markdown writing",
|
|
57
|
+
"local file creation",
|
|
58
|
+
"public publishing"
|
|
59
|
+
],
|
|
60
|
+
"scopes": [
|
|
61
|
+
"workspaces:read",
|
|
62
|
+
"articles:write"
|
|
63
|
+
],
|
|
64
|
+
"operations": [
|
|
65
|
+
"Resolve the destination workspace",
|
|
66
|
+
"Create the document once",
|
|
67
|
+
"Verify the durable saved result"
|
|
68
|
+
],
|
|
69
|
+
"success": "Returns the saved title and server- or CLI-returned document identity while keeping the document private.",
|
|
70
|
+
"safety": "Saving never implies permission to publish, and identifiers or URLs are never invented."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "find-mdedit-document",
|
|
74
|
+
"anchor": "find",
|
|
75
|
+
"title": "Find a document",
|
|
76
|
+
"shortDescription": "Find and read an existing Markdown document stored in mdedit.",
|
|
77
|
+
"description": "Find and read an existing Markdown Document stored in mdedit. Use when the user asks to locate, open, retrieve, quote, summarize, or inspect a saved mdedit document. Do not use for local files, web pages, or generic Markdown questions unrelated to mdedit storage.",
|
|
78
|
+
"examplePrompt": "Find my project brief in mdedit and summarize the saved version.",
|
|
79
|
+
"triggers": [
|
|
80
|
+
"find my mdedit document",
|
|
81
|
+
"open a saved document",
|
|
82
|
+
"summarize the stored version"
|
|
83
|
+
],
|
|
84
|
+
"exclusions": [
|
|
85
|
+
"local files",
|
|
86
|
+
"web pages",
|
|
87
|
+
"unsaved conversation content"
|
|
88
|
+
],
|
|
89
|
+
"scopes": [
|
|
90
|
+
"workspaces:read",
|
|
91
|
+
"articles:read"
|
|
92
|
+
],
|
|
93
|
+
"operations": [
|
|
94
|
+
"Resolve the workspace",
|
|
95
|
+
"Match returned document metadata",
|
|
96
|
+
"Read the selected saved content"
|
|
97
|
+
],
|
|
98
|
+
"success": "Answers from returned saved content and clearly distinguishes summaries from exact document text.",
|
|
99
|
+
"safety": "The workflow is read-only and stops when workspace or document matching is ambiguous."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "revise-mdedit-document",
|
|
103
|
+
"anchor": "revise",
|
|
104
|
+
"title": "Revise a document",
|
|
105
|
+
"shortDescription": "Safely revise a saved document with anchored, conflict-aware edits.",
|
|
106
|
+
"description": "Safely revise an existing Markdown Document stored in mdedit with anchored, conflict-aware edits. Use when the user asks to update, rewrite, correct, insert, remove, or reorganize content in a saved mdedit document. Do not use for unsaved local Markdown, local files, or generic editing advice.",
|
|
107
|
+
"examplePrompt": "Revise the introduction in my saved launch brief without overwriting concurrent changes.",
|
|
108
|
+
"triggers": [
|
|
109
|
+
"revise my mdedit document",
|
|
110
|
+
"update a saved section",
|
|
111
|
+
"correct stored content"
|
|
112
|
+
],
|
|
113
|
+
"exclusions": [
|
|
114
|
+
"unsaved local Markdown",
|
|
115
|
+
"generic editing advice",
|
|
116
|
+
"ambiguous overwrite requests"
|
|
117
|
+
],
|
|
118
|
+
"scopes": [
|
|
119
|
+
"workspaces:read",
|
|
120
|
+
"articles:read",
|
|
121
|
+
"articles:write"
|
|
122
|
+
],
|
|
123
|
+
"operations": [
|
|
124
|
+
"Read the current durable content",
|
|
125
|
+
"Apply the smallest anchored edit",
|
|
126
|
+
"Re-read or stop when conflicts occur"
|
|
127
|
+
],
|
|
128
|
+
"success": "Returns the revised durable content or revision information with no unresolved conflicts.",
|
|
129
|
+
"safety": "The skill never overwrites ambiguity and does not retry a conflict without reconciling the user's intent."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "publish-mdedit-document",
|
|
133
|
+
"anchor": "publish",
|
|
134
|
+
"title": "Publish a document",
|
|
135
|
+
"shortDescription": "Inspect or explicitly change a saved document's public link.",
|
|
136
|
+
"description": "Check or change Public Document Publishing for an existing mdedit Markdown Document. Use when the user explicitly asks to publish, unpublish, inspect publication status, or create or update a public mded.it link. Do not use for private editor links, local files, or generic sharing advice.",
|
|
137
|
+
"examplePrompt": "Check my document's publication status, then ask before making it public.",
|
|
138
|
+
"triggers": [
|
|
139
|
+
"publish my mdedit document",
|
|
140
|
+
"get the public link",
|
|
141
|
+
"unpublish this document"
|
|
142
|
+
],
|
|
143
|
+
"exclusions": [
|
|
144
|
+
"private editor sharing",
|
|
145
|
+
"saving or editing alone",
|
|
146
|
+
"generic sharing advice"
|
|
147
|
+
],
|
|
148
|
+
"scopes": [
|
|
149
|
+
"workspaces:read",
|
|
150
|
+
"articles:read",
|
|
151
|
+
"publishing:read",
|
|
152
|
+
"publishing:write"
|
|
153
|
+
],
|
|
154
|
+
"operations": [
|
|
155
|
+
"Resolve the saved document",
|
|
156
|
+
"Inspect current publication status",
|
|
157
|
+
"Confirm before publishing or unpublishing",
|
|
158
|
+
"Return the exact successful result URL"
|
|
159
|
+
],
|
|
160
|
+
"success": "Returns the exact public URL and publication state supplied by a successful mdedit result.",
|
|
161
|
+
"safety": "Public visibility is never inferred from saving or editing, and both publish and unpublish require explicit confirmation."
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: find-mdedit-document
|
|
4
|
+
description: Find and read an existing Markdown Document stored in mdedit. Use when the user asks to locate, open, retrieve, quote, summarize, or inspect a saved mdedit document. Do not use for local files, web pages, or generic Markdown questions unrelated to mdedit storage.
|
|
5
|
+
compatibility: Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit profile or scoped API key.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Find and read a document in mdedit
|
|
9
|
+
|
|
10
|
+
Resolve real saved content before describing it.
|
|
11
|
+
|
|
12
|
+
1. Run `mdedit workspace list --format json` unless a returned workspace ID is already established. Ask the user to choose when several workspaces could match.
|
|
13
|
+
2. Run `mdedit article list --workspace <workspaceId> --full --format json`.
|
|
14
|
+
3. Match only against returned document metadata.
|
|
15
|
+
- Continue when there is one clear match.
|
|
16
|
+
- When several documents plausibly match, present their returned titles and ask the user to choose.
|
|
17
|
+
- When none match, say so and stop.
|
|
18
|
+
4. Run `mdedit article get <articleId> --workspace <workspaceId> --include-content --format json`.
|
|
19
|
+
5. Answer from the returned saved content and revision metadata. Distinguish exact saved text from any summary or interpretation.
|
|
20
|
+
|
|
21
|
+
This workflow is read-only. Do not run create, edit, publish, or unpublish commands. Never infer document content, identifiers, publication state, or URLs from titles or conversation memory.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: find-mdedit-document
|
|
4
|
+
description: Find and read an existing Markdown Document stored in mdedit. Use when the user asks to locate, open, retrieve, quote, summarize, or inspect a saved mdedit document. Do not use for local files, web pages, or generic Markdown questions unrelated to mdedit storage.
|
|
5
|
+
compatibility: Requires the mdedit MCP server with workspace and article read tools.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Find and read a document in mdedit
|
|
9
|
+
|
|
10
|
+
Resolve a real saved document before describing its content.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace with `list_workspaces` unless a `workspaceId` from an earlier mdedit tool result is already established.
|
|
13
|
+
- If several workspaces could match, ask the user to choose by returned name.
|
|
14
|
+
- If no workspace matches, stop without guessing.
|
|
15
|
+
2. Call `list_articles` for the resolved workspace.
|
|
16
|
+
3. Match the user's title or description against returned document metadata.
|
|
17
|
+
- If there is one clear match, continue.
|
|
18
|
+
- If several documents plausibly match, present only their returned titles and ask the user to choose.
|
|
19
|
+
- If there is no match, say so and stop.
|
|
20
|
+
4. Call `read_article` with the returned `workspaceId` and `articleId`.
|
|
21
|
+
5. Answer from the returned saved `content`, `contentRevision`, and `contentHash`. Distinguish exact saved content from any summary or interpretation.
|
|
22
|
+
|
|
23
|
+
This workflow is read-only. Do not call create, edit, publish, or unpublish tools. Never infer document content, identifiers, revisions, publication status, or URLs from titles or conversation memory.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: publish-mdedit-document
|
|
4
|
+
description: Check or change Public Document Publishing for an existing mdedit Markdown Document. Use when the user explicitly asks to publish, unpublish, inspect publication status, or create or update a public mded.it link. Do not use for private editor links, local files, or generic sharing advice.
|
|
5
|
+
compatibility: Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit profile or scoped API key with publishing permissions.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Manage Public Document Publishing
|
|
9
|
+
|
|
10
|
+
Public visibility is a separate, explicit action. Never treat saving or editing as permission to publish.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document from returned CLI results. Ask the user to choose when a match is ambiguous.
|
|
13
|
+
2. Run `mdedit article publish-status <articleId> --workspace <workspaceId> --format json` before proposing a mutation.
|
|
14
|
+
3. For status-only requests, report the returned state and exact returned URL fields, then stop.
|
|
15
|
+
4. Before publishing or updating a public link, warn that anyone with the link can view the document and ask for explicit confirmation.
|
|
16
|
+
5. After confirmation, run `mdedit article publish <articleId> --workspace <workspaceId> --format json`. Add `--snapshot`, `--live`, `--slug`, or SEO metadata only when the user requested or approved it.
|
|
17
|
+
6. Treat publication as successful only when the command returns a public URL and publication identity. Return the exact command-provided URL.
|
|
18
|
+
7. Before disabling a link, identify the returned current link and ask for explicit confirmation. After confirmation, run `mdedit article unpublish <articleId> --workspace <workspaceId> --yes --format json`.
|
|
19
|
+
|
|
20
|
+
Never construct an `mded.it` URL, expose an editor URL as a public link, or claim publication from a requested slug. On denied permission, failure, or missing result fields, report the bounded error and leave visibility unchanged.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: publish-mdedit-document
|
|
4
|
+
description: Check or change Public Document Publishing for an existing mdedit Markdown Document. Use when the user explicitly asks to publish, unpublish, inspect publication status, or create or update a public mded.it link. Do not use for private editor links, local files, or generic sharing advice.
|
|
5
|
+
compatibility: Requires the mdedit MCP server with publishing tools and explicit confirmation fields.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Manage Public Document Publishing
|
|
9
|
+
|
|
10
|
+
Public visibility is a separate, explicit action. Never treat saving or editing as permission to publish.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Ask the user to choose when a returned match is ambiguous.
|
|
13
|
+
2. Call `get_publish_status` before proposing a mutation.
|
|
14
|
+
3. For a status-only request, report only the returned state and exact returned URL fields, then stop without mutating.
|
|
15
|
+
4. Before publishing or updating a public link, warn that anyone with the link can view the document and ask for explicit confirmation. Do not infer confirmation from an earlier save or edit request.
|
|
16
|
+
5. After confirmation, call `publish_article` with `confirmPublic: true`. Include a custom slug or SEO metadata only when the user supplied or approved it.
|
|
17
|
+
6. Treat publication as successful only when the tool returns `publishId`, `shortUrl`, `fullUrl`, and `publishedAt`. Return the exact tool-provided public URL; prefer `shortUrl` for sharing.
|
|
18
|
+
7. Before disabling a public link, identify the current returned link and ask for explicit confirmation. After confirmation, call `unpublish_article` with `confirmUnpublish: true`.
|
|
19
|
+
|
|
20
|
+
Never construct an `mded.it` URL, expose an editor URL as a public link, or claim publication from a requested slug. On denied permission, failure, or missing result fields, report the bounded error and leave visibility unchanged.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: revise-mdedit-document
|
|
4
|
+
description: Safely revise an existing Markdown Document stored in mdedit with anchored, conflict-aware edits. Use when the user asks to update, rewrite, correct, insert, remove, or reorganize content in a saved mdedit document. Do not use for unsaved local Markdown, local files, or generic editing advice.
|
|
5
|
+
compatibility: Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit profile or scoped API key.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Revise a document in mdedit
|
|
9
|
+
|
|
10
|
+
Read the current durable content, then apply the smallest unambiguous anchored change.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document with `mdedit workspace list --format json`, `mdedit article list --workspace <workspaceId> --full --format json`, and `mdedit article get <articleId> --workspace <workspaceId> --include-content --format json`.
|
|
13
|
+
2. Ask a focused question when the target text, section, or replacement is unclear.
|
|
14
|
+
3. For one unique replacement, run `mdedit article edit <articleId> --workspace <workspaceId> --replace <exactText> --with <replacement> --format json`.
|
|
15
|
+
4. For insertions, deletions, contextual anchors, or several edits, write the smallest operation array and run `mdedit article edit <articleId> --workspace <workspaceId> --ops-file <path> --format json`.
|
|
16
|
+
5. Avoid whole-document replacement unless the user explicitly requests a full rewrite.
|
|
17
|
+
6. Treat the edit as successful only when the JSON result has no unresolved conflict. Re-read the saved document before reporting the final revision when the result is ambiguous.
|
|
18
|
+
|
|
19
|
+
If the command reports a conflict, stop, run `article get` again, and explain what changed concurrently. Do not retry against new content until the user's intent has been reconciled. Never invent anchors or claim success from requested text alone.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: revise-mdedit-document
|
|
4
|
+
description: Safely revise an existing Markdown Document stored in mdedit with anchored, conflict-aware edits. Use when the user asks to update, rewrite, correct, insert, remove, or reorganize content in a saved mdedit document. Do not use for unsaved local Markdown, local files, or generic editing advice.
|
|
5
|
+
compatibility: Requires the mdedit MCP server with read_article and edit_article tools.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Revise a document in mdedit
|
|
9
|
+
|
|
10
|
+
Read the current durable content, then apply the smallest unambiguous anchored change.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Ask the user to choose when a returned workspace or document match is ambiguous.
|
|
13
|
+
2. Confirm the requested change is specific enough to apply. Ask a focused question when the target text, section, or replacement is unclear.
|
|
14
|
+
3. Build one or more `edit_article` operations:
|
|
15
|
+
- Prefer a unique `quote` anchor with nearby `context`.
|
|
16
|
+
- Use `afterHeading`, `beforeHeading`, or `inSection` for section changes.
|
|
17
|
+
- Use a numeric range only when it came from current tool-returned content.
|
|
18
|
+
- Avoid whole-document replacement unless the user requests a full rewrite.
|
|
19
|
+
4. Pass the current `contentHash` from `read_article` as `ifContentHash`.
|
|
20
|
+
5. Treat the edit as successful only when the result has no conflicts and returns new durable `content`, `contentRevision`, and `contentHash`.
|
|
21
|
+
6. Summarize what changed and report the returned revision.
|
|
22
|
+
|
|
23
|
+
If the tool reports a hash mismatch or any conflict, stop, read the document again, and explain what changed concurrently. Do not retry against a new version without reconciling the user's intent. Never overwrite ambiguity, invent anchors, or claim success from requested text alone.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: save-mdedit-document
|
|
4
|
+
description: Create and durably save a private Markdown Document in mdedit. Use when the user explicitly asks to save, persist, archive, or turn conversation content into a document in mdedit. Do not use for generic Markdown writing, formatting, or local-file creation that does not require mdedit storage.
|
|
5
|
+
compatibility: Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit profile or scoped API key.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Save a document to mdedit
|
|
9
|
+
|
|
10
|
+
Create one durable private document from content the user supplied or asked you to draft.
|
|
11
|
+
|
|
12
|
+
1. Determine the intended title and complete Markdown content. Ask a focused question if the source material or document boundary is unclear.
|
|
13
|
+
2. Run `mdedit workspace list --format json` unless a returned workspace ID is already established.
|
|
14
|
+
- If exactly one workspace is returned, use it.
|
|
15
|
+
- If several could match, ask the user to choose by returned name.
|
|
16
|
+
- If none match, stop without guessing.
|
|
17
|
+
3. Save the content once with `mdedit article create --workspace <workspaceId> --title <title> --file <path> --format json`. Use `--content` only for short content that is safe to pass as one argument.
|
|
18
|
+
4. Do not pass `--publish`, `--live`, `--snapshot`, or public-link metadata.
|
|
19
|
+
5. Read the created document with `mdedit article get <articleId> --workspace <workspaceId> --include-content --format json` and verify that the returned durable content matches the intended document.
|
|
20
|
+
6. Report the saved title and returned document identity. State that the document remains private.
|
|
21
|
+
|
|
22
|
+
Never invent workspace IDs, article IDs, revisions, hashes, or URLs. If creation or content persistence fails, report the bounded error and do not claim the document was saved.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: save-mdedit-document
|
|
4
|
+
description: Create and durably save a private Markdown Document in mdedit. Use when the user explicitly asks to save, persist, archive, or turn conversation content into a document in mdedit. Do not use for generic Markdown writing, formatting, or local-file creation that does not require mdedit storage.
|
|
5
|
+
compatibility: Requires the mdedit MCP server with list_workspaces and create_article tools.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Save a document to mdedit
|
|
9
|
+
|
|
10
|
+
Create one durable private document from content the user supplied or asked you to draft.
|
|
11
|
+
|
|
12
|
+
1. Determine the intended title and Markdown content. Ask a focused question if the source material or document boundary is unclear.
|
|
13
|
+
2. Resolve the destination workspace:
|
|
14
|
+
- Use an established `workspaceId` only when it came from an earlier mdedit tool result.
|
|
15
|
+
- Otherwise call `list_workspaces`.
|
|
16
|
+
- If exactly one workspace is returned, use it. If several are returned, ask the user which returned workspace name to use. If none are returned, stop.
|
|
17
|
+
3. Call `create_article` once with the returned `workspaceId`, title, complete Markdown content, and `collaborative: false` unless the user explicitly asks for live collaboration.
|
|
18
|
+
4. Treat the save as successful only when the tool returns `workspaceId`, `articleId`, `contentRevision`, `contentHash`, and `editorUrl`.
|
|
19
|
+
5. Report the saved title and exact returned `editorUrl`. State that the document remains private.
|
|
20
|
+
|
|
21
|
+
Never invent or reconstruct a workspace ID, document ID, revision, hash, or editor URL. Never call a publishing tool as part of this workflow. If creation fails or reports retained partial state, report that bounded failure and do not claim the document was saved.
|