docs-create

docs-create is a command for Claude Code from shenjingnan/home-mcp. It costs 5 tokens per session (1,431 once invoked), scanned A, original, MIT.

A command for creating project documentation from a document type and title, using Markdown with embedded code examples where appropriate. It supports tool documentation, development guides, API references, and user manuals.

In plain words
What is it for?
Use it to create documentation in the correct folder, generate a kebab-case filename, update the relevant navigation file, and check the resulting document.
Why use it?
It removes the need to decide file locations, filenames, document sections, and navigation updates by hand.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/shenjingnan/home-mcp/docs-create
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/home-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docs-create

README.md
[![agentmods](https://agentmods.dev/badge/commands/shenjingnan/home-mcp/docs-create.svg)](https://agentmods.dev/commands/shenjingnan/home-mcp/docs-create)
Your own site
<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/docs-create"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/docs-create.svg" alt="Measured on agentmods" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.01431
Opus 5 $0.00003 $0.00715
Sonnet 5 $0.00001 $0.00286
Haiku 4.5 $0.00001 $0.00143

Measured 6d ago against content hash 6be260468e25, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

docs-create scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -o /dev/null -w "%{http_code}" http://localhost:3000
.claude/commands/docs-create.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

$1 $2

我需要在项目中创建一个新的文档。请帮我完成以下任务:

1. 确定文档参数

根据我提供的文档类型 <document-type> 和标题 <document-title>,请:

  • 验证文档类型:确保类型是支持的类型之一
  • 确定文件路径:根据文档类型确定正确的存放位置
  • 生成文件名:基于标题生成合适的文件名(kebab-case格式)

2. 支持的文档类型

mcp-tool - MCP工具文档

  • 路径docs/content/mcp-tools/{filename}.mdx
  • 用途:为新的MCP工具创建完整的使用文档
  • 模板内容
    • 工具介绍
    • 参数定义表格
    • 使用示例(基础和高级)
    • 错误信息表格
    • 返回值格式

dev-guide - 开发指南

  • 路径docs/content/development/{filename}.mdx
  • 用途:开发相关的指南文档
  • 模板内容
    • 背景和目标
    • 实施步骤
    • 代码示例
    • 注意事项

api-doc - API参考文档

  • 路径docs/content/api/{filename}.mdx
  • 用途:API接口参考文档
  • 模板内容
    • 接口概述
    • 请求参数
    • 响应格式
    • 示例代码

user-manual - 用户手册

  • 路径docs/content/guides/{filename}.mdx
  • 用途:用户使用指南
  • 模板内容
    • 使用场景
    • 操作步骤
    • 常见问题
    • 故障排除

3. 文档风格要求

基于项目文档编写经验:

  • 简洁直白:围绕中心内容,避免冗余表述
  • 减少emoji使用:保持专业性,仅在必要情况下使用
  • 结构清晰:使用合适的标题层级和表格
  • 代码示例:提供完整、可运行的代码示例

4. 自动更新导航

创建文档后,请自动更新相应的 _meta.ts 文件:

  • development/_meta.ts:开发指南文档
  • mcp-tools/_meta.ts:MCP工具文档
  • api/_meta.ts:API文档(如目录不存在则创建)
  • guides/_meta.ts:用户指南(如目录不存在则创建)

5. 质量检查与验证

完成文档创建后,请执行以下验证步骤:

5.1 基础质量检查

  1. 语法检查:确保MDX语法正确
  2. 链接检查:验证所有内部链接有效
  3. 拼写检查:运行 pnpm spellcheck
  4. 格式检查:运行 pnpm format 确保代码格式正确
  5. 路径别名检查:确保代码示例使用正确的 @/xxx 格式路径别名
5.1.5 路径别名验证(重要!)

为确保文档中的代码示例遵循项目规范,必须进行路径别名检查:

  1. 使用 path-alias-validator 技能

    skill: path-alias-validator
    
  2. 检查内容

    • 代码示例中的 import 语句
    • 相对路径使用情况
    • 路径别名格式正确性
  3. 自动修复

    • 将相对路径替换为 @/xxx 格式
    • 确保路径映射正确
    • 保留合理的相对路径使用场景

5.2 本地验证(重要!)

为了避免Vercel部署报错,必须在本地验证文档:

  1. 启动文档服务

    nr dev:docs
    
  2. 等待服务启动(约10-15秒)

  3. 检查服务状态

  4. 验证页面访问

    # 测试首页访问
    curl -s -o /dev/null -w "%{http_code}" http://localhost:3000
    
    # 测试新创建的文档页面(根据路径调整)
    curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/docs/[path-to-document]
    

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 163 lines · 0 tokens per session scan A 6be260468e25

Subscribe to this mod's changes

docs-create is a command published in the GitHub repository shenjingnan/home-mcp (21 stars, last pushed 7mo ago), licensed MIT. It adds 5 tokens to every session and 1,431 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.