Agent skill
update-docs
Research current code state then update corresponding docs, ensuring docs stay in sync with code.
Install this agent skill to your Project
npx add-skill https://github.com/sd0xdev/sd0x-dev-flow/tree/main/skills/update-docs
SKILL.md
Update Docs
Trigger
- Keywords: update docs, sync docs, docs out of date, update-docs
When NOT to Use
- Document review (use
/codex-review-doc) - Creating new docs (use
/tech-specor/create-request) - Document refactoring (use
/doc-refactor)
Auto-Trigger
Auto-triggered after precommit Pass, only when the change maps to a feature under docs/features/ (see @rules/auto-loop.md Doc Sync Note). Can also be invoked manually.
Task
Step 1: Locate Docs and Related Code (5-Level Cascade)
Key principle: can't find target → ## Gate: ⚠️ Need Human — don't guess or create new docs.
Use the shared feature context resolution algorithm (see @skills/tech-spec/references/feature-context-resolution.md):
| Confidence | Action |
|---|---|
| high/medium | Proceed with detected feature |
| low | Proceed with warning |
| null (not found) | Output ## Gate: ⚠️ Need Human — do not guess |
Step 2: Research Current Code State
Key research items:
- Any new scripts / skills / commands added?
- Any modified logic in existing files?
- Any new configuration or rules added?
- Any API or interface changes?
Step 3: Compare Docs vs Code Differences
| Item | Doc Description | Current Code | Status |
|---|
Step 4: Update Docs
Update document content based on differences:
- Architecture diagrams (Mermaid sequenceDiagram / flowchart)
- Core service table
- API description
- Data model
Step 5: Verification
After update:
- Re-read updated document sections
- Verify all new modules are documented
- Verify all removed modules are cleaned up
Safety Valve
After doc sync, compare code diff against pre-sync baseline. If new code changes exist (e.g., lint:fix modified code), return to review loop.
Output
## Doc Update Report
| Document | Sections Updated | Status |
|----------|-----------------|--------|
## Changes Made
- <summary of each update>
## Verification
- [ ] New modules documented
- [ ] Removed modules cleaned
- [ ] Diagrams updated
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
runbook
Generate and update feature release runbooks from existing docs and codebase. Use when: creating operational runbook, release handbook, deployment checklist, pre-release preparation. Not for: incident response (v2), code review (use codex-code-review), architecture design (use architecture).
ask
Context-aware Q&A with auto context gathering. Use when: user has a quick question about codebase, git history, rules, docs, or skills during development. Not for: code changes (use feature-dev), code review (use codex-review-fast), deep research (use deep-research), full code trace (use code-explore). Output: structured answer with source attribution.
project-brief
Convert a technical spec into a PM/CTO-readable executive summary. Simplify technical details, focus on business value.
codex-test-gen
Generate unit tests for specified functions using Codex MCP
bug-fix
Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate.
skill-health-check
Validate skill quality against routing, progressive loading, and verification criteria. Use when: auditing skills, checking skill health, reviewing skill design. Not for: code review (use codex-code-review) or doc review (use doc-review). Output: health report with per-skill ratings + Gate.
Didn't find tool you were looking for?