Docs sync

From laurigates/claude-plugins · View interactive version

Docs sync is an AI agent skill from the GitHub repository laurigates/claude-plugins. Sync docs with actual skills, commands, and agents. Use when docs are out of sync, updating the skill catalog, or regenerating command reference to fix mismatches.

How to use this skill

Skill file

/docs:sync [OPTIONS]

When to Use This Skill

| Use this skill when... | Use docs-generate instead when... |

|---|---|

| Skill / command / agent counts in README or CLAUDE.md drift from what the directories actually contain | Producing fresh API reference, README rewrites, or CHANGELOG content from code |

| New skills were added but not yet listed in the catalog tables | The catalog itself is fine and you need to author new documentation |

| Removed items still appear as stale entries in documentation | Drafting a service teardown checklist (use docs-decommission) |

| Cross-references and category groupings need reconciliation after a refactor | Converting an existing Markdown document to a print-ready PDF (use docs-latex) |

Scan the codebase for skills, commands, and agents, then update all documentation to reflect the current state. Fixes count mismatches, adds missing entries, and removes stale references.

Usage

/docs:sync                        # Sync all documentation
/docs:sync --scope skills         # Only sync skill documentation
/docs:sync --scope commands       # Only sync command documentation
/docs:sync --scope agents         # Only sync agent documentation
/docs:sync --dry-run              # Show what would change without modifying
/docs:sync --verbose              # Show detailed scanning output

Parameters

Execution

Execute this documentation sync workflow:

Step 1: Discover codebase items

  1. Scan source directories:

```bash

# Skills

find .claude/skills -name "SKILL.md" -type f

# Commands

find .claude/commands -name "*.md" -type f ! -name "CLAUDE.md"

# Agents

find .claude/agents -name "*.md" -type f

```

  1. Extract metadata from each item:
  1. Parse existing documentation:

Step 2: Analyze differences

  1. Compare actual vs documented:
  1. Categorize new items:

For skills, determine category by:

For user-invocable skills, determine namespace from directory name:

For agents, determine domain from description keywords

  1. Identify documentation sections to update:

Step 3: Apply updates

  1. Update counts throughout documentation:
  1. Add new items to appropriate sections:

Skills catalog format:

```markdown

### Category Name (N skills)

```

Command table format:

```markdown

| Namespace | Commands | Purpose |

| /command | Description | Usage context |

```

Agent inventory format:

```markdown

| Agent | Purpose | Key Tools |

| agent-name | Description | Tool1, Tool2 |

```

  1. Remove stale entries that no longer exist in codebase
  1. Update cross-references:

Step 4: Report results

Generate summary of changes:

## Documentation Sync Report

### Skills
- ✅ Added N new skills to catalog
  - skill-name → Category Name
- ✅ Removed N stale skills
- ✅ Updated skill count: OLD → NEW

### Commands
- ✅ Added N new commands
  - /namespace:command → Description
- ✅ Updated command counts

### Agents
- ✅ Added N new agents
  - agent-name → Domain
- ✅ Updated agent inventory

### Files Modified
- path/to/file.md (N changes)

### Manual Review Needed
- item-name: Could not determine category

Documentation Files to Update

Primary targets (always check):

Secondary targets (if they exist):

Categorization Rules

Skill Categories

| Pattern | Category |

|---------|----------|

| ux-*, accessibility-*, design-* | UX & Accessibility |

| git-*, github-* | Version Control & GitHub |

| python-*, uv-*, ruff-* | Python Development |

| typescript-*, nodejs-*, vitest-* | TypeScript/JavaScript |

| rust-*, cpp-*, embedded-* | Systems Languages |

| container-*, kubernetes-*, helm-*, terraform-* | Infrastructure & DevOps |

| test-*, playwright-*, mutation-* | Testing & Quality |

| agent-*, multi-agent-* | Meta & Coordination |

Skill Namespaces

Determined by skill directory name prefix:

Error Handling

Best Practices

  1. Run after adding features - Keep docs in sync with implementation
  2. Review dry-run first - Verify categorization before applying
  3. Commit docs separately - Use docs: conventional commit prefix
  4. Check cross-references - Ensure "See also" sections are updated

Example Session

# After adding new skills
/docs:sync --dry-run

# Review output, then apply
/docs:sync

# Commit the documentation updates
git add .claude/
git commit -m "docs: sync documentation with new UX implementation features"

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.