create-docs

A set of rules for planning, writing, reviewing, and publishing project documentation. It covers documents such as readme files, user guides, API references, architecture notes, and deployment guides.

In plain words
What is it for?
Creating project documentation, API docs, user guides, developer guides, diagrams, navigation, indexes, and maintenance plans.
Why use it?
It gives documentation work a clear process and helps prevent missing information, poor structure, or outdated instructions.

Cursor rule

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 rules/mr-chen-05/rules-2.1-optimized-zh/create-docs
Clone the repo
git clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimized-zh
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,452 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00000 $0.01452
Opus 5 $0.00000 $0.00726
Sonnet 5 $0.00000 $0.00290
Haiku 4.5 $0.00000 $0.00145

Measured 2d ago against content hash 2bb67375527c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-docs scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

项目规则/create-docs.mdc · 221 lines

How it starts

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

📝 Documentation Creation - 文档创建

生成全面、结构化的项目文档。

🚀 Commands - 命令

  • /create-docs - 创建完整文档
  • /api-docs - 生成API文档
  • /user-guide - 创建用户指南
  • /dev-docs - 开发者文档

📋 Process - 文档流程

1. 📊 文档规划 (Documentation Planning)

  • 分析目标受众和使用场景
  • 确定文档结构和内容范围
  • 选择合适的文档工具和格式
  • 转换条件:文档规划完整,结构清晰

2. ✍️ 内容创建 (Content Creation)

  • 编写核心文档内容
  • 添加代码示例和截图
  • 创建图表和流程图
  • 转换条件:内容完整,质量达标

3. 🔍 审查优化 (Review & Optimization)

  • 检查内容准确性和完整性
  • 优化文档结构和可读性
  • 添加导航和索引
  • 转换条件:文档质量优秀,用户友好

4. 🚀 发布维护 (Publish & Maintain)

  • 发布到文档平台
  • 设置自动更新机制
  • 收集用户反馈
  • 转换条件:文档发布成功,维护机制完善

📚 Documentation Types - 文档类型

用户文档 (User Documentation)

  • README - 项目概述和快速开始
  • 用户指南 - 详细使用说明
  • FAQ - 常见问题解答
  • 教程 - 分步骤学习指南

开发者文档 (Developer Documentation)

  • API文档 - 接口规范和示例
  • 架构文档 - 系统设计和结构
  • 贡献指南 - 开发参与规范
  • 部署指南 - 环境配置和部署

技术文档 (Technical Documentation)

  • 设计文档 - 技术方案和决策
  • 测试文档 - 测试策略和用例
  • 运维文档 - 监控和故障处理
  • 变更日志 - 版本更新记录

🛠️ Documentation Tools - 文档工具

静态站点生成器

  • VitePress - Vue生态文档工具
  • Docusaurus - React生态文档平台
  • GitBook - 在线文档协作
  • Notion - 团队知识库

API文档工具

  • Swagger/OpenAPI - REST API文档
  • GraphQL Playground - GraphQL API文档
  • Postman - API测试和文档
  • Insomnia - API设计和测试

图表工具

  • Mermaid - 代码化图表
  • Draw.io - 在线图表编辑
  • PlantUML - UML图表生成
  • Excalidraw - 手绘风格图表

📋 Documentation Template - 文档模板

README模板

# 项目名称

简短的项目描述

## 🚀 快速开始

### 安装
\`\`\`bash
npm install
\`\`\`

### 使用
\`\`\`bash
npm start
\`\`\`

## 📚 文档

- [用户指南](./docs/user-guide.md)
- [API文档](./docs/api.md)
- [开发指南](./docs/development.md)

## 🤝 贡献

请阅读 [贡献指南](./CONTRIBUTING.md)

## 📄 许可证

[MIT](./LICENSE)

API文档模板

# API文档

## 认证

所有API请求需要包含认证头:
\`\`\`
Authorization: Bearer <token>
\`\`\`

## 端点

### GET /api/users

获取用户列表

**参数:**
- `page` (number) - 页码,默认1
- `limit` (number) - 每页数量,默认10

**响应:**
\`\`\`json
{
  "data": [...],
  "total": 100,
  "page": 1
}
\`\`\`

✅ Best Practices - 最佳实践

Read the full file on GitHub · 221 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. 2d ago First seen · 221 lines · 0 tokens per session scan A 2bb67375527c

Subscribe to this mod's changes

create-docs is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized-zh (29 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,452 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.