doc-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProject Documentation Sync
项目文档同步
Update all project documentation files in one pass by delegating to specialized skills.
通过调用专用技能,一次性更新所有项目文档文件。
Workflow
工作流
1. Analyze codebase → 2. CLAUDE.md + AGENTS.md → 3. README.md → 4. SKILLS.md → 5. CHANGELOG.md → 6. Summary1. Analyze codebase → 2. CLAUDE.md + AGENTS.md → 3. README.md → 4. SKILLS.md → 5. CHANGELOG.md → 6. Summary1. Analyze Codebase
1. 代码库分析
Before updating any docs, gather project state:
bash
undefined在更新任何文档之前,先收集项目状态:
bash
undefinedProject type signals
Project type signals
ls package.json go.mod pyproject.toml Cargo.toml Dockerfile *.tf 2>/dev/null
ls package.json go.mod pyproject.toml Cargo.toml Dockerfile *.tf 2>/dev/null
Current doc state
Current doc state
ls CLAUDE.md AGENTS.md README.md SKILLS.md 2>/dev/null
ls CLAUDE.md AGENTS.md README.md SKILLS.md 2>/dev/null
Recent changes since docs were last updated
Recent changes since docs were last updated
git log --oneline -20
git log --oneline -20
Plugin/skill count if marketplace repo
Plugin/skill count if marketplace repo
ls plugins/ 2>/dev/null | wc -l
undefinedls plugins/ 2>/dev/null | wc -l
undefined2. CLAUDE.md + AGENTS.md
2. CLAUDE.md + AGENTS.md
CRITICAL: Never manually edit the AGENTS.md directory tree. It uses non-breaking spaces () from the command that the Edit tool cannot match. Always use the script — it regenerates the tree from scratch.
\xa0treeRun from the doc-claude-md skill:
validate_docs.py --fixbash
python3 ~/.claude/skills/doc-claude-md/scripts/validate_docs.py --path <project> --fixThis handles:
- Regenerating the directory tree (from command)
tree - Validating CLAUDE.md (pointer file)
- Checking AGENTS.md structure and codebase consistency
- Updating timestamp
last_validated
After the script runs, manually update any non-tree content in AGENTS.md (e.g., skill counts in prose, new naming conventions).
重要提示:永远不要手动编辑AGENTS.md的目录树结构。 它使用了命令生成的非换行空格(),编辑工具无法匹配。请始终使用脚本——它会从头重新生成目录树。
tree\xa0运行doc-claude-md技能中的:
validate_docs.py --fixbash
python3 ~/.claude/skills/doc-claude-md/scripts/validate_docs.py --path <project> --fix该脚本负责:
- 重新生成目录树(基于命令)
tree - 验证CLAUDE.md(指针文件)
- 检查AGENTS.md结构与代码库的一致性
- 更新时间戳
last_validated
脚本运行完成后,手动更新AGENTS.md中的非目录树内容(例如:正文中的技能数量、新的命名规范)。
3. README.md
3. README.md
Delegate to skill:
doc-readmeSkill(skill="doc-readme")This handles:
- Creating or updating README.md
- Syncing with current codebase state (features, structure, install steps)
调用技能:
doc-readmeSkill(skill="doc-readme")该技能负责:
- 创建或更新README.md
- 与当前代码库状态(功能、结构、安装步骤)同步
4. SKILLS.md
4. SKILLS.md
Delegate to skill:
doc-skills-mdSkill(skill="doc-skills-md")This handles:
- Analyzing project to recommend relevant marketplace plugins
- Creating or updating Required/Recommended tables
- Updating plugin counts
Skip this step if the project does not use a plugin marketplace.
调用技能:
doc-skills-mdSkill(skill="doc-skills-md")该技能负责:
- 分析项目,推荐相关的市场插件
- 创建或更新必填/推荐插件表格
- 更新插件数量
如果项目不使用插件市场,请跳过此步骤。
5. CHANGELOG.md
5. CHANGELOG.md
Delegate to skill:
doc-changelogSkill(skill="doc-changelog")This handles:
- Generating changelog entries from git history since last release/tag
- Classifying commits by type (Added, Changed, Fixed, Removed)
- Enriching entries with PR references
- Updating the Unreleased section
Skip this step if the project does not maintain a CHANGELOG.md.
调用技能:
doc-changelogSkill(skill="doc-changelog")该技能负责:
- 基于上次发布/标签之后的git历史生成变更日志条目
- 按类型分类提交(新增、变更、修复、移除)
- 为条目补充PR引用
- 更新「未发布」章节
如果项目不维护CHANGELOG.md,请跳过此步骤。
6. Summary
6. 总结
After all updates, report what changed:
undefined所有更新完成后,报告变更内容:
undefinedDocumentation Updated
Documentation Updated
| File | Action | Changes |
|---|---|---|
| CLAUDE.md | Updated/Created/No change | ... |
| AGENTS.md | Updated/Created/No change | ... |
| README.md | Updated/Created/No change | ... |
| SKILLS.md | Updated/Created/Skipped | ... |
| CHANGELOG.md | Updated/Created/Skipped | ... |
undefined| File | Action | Changes |
|---|---|---|
| CLAUDE.md | Updated/Created/No change | ... |
| AGENTS.md | Updated/Created/No change | ... |
| README.md | Updated/Created/No change | ... |
| SKILLS.md | Updated/Created/Skipped | ... |
| CHANGELOG.md | Updated/Created/Skipped | ... |
undefinedModes
模式
Full Sync (default)
全量同步(默认)
Update all five files. Use for initial setup or after major changes.
"Update all project docs"
更新全部五个文件,适用于初始搭建或重大变更之后。
"Update all project docs"
Selective
选择性更新
Update only specified files. Name them explicitly.
"Update AGENTS.md and README.md"
仅更新指定的文件,需明确指定文件名。
"Update AGENTS.md and README.md"
Validate Only
仅验证模式
Check docs without modifying. Report what's stale.
"Check if project docs are up to date"
For validate-only, read each file and compare against codebase state. Report discrepancies without editing.
仅检查文档状态不做修改,报告过时内容。
"Check if project docs are up to date"
仅验证模式下,会读取每个文件并与代码库状态对比,无需编辑即可报告差异。