| name | sync-docs |
| description | Update documentation to match current code state |
Update documentation to match current code state.
Scope: the task/scope the user described when invoking this skill (if none given, ask or infer from context)
Process
- See recent changes. Clamp N to available history first so this doesn't fail on repos with fewer than 5 commits:
N=$(( $(git rev-list --count HEAD) - 1 )); [ $N -gt 5 ] && N=5; if N is 0 (single commit), fall back to git log --oneline / git show --stat inspection. Then git diff --name-only HEAD~$N.
- Find related documentation for changed files (README, docs/, inline comments, API docs).
- Update: README (setup, features, usage), API docs (endpoints, request/response), config docs (env vars, defaults), architecture docs, CHANGELOG.
- Ensure examples in docs still work.
- Report what was updated.
Rules
- Match existing documentation style and tone.
- Don't add documentation where none existed (unless asked).
- Update, don't rewrite — preserve existing structure.
- Flag outdated examples that can't be auto-fixed.