Agent skill

update-docs

Research current code state then update corresponding docs, ensuring docs stay in sync with code.

Stars 139
Forks 18

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-spec or /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:

  1. Architecture diagrams (Mermaid sequenceDiagram / flowchart)
  2. Core service table
  3. API description
  4. Data model

Step 5: Verification

After update:

  1. Re-read updated document sections
  2. Verify all new modules are documented
  3. 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

markdown
## Doc Update Report

| Document | Sections Updated | Status |
|----------|-----------------|--------|

## Changes Made
- <summary of each update>

## Verification
- [ ] New modules documented
- [ ] Removed modules cleaned
- [ ] Diagrams updated

Expand your agent's capabilities with these related and highly-rated skills.

sd0xdev/sd0x-dev-flow

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).

139 18
Explore
sd0xdev/sd0x-dev-flow

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.

139 18
Explore
sd0xdev/sd0x-dev-flow

project-brief

Convert a technical spec into a PM/CTO-readable executive summary. Simplify technical details, focus on business value.

139 18
Explore
sd0xdev/sd0x-dev-flow

codex-test-gen

Generate unit tests for specified functions using Codex MCP

139 18
Explore
sd0xdev/sd0x-dev-flow

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.

139 18
Explore
sd0xdev/sd0x-dev-flow

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.

139 18
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results