一键导入
doc-write
Create a new wiki entry in the doctree-mcp knowledge base. Checks for duplicates, generates a scaffold, and writes with validation. Requires WIKI_WRITE=1.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new wiki entry in the doctree-mcp knowledge base. Checks for duplicates, generates a scaffold, and writes with validation. Requires WIKI_WRITE=1.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Audit the doctree-mcp wiki for orphaned pages, stubs, missing frontmatter, and broken links.
Search and retrieve content from the doctree-mcp knowledge base. Use when you need to find information in the indexed markdown docs.
基于 SOC 职业分类
| name | doc-write |
| description | Create a new wiki entry in the doctree-mcp knowledge base. Checks for duplicates, generates a scaffold, and writes with validation. Requires WIKI_WRITE=1. |
| argument-hint | ["topic or title for the new entry"] |
Create a new markdown document in the knowledge base using the doctree-mcp wiki curation tools.
Requires WIKI_WRITE=1 in the MCP server configuration. If the write tools are unavailable, tell the user to add "WIKI_WRITE": "1" to their doctree env config.
Follow these steps in order. Do NOT skip the duplicate check — it prevents content sprawl.
Before writing anything, check if similar content already exists:
find_similar(content: "<the content you plan to write>")
If matches are found with overlap > 0.35 — UPDATE WORKFLOW:
navigate_tree(doc_id, root_node_id) to get the full contentwrite_wiki_entry with the same path and overwrite: true:write_wiki_entry(
path: "<same path as existing file>",
frontmatter: { ... }, ← keep existing frontmatter, update tags if needed
content: "<full merged content>",
overwrite: true
)
If overlap is below 0.35 — proceed to Step 2 (scaffold a new entry).
Get suggestions for path, frontmatter, and structure:
draft_wiki_entry(
topic: "$ARGUMENTS",
raw_content: "<the content to turn into a wiki entry>"
)
Review what comes back:
runbooks/, guides in guides/)Validate the entry without writing to disk:
write_wiki_entry(
path: "<path from step 2, adjusted if needed>",
frontmatter: {
"title": "<title>",
"description": "<one-line summary>",
"type": "<runbook|guide|reference|tutorial|architecture|adr|...>",
"category": "<domain grouping>",
"tags": ["<relevant>", "<terms>"]
},
content: "<full markdown content>",
dry_run: true
)
Check the result for warnings. Fix any issues before proceeding.
Once validation passes, write for real:
write_wiki_entry(
path: "<same path>",
frontmatter: { ... },
content: "<full markdown content>",
dry_run: false
)
Report the resulting doc_id and path to the user.
Always include these fields:
| Field | Required | Notes |
|---|---|---|
title | Yes | Descriptive, avoid generic names like "Introduction" |
description | Yes | One-line summary, used for search ranking |
type | Yes | runbook, guide, reference, tutorial, architecture, adr, procedure, etc. |
tags | Yes | 3-8 relevant terms for discoverability |
category | Recommended | Domain grouping (e.g., auth, deploy, monitoring) |
runbooks/deploy.md auto-infers type: runbook