一键导入
readme-sync
Automatically synchronize README.md with actual project components. Scans .claude directory and updates Agents, Skills, Hooks, Commands sections.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automatically synchronize README.md with actual project components. Scans .claude directory and updates Agents, Skills, Hooks, Commands sections.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Synchronize all agile development artifacts in one command. Updates CHANGELOG, README stats, progress tracking, and validates documentation completeness.
Optimize context loading for efficient token usage. Use when working with large codebases, context limits, or when the user mentions "context", "token", "optimize", "summarize", or asks to reduce context size.
cc-initializer 자동 복구 및 문제 해결. Hook 실패, 문서 손상, 설정 오류를 진단하고 수정합니다.
Complete sprint lifecycle management. Start sprints, track velocity, generate burndown charts, and automate retrospectives.
Phase, Sprint, 문서 간 동기화 문제 해결. 불일치 감지 및 자동 수정.
cc-initializer 설정 및 구성 검증. settings.json, hooks, agents, skills, documents 무결성 확인.
| name | readme-sync |
| description | Automatically synchronize README.md with actual project components. Scans .claude directory and updates Agents, Skills, Hooks, Commands sections. |
Automatically keeps README.md synchronized with actual project components. Scans the .claude directory structure and updates documentation to match reality.
/readme-sync [--section <name>] [--validate] [--dry-run]
| Option | Description |
|---|---|
--section <name> | Sync specific section: agents, skills, hooks, commands, stats |
--validate | Check for mismatches without making changes |
--dry-run | Show what would change without actually changing |
| (default) | Sync all sections |
Scans .claude/agents/*.md and updates:
name, descriptionScans .claude/skills/*/SKILL.md and .claude/skills/*.md:
Scans .claude/hooks/*.sh and .claude/hooks/*.md:
Scans .claude/commands/*.md and .claude/commands/*/:
Updates summary statistics:
| Category | Count |
|----------|-------|
| Agents | 16 |
| Skills | 14 |
| Hooks | 4 |
| Commands | 2 |
| Templates | 5 |
| **Total** | **41** |
# Scan all .claude directories
find .claude/agents -name "*.md" -type f
find .claude/skills -name "SKILL.md" -o -name "*.md" -type f
find .claude/hooks -name "*.sh" -o -name "*.md" -type f
find .claude/commands -name "*.md" -type f
For each file, extract:
# From frontmatter
name: component-name
description: Brief description
tools: [Tool1, Tool2] # for agents
keywords: [key1, key2]
## Sub-Agents (16)
### Development & Analysis
| Agent | Purpose | Keywords |
|-------|---------|----------|
| `project-analyzer` | Analyze project structure | "analyze", "structure" |
| `code-reviewer` | Review code quality | "review", "PR" |
...
Use these markers to define sync boundaries:
<!-- README-SYNC:agents:start -->
## Sub-Agents (16)
...content auto-generated...
<!-- README-SYNC:agents:end -->
<!-- README-SYNC:skills:start -->
## Skills (14)
...content auto-generated...
<!-- README-SYNC:skills:end -->
Without markers, the skill will find sections by ## Sub-Agents or ## Agents headers.
📝 README-SYNC: Synchronizing README.md...
[1/4] Scanning agents...
Found: 16 agents
New: file-explorer (+1)
Removed: none
[2/4] Scanning skills...
Found: 14 skills
New: agile-sync, readme-sync (+2)
Removed: none
[3/4] Scanning hooks...
Found: 4 hooks
New: auto-doc-sync (+1)
Removed: none
[4/4] Updating stats...
Total: 36 → 40 (+4)
📝 README-SYNC: Complete!
Sections updated: 4
Components added: 4
Components removed: 0
📝 README-SYNC: Validation Report
## Agents
✅ 16 agents in README matches 16 files
⚠️ `old-agent` in README but file not found
## Skills
❌ README shows 12 skills, found 14 files
Missing in README:
- agile-sync
- readme-sync
## Hooks
✅ All hooks accounted for
## Stats
❌ Stats section outdated
README: 33 total
Actual: 40 total
Issues: 3
Recommendations:
- Run `/readme-sync` to fix mismatches
- Remove reference to `old-agent`
{
"readme-sync": {
"auto_on_change": true,
"sections": ["agents", "skills", "hooks", "commands", "stats"],
"preserve_custom": true,
"use_markers": true,
"table_format": "markdown"
}
}
# .claude/readme-sync-config.yml
sections:
agents:
header: "## Sub-Agents ({count})"
columns:
- name: "Agent"
source: "name"
format: "`{value}`"
- name: "Purpose"
source: "description"
truncate: 50
- name: "Keywords"
source: "keywords"
format: "\"{value}\""
skills:
header: "## Skills ({count})"
group_by: "category"
columns:
- name: "Skill"
source: "name"
- name: "Usage"
source: "usage"
- name: "Description"
source: "description"
# Hook triggers readme-sync when .claude files change
# In hooks/auto-doc-sync.sh:
if [[ "$TOOL_INPUT" == *".claude/"* ]]; then
# Trigger README sync suggestion
fi
# agile-sync includes readme-sync as step 3
/agile-sync # Includes README stats update
# Full sync
/readme-sync
# Specific section
/readme-sync --section skills
# Validate only
/readme-sync --validate
# Add section markers or headers:
## Sub-Agents
<!-- or -->
<!-- README-SYNC:agents:start -->
<!-- README-SYNC:agents:end -->
# Ensure frontmatter is valid:
---
name: my-component
description: Brief description
---
# Force full recalculation:
/readme-sync --section stats
| Skill | Purpose |
|---|---|
/agile-sync | Full agile artifact sync |
/init | Project initialization |
/doc | Documentation generation |