agentleFS
DasDigitaleMomentumDasDigitaleMomentum/opencode-processing-skills/skills/update-docs/SKILL.md

update-docs

Skill60 starsChanged 34 days agoMITView on GitHub

Update existing project documentation after code changes. Detects outdated sections, updates module and feature docs, and ensures cross-references remain valid. Use this skill after implementing features, refactoring, or when documentation is known to be stale.

87 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use get-pr-reviews, push-everything and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • saffron-healthSkill

    get-pr-reviews

    Get nicely formatted output of the last review comments on a PR. Used internally by other skills.

    Also in 3 projects that use this

  • saffron-healthSkill

    push-everything

    Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 3 projects that use this

  • NVIDIASkill

    generate-spec

    Produce a feature specification covering API changes, backward compatibility, cross-language impact, performance, and a file-level change plan. Use when designing a new feature, planning a significant change, or the user asks to spec something out.

    Also in 3 projects that use this

  • belokonmSkill

    fullstack-developer

    End-to-end feature expert specializing in frontend-backend integration, system architecture, and complete application development

    Also in 4 projects that use this

  • +1 more from saffron-health
  • +1 more from TheKREATORS

The file

Show its rules and text

We split this skill into the rules it gives an agent

35 rules. 0 are common, 29 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 81 edited versions we read keep these.

  • 29

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After implementing a feature or fixing a bug that changes behavior

    line 25
  2. Distinctive:

    After refactoring that affects module structure or symbols

    line 26
  3. Distinctive:

    When the user says documentation is "outdated" or asks to "update docs"

    line 27
  4. Distinctive:

    After a plan phase is completed and code has changed

    line 28
  5. Very specific:

    Do NOT use this skill to create documentation from scratch - use generate-docs instead.

    line 30
  6. Distinctive:

    When changes span multiple modules, doc-explorer SHOULD delegate per-module updates to separate doc-explorer instances via the Task tool:

    line 41
  7. Distinctive:

    Check git diff for uncommitted changes

    line 57
  8. Distinctive:

    Use git log --oneline -N to see recent commits

    line 60
  9. Very specific:

    Use git diff <commit>..HEAD --stat to see affected files

    line 61
  10. Distinctive:

    Read the affected documentation files.

    line 79
  11. Distinctive:

    Update each affected document:

    line 89
  12. Distinctive:

    Update Key Symbols if exports changed

    line 92
  13. Very specific:

    Update Structure if files were added/removed/moved

    line 93
  14. Distinctive:

    Update Dependencies if new dependencies were introduced

    line 94
  15. Distinctive:

    Update Data Flow if processing logic changed

    line 95
  16. Distinctive:

    Keep inventories in sync (files/dirs + symbols)

    line 96
  17. Distinctive:

    Update User Flow if user-facing behavior changed

    line 99
  18. Distinctive:

    Update Technical Flow if implementation approach changed

    line 100
  19. Distinctive:

    Update Implementation table with new/changed symbols

    line 101
  20. Distinctive:

    Update Edge Cases if new limitations discovered

    line 102
  21. Distinctive:

    Update Modules table if modules were added/removed

    line 105
  22. Distinctive:

    Update Features table if features were added/removed

    line 106
  23. Distinctive:

    Update Architecture if high-level structure changed

    line 107
  24. Distinctive:

    Update Tech Stack if new technologies introduced

    line 108
  25. Distinctive:

    Check that all module links in the overview point to existing files

    line 112
  26. Distinctive:

    Check that feature docs reference the correct module docs

    line 113
  27. Distinctive:

    If implementation plans exist, verify they still reference current module documentation

    line 114
  28. Distinctive:

    Remove references to deleted modules/features

    line 115
  29. Distinctive:

    Never overwrite without reading first: Always read existing documentation before modifying.

    line 126
  30. Distinctive:

    Preserve manual additions: If a section was manually enriched beyond what auto-generation would produce, preserve those additions.

    line 127
  31. Distinctive:

    Incremental updates: Only update what changed. Don't regenerate entire documents.

    line 128
  32. Very specific:

    Track the update: Update the frontmatter version or add a note if the template supports it.

    line 129
  33. Very specific:

    No built-in explore agent: Do NOT use the built-in explore subagent type.

    line 130
  34. Distinctive:

    Flag gaps: If new code lacks documentation, notify the user rather than silently ignoring it.

    line 132
  35. Very specific:

    File-based interface: All updates are written to files in the docs/ directory.

    line 133

“Common” is measured: kept by at least 6 in 10 of the 81 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Update Documentation

What This Skill Does

Updates existing project documentation to reflect code changes. Handles:

  • Detecting which documentation is affected by recent changes
  • Updating module documentation (symbols, structure, data flow)
  • Updating feature documentation (new behavior, changed flows)
  • Updating the project overview (new modules, changed architecture)
  • Ensuring cross-references remain valid

When to Use

  • After implementing a feature or fixing a bug that changes behavior
  • After refactoring that affects module structure or symbols
  • When the user says documentation is "outdated" or asks to "update docs"
  • After a plan phase is completed and code has changed

Do NOT use this skill to create documentation from scratch - use generate-docs instead.

Execution Model

  • The primary agent spawns doc-explorer. doc-explorer maps code changes to docs and updates files under docs/.
  • Rationale: doc updates are grounded in repo state; exploration + edits belong together to avoid losing "why this section changed".
  • For large change sets affecting multiple modules, doc-explorer self-delegates per module (see Self-Delegation below).
  • The primary agent should keep chat output minimal (what docs changed + any gaps).

Self-Delegation

When changes span multiple modules, doc-explorer SHOULD delegate per-module updates to separate doc-explorer instances via the Task tool:

  1. Orchestrator instance: Identifies affected modules from git diff, spawns per-module instances
  2. Per-module instance: Receives scoped task ("update docs for module X, changes: ..."), reads existing doc, updates it
  3. Orchestrator: Updates cross-cutting artifacts (overview, feature docs), validates cross-references

This prevents token bloat from accumulating analysis of all changed modules in a single context.

Workflow

Step 1: Identify What Changed

Determine the scope of changes using one or more methods:

If changes are recent (current session):

  • Review the files modified in the current session
  • Check git diff for uncommitted changes

If changes are from git history:

  • Use git log --oneline -N to see recent commits
  • Use git diff <commit>..HEAD --stat to see affected files
  • For large diffs, self-delegate per-module analysis

If the user specifies what changed:

  • Focus on the modules/features the user mentions

Step 2: Map Changes to Documentation

For each changed file, determine:

  1. Which module does it belong to? → Update docs/modules/<module>.md
  2. Which features does it affect? → Update docs/features/<feature>.md
  3. Does it change the project structure? → Update docs/overview.md

For changes spanning multiple modules, self-delegate per-module updates.

Step 3: Read Existing Documentation

Read the affected documentation files. Compare against the current code state:

  • Are symbols still accurately described?
  • Has the module structure changed (new files, moved files)?
  • Have dependencies changed?
  • Are data flows still correct?
  • Are feature behaviors still accurately described?

Step 4: Apply Updates

Update each affected document:

Module Documentation:

  • Update Key Symbols if exports changed
  • Update Structure if files were added/removed/moved
  • Update Dependencies if new dependencies were introduced
  • Update Data Flow if processing logic changed
  • Keep inventories in sync (files/dirs + symbols)

Feature Documentation:

  • Update User Flow if user-facing behavior changed
  • Update Technical Flow if implementation approach changed
  • Update Implementation table with new/changed symbols
  • Update Edge Cases if new limitations discovered

Project Overview:

  • Update Modules table if modules were added/removed
  • Update Features table if features were added/removed
  • Update Architecture if high-level structure changed
  • Update Tech Stack if new technologies introduced

Step 5: Validate Cross-References

  • Check that all module links in the overview point to existing files
  • Check that feature docs reference the correct module docs
  • If implementation plans exist, verify they still reference current module documentation
  • Remove references to deleted modules/features

Step 6: Report Changes

Present a summary:

  • Which documents were updated
  • What sections changed
  • Any gaps found (new code that has no documentation)

Rules

  1. Never overwrite without reading first: Always read existing documentation before modifying.
  2. Preserve manual additions: If a section was manually enriched beyond what auto-generation would produce, preserve those additions.
  3. Incremental updates: Only update what changed. Don't regenerate entire documents.
  4. Track the update: Update the frontmatter version or add a note if the template supports it.
  5. No built-in explore agent: Do NOT use the built-in explore subagent type. Self-delegate to doc-explorer instead.
  6. Self-delegate for scale: For large change sets spanning multiple modules, spawn additional doc-explorer instances per module via the Task tool.
  7. Flag gaps: If new code lacks documentation, notify the user rather than silently ignoring it.
  8. File-based interface: All updates are written to files in the docs/ directory. Do not return updated content as chat messages.

Templates

This skill includes normative templates as bundled files. Only read the templates when processing them. Output MUST preserve template headings/frontmatter keys when updating docs:

  • tpl-project-overview.md - Expected structure for project overview
  • tpl-module-documentation.md - Expected structure for module documentation
  • tpl-feature-documentation.md - Expected structure for feature documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.