fix-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/fix-docs
/fix-docs
Fix the highest priority documentation gap.
修复优先级最高的文档缺口。
What This Does
功能说明
- Invoke to audit documentation
/check-docs - Identify highest priority gap
- Fix that one issue
- Verify the fix
- Report what was done
This is a fixer. It fixes one issue at a time. Run again for next issue. Use for full setup.
/documentation- 调用 审核文档
/check-docs - 识别优先级最高的缺口
- 修复该问题
- 验证修复效果
- 报告处理内容
这是一个修复工具。每次仅修复一个问题。如需处理下一个问题,请再次运行。使用 进行完整设置。
/documentationProcess
处理流程
1. Run Primitive
1. 运行基础工具
Invoke skill to get prioritized findings.
/check-docs调用 技能获取按优先级排序的问题结果。
/check-docs2. Fix Priority Order
2. 修复优先级顺序
Fix in this order:
- P0: Missing README.md, missing .env.example
- P1: README sections, undocumented env vars, architecture
- P2: Stale docs, CONTRIBUTING.md, ADRs
- P3: Polish, extras
按以下顺序修复:
- P0:缺少README.md、缺少.env.example
- P1:README章节缺失、环境变量未文档化、架构文档缺失
- P2:文档过时、缺少CONTRIBUTING.md、ADRs
- P3:文档优化、额外内容
3. Execute Fix
3. 执行修复
Missing README.md (P0):
Generate README with proper structure:
- Project name and tagline
- What it does (one paragraph)
- Quick Start (3 commands max)
- Configuration (env vars)
- Development commands
- License
Delegate to Codex or write directly.
Missing .env.example (P0):
bash
undefined缺少README.md(P0):
生成结构规范的README:
- 项目名称和标语
- 功能介绍(一段文字)
- 快速开始(最多3条命令)
- 配置(环境变量)
- 开发命令
- 许可证
委托Codex生成或直接编写。
缺少.env.example(P0):
bash
undefinedScan for env vars and create .env.example
Scan for env vars and create .env.example
grep -rhoE "process.env.[A-Z_]+" --include=".ts" --include=".tsx" src/ app/ 2>/dev/null |
sort -u | sed 's/process.env.//' |
awk '{print $1"="}' > .env.example
sort -u | sed 's/process.env.//' |
awk '{print $1"="}' > .env.example
**README missing sections (P1):**
Add the missing section with appropriate content.
**Undocumented env vars (P1):**
Add missing vars to .env.example with comments.
**Missing architecture docs (P1):**
Invoke `/cartographer` to generate CODEBASE_MAP.md.
**Stale documentation (P2):**
Review and update outdated content.grep -rhoE "process.env.[A-Z_]+" --include=".ts" --include=".tsx" src/ app/ 2>/dev/null |
sort -u | sed 's/process.env.//' |
awk '{print $1"="}' > .env.example
sort -u | sed 's/process.env.//' |
awk '{print $1"="}' > .env.example
**README章节缺失(P1):**
添加缺失的章节及对应内容。
**环境变量未文档化(P1):**
将缺失的变量添加到.env.example并附上注释。
**缺少架构文档(P1):**
调用 `/cartographer` 生成CODEBASE_MAP.md。
**文档过时(P2):**
审核并更新过时内容。4. Verify
4. 验证
After fix:
bash
undefined修复完成后:
bash
undefinedVerify file exists
Verify file exists
[ -f "README.md" ] && echo "✓ README exists"
[ -f ".env.example" ] && echo "✓ .env.example exists"
[ -f "README.md" ] && echo "✓ README exists"
[ -f ".env.example" ] && echo "✓ .env.example exists"
Verify content
Verify content
grep -q "## Installation" README.md && echo "✓ Has installation"
grep -q "## Quick Start" README.md && echo "✓ Has quick start"
undefinedgrep -q "## Installation" README.md && echo "✓ Has installation"
grep -q "## Quick Start" README.md && echo "✓ Has quick start"
undefined5. Report
5. 报告
Fixed: [P0] Missing README.md
Created README.md with:
- Project description
- Quick start guide
- Environment setup
- Development commands
Next highest priority: [P1] Missing .env.example
Run /fix-docs again to continue.Fixed: [P0] Missing README.md
Created README.md with:
- Project name and tagline
- What it does (one paragraph)
- Quick Start (3 commands max)
- Configuration (env vars)
- Development commands
- License
Next highest priority: [P1] Missing .env.example
Run /fix-docs again to continue.Branching
分支管理
Before making changes:
bash
git checkout -b docs/fix-$(date +%Y%m%d)进行修改前:
bash
git checkout -b docs/fix-$(date +%Y%m%d)Single-Issue Focus
单问题聚焦
This skill fixes one issue at a time. Benefits:
- Small, reviewable changes
- Easy to revert if needed
- Clear commit history
- Predictable behavior
Run repeatedly to work through the backlog.
/fix-docs该技能每次仅修复一个问题。优势包括:
- 改动小,便于审核
- 如需回滚操作简单
- 提交历史清晰
- 行为可预测
重复运行 以处理所有待解决问题。
/fix-docsRelated
相关工具
- - The primitive (audit only)
/check-docs - - Create issues without fixing
/log-doc-issues - - Full documentation workflow
/documentation - - Generate architecture docs
/cartographer
- - 基础工具(仅审核)
/check-docs - - 仅记录问题不修复
/log-doc-issues - - 完整文档工作流
/documentation - - 生成架构文档
/cartographer