agentleFS
greglas75greglas75/zuvo/skills/docs/SKILL.md

docs

Skill7 starsChanged 27 days agoMITView on GitHub

Write and update technical documentation from actual codebase analysis. Generates README, API reference, runbook, onboarding guide, or changelog. Supports update mode that patches stale sections without rewriting from scratch. Modes: readme [path], api [path], runbook [topic], onboarding, update [file], changelog [range].

  • Reads credentials
  • Installs packages

165 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use import-memory, perf and 8 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.
  • amirbironSkill

    import-memory

    Import a memory export from another AI assistant into Claude's memory — conversationally, additively, and with the content treated as data.

    Also in 3 projects that use this

  • MicrosoftSkill

    perf

    Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-delivery.

    Also in 4 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • vbrevikSkill

    work

    Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.

    Also in 7 projects that use this

  • mbwsimsSkill

    impact

    This skill should be used when the user asks to "check the impact", "what will break if I change this", "blast radius", "impact analysis", "what depends on this", "who imports this", "is it safe to change this", mentions "/impact", or wants to understand the consequences of modifying a specific file or function before making changes.

    Also in 3 projects that use this

  • Google CloudSkill

    fix

    Plan a remediation strategy after a test failure.

    Also in 7 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. 0 are common, 15 are distinctive, and 15 are very specific to this project.

  • 0

    Common

    Most of the 129 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 15

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Iron rule: Never write a claim in documentation without reading the source file it references first.

    line 58
  2. Very specific:

    No arguments: default to readme for project root

    line 77
  3. Very specific:

    Read ../../shared/includes/env-compat.md for user interaction patterns.

    line 95
  4. Very specific:

    Read ../../shared/includes/codesift-setup.md for initialization.

    line 99
  5. Very specific:

    Read ../../shared/includes/run-logger.md for log format and file path resolution.

    line 118
  6. Very specific:

    Before writing any doc with shell commands, detect the project's package manager and tooling.

    line 123
  7. Very specific:

    If commands come from package.json scripts or Makefile targets, use the exact script name.

    line 137
  8. Very specific:

    When update [file] is invoked, follow this procedure strictly.

    line 260
  9. Distinctive:

    Read the existing doc. Extract every factual claim as a checklist item: commands, file paths, env vars, API endpoints, architecture …

    line 264
  10. Very specific:

    If more than 50% of claims are stale, suggest full rewrite with readme [path] instead.

    line 297
  11. Distinctive:

    If not available, fall back to manual parsing:

    line 318
  12. Distinctive:

    Read the generated changelog.

    line 328
  13. Distinctive:

    Every generated doc must include a hidden Evidence Map tracing each section to its source:

    line 334
  14. Distinctive:

    Every section with factual claims needs at least one source entry

    line 347
  15. Very specific:

    If a section has no source: <!-- TODO: needs source verification -->

    line 349
  16. Distinctive:

    After writing any doc with shell commands:

    line 355
  17. Very specific:

    Check each command against its source (package.json scripts, Makefile targets, etc.)

    line 358
  18. Distinctive:

    If target file exists, ask before overwriting (except in update mode).

    line 380
  19. Very specific:

    After generating or updating documentation, run cross-model validation to catch inaccuracies and stale content.

    line 386
  20. Very specific:

    Record the verdicts: after triage: every finding is fixed, rejected (a false positive) or deferred — record each by its ID: in ONE call, …

    line 394
  21. Very specific:

    If adversarial-review is not in PATH: ~/.zuvo/adversarial-review (stable.

    line 400
  22. Distinctive:

    Wait for complete output. Then:

    line 402
  23. Distinctive:

    Before printing the final output block, verify every item.

    line 411
  24. Distinctive:

    After completing any mode, print:

    line 424
  25. Very specific:

    Follow the retrospective protocol from retrospective.md.

    line 437
  26. Distinctive:

    If gate check skips: print "RETRO: skipped (trivial session)" and proceed.

    line 439
  27. Very specific:

    Append via wrapper (REQUIRED): Never >> directly to ~/.zuvo/runs.log — the wrapper is the gate that verifies a retro entry exists for this …

    line 441
  28. Distinctive:

    Read the code, write the docs.

    line 455
  29. Distinctive:

    Write for the reader. README is for someone who just found the repo.

    line 456
  30. Distinctive:

    Start with the most useful information.

    line 457

“Common” is measured: kept by at least 6 in 10 of the 129 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

zuvo:docs — Technical Documentation

Generate or update documentation by reading the actual codebase -- not from templates, not from memory, from real code.

Iron rule: Never write a claim in documentation without reading the source file it references first. Every section maps back to a source file via the Evidence Map.

Scope: README, API reference, runbooks, onboarding guides, changelogs. Out of scope: Architecture diagrams (use zuvo:architecture), code comments (out of scope), user-facing product docs (out of scope).

Argument Parsing

InputAction
(empty)Check if README.md exists. If yes: update it. If no: generate one. If user interaction is available, ask for preference.
readme [path]Write or update README for the module at [path]
api [path]Generate API reference from route/controller files at [path]
runbook [topic]Write operational runbook for a specific process
onboardingWrite onboarding guide for new developers
update [file]Read existing doc, verify claims against source, patch stale sections
changelogGenerate CHANGELOG.md from git history
changelog [range]Generate changelog for a specific range (e.g., v1.2.0..v1.3.0)

Non-interactive environments (Codex, Cursor):

  • No arguments: default to readme for project root
  • Target file exists: default to update mode (patch, not overwrite)

Mandatory File Loading

PHASE 0 — Bootstrap (before reading any source)

  1. ../../shared/includes/codesift-setup.md      -- [READ | MISSING -> WARN]
  2. ../../shared/includes/env-compat.md          -- [READ | MISSING -> WARN]

retrospective.md and run-logger.md are END-of-run includes — they are loaded at completion, not here.

Environment Compatibility

Read ../../shared/includes/env-compat.md for user interaction patterns.

CodeSift Integration

Read ../../shared/includes/codesift-setup.md for initialization.

Key tools for this skill:

Doc typeTaskCodeSift toolFallback
READMEProject structureget_file_tree(repo, path_prefix="src", compact=true)ls -R src/
READMEModule overviewdetect_communities(repo, focus="src")Manual directory analysis
APIEndpoint discoverysearch_symbols(repo, kind="function", file_pattern="**/api/**")Grep for route decorators
APIHandler source + callersfind_and_show(repo, query=<handler>, include_refs=true)Read each file
APISchema discoverysearch_symbols(repo, query="Schema", kind="variable", include_source=true)Grep for Zod/validator
UpdateVerify file pathsget_file_tree(repo, path_prefix=<path>)ls / Glob
UpdateVerify API shapesget_symbol(repo, symbol_id)Read the file
AnyContext assemblyassemble_context(repo, query=<topic>, token_budget=4000)Multiple Read calls

Run Logging

Read ../../shared/includes/run-logger.md for log format and file path resolution. Read ../../shared/includes/retrospective.md for log format and file path resolution.

Stack-Aware Commands (Required)

Before writing any doc with shell commands, detect the project's package manager and tooling. Never hardcode npm -- use what the project actually uses.

SignalInstallDevTestBuild
pnpm-lock.yamlpnpm installpnpm devpnpm testpnpm build
yarn.lockyarnyarn devyarn testyarn build
bun.lockbbun installbun devbun testbun run build
package-lock.jsonnpm installnpm run devnpm testnpm run build
pyproject.toml (poetry)poetry installpoetry run ...poetry run pytestpoetry build
requirements.txtpip install -r requirements.txtpython manage.py runserverpytest--
go.modgo mod downloadgo run .go test ./...go build
Cargo.tomlcargo buildcargo runcargo testcargo build --release
composer.jsoncomposer installphp artisan servevendor/bin/phpunit--

If commands come from package.json scripts or Makefile targets, use the exact script name.


Mandatory Source Reading

For every doc type, read the relevant source files before writing anything:

Doc typeRead first
READMEpackage.json or pyproject.toml, main entry point, existing README if any
API docsRoute/controller files, DTO/schema files, auth guard files
RunbookThe service code being operated, existing runbooks in docs/
Onboardingpackage.json, docker-compose.yml, CI config, existing onboarding docs
ChangelogGit log for the target range

Mode: README

Output Structure

# [Service/Package Name]

> [One sentence -- what is this and why does it exist?]

## Quick Start

[Minimum steps to get running locally, using stack-aware commands]

## Configuration

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|

## Development

[Dev, test, lint, build commands -- from package.json/Makefile, verified]

## Project Structure

[Directory listing with one-line descriptions, from actual ls/tree]

## API

[Link to API docs or brief summary]

## Contributing

[Branch strategy, PR requirements]

Quality checklist: Quick start works in under 5 commands. All env vars documented. Commands match actual scripts. No template copy-paste.


Mode: API Reference

Output Structure

# API Reference -- [Service Name]

**Base URL:** `/api/v1`
**Auth:** [from actual auth guard detection]

## [Resource Name]

### GET /[resource]

[Description from reading the handler code]

**Auth:** [from guard/middleware on this route]
**Query Parameters** [from DTO/schema]
**Response 200** [from actual return type/shape]
**Errors** [from error handling in the handler]

Quality checklist: Every endpoint has auth requirement noted. All request fields documented with types. All meaningful error codes listed. Response shapes come from code, not invention.


Mode: Runbook

Output Structure

# Runbook: [Operation Name]

**When to use:** [Trigger condition]
**Time required:** ~[N] minutes
**Who can run this:** [Role]
**Risk level:** [Low | Medium | High]

## Prerequisites
## Steps (numbered, with commands and expected output)
## Verification (how to confirm success)
## Rollback (how to undo if something goes wrong)
## Escalation (who to contact)

Mode: Onboarding Guide

Output Structure

# Developer Onboarding -- [Project Name]

**Time to first working local environment:** ~[N] minutes

## Environment Setup (prerequisites, clone, install, config)
## Key Systems (what does what, where it lives)
## Common Tasks (run tests, add endpoint, deploy)
## Who to Ask (topic -> person -> channel)

Mode: Update (Staleness Check)

When update [file] is invoked, follow this procedure strictly. Never rewrite from scratch.

Step 1: Extract Claims

Read the existing doc. Extract every factual claim as a checklist item: commands, file paths, env vars, API endpoints, architecture descriptions.

Step 2: Verify Each Claim

For each claim, read the source file it references:

Claim typeWhere to verify
Shell commandspackage.json scripts, Makefile, pyproject.toml
File pathsls / Glob -- does the path exist?
Env vars.env.example, config loader
API endpointsRoute/controller files
ArchitectureImport graph, docker-compose, infra config

Mark each: verified (still true), stale (incorrect), unverifiable (source missing).

Step 3: Patch

  • Verified claims: leave unchanged
  • Stale claims: update with correct information from source
  • Unverifiable claims: add <!-- TODO: verify -- source not found -->
  • Missing info: add new sections only if source reveals undocumented features

Step 4: Summary

Update summary for [file]:
  [N] sections unchanged
  [N] sections updated: [list]
  [N] sections unverifiable: [list]
  [N] new sections added: [list]

If more than 50% of claims are stale, suggest full rewrite with readme [path] instead.


Mode: Changelog

Step 1: Check for git-cliff

npx git-cliff --version 2>/dev/null

Step 2: Generate

If git-cliff available:

npx git-cliff --output CHANGELOG.md          # full
npx git-cliff v1.2.0..v1.3.0 --output CHANGELOG.md  # range

If not available, fall back to manual parsing:

git log --oneline --no-merges $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~20")..HEAD

Classify by conventional commit prefix (feat/fix/refactor/docs/chore), format as Markdown.

Step 3: Enrich

Read the generated changelog. For cryptic messages, read the actual diff and add one-line context. Group related commits. Highlight breaking changes.


Evidence Map (Required)

Every generated doc must include a hidden Evidence Map tracing each section to its source:

<!-- Evidence Map
| Section | Source file(s) |
|---------|---------------|
| Quick Start | package.json:scripts (line 5-12) |
| Configuration | .env.example (line 1-15) |
| API: GET /users | src/routes/users.controller.ts:24-45 |
-->

Rules:

  • Every section with factual claims needs at least one source entry
  • Commands must trace back to the script definition file
  • If a section has no source: <!-- TODO: needs source verification -->

Command Validation Gate (Before Output)

After writing any doc with shell commands:

  1. Extract all bash code blocks from the generated doc
  2. Check each command against its source (package.json scripts, Makefile targets, etc.)
  3. Flag mismatches and fix them before output
Command validation:
  pnpm dev        -> matches package.json scripts.dev
  pnpm test       -> matches package.json scripts.test
  pnpm run lint   -> no "lint" in scripts (found "lint:check") -> FIXED

Output Paths

Doc typeDefault path
readme[target-path]/README.md
apidocs/api/[service-name].md
runbookdocs/runbooks/[topic].md
onboardingdocs/onboarding.md
changelog./CHANGELOG.md

If target file exists, ask before overwriting (except in update mode). Non-interactive environments default to update mode.


Adversarial Review on Generated Docs (MANDATORY — do NOT skip)

After generating or updating documentation, run cross-model validation to catch inaccuracies and stale content. Point --files at the doc file(s) you just wrote — do NOT run the literal placeholder (it matches nothing and burns a pass).

DOC="<the doc path you just wrote, e.g. README.md or docs/<feature>.md>"
[ -f "$DOC" ] && ~/.zuvo/adversarial-review --mode audit --files "$DOC" \
  || echo "adversarial: set DOC to the generated/updated doc path first"

Record the verdicts after triage: every finding is fixed, rejected (a false positive) or deferred — record each by its ID: in ONE call, ~/.zuvo/adversarial-review --record-disposition ID-1 fixed --record-disposition ID-2 rejected …, per ../../shared/includes/adversarial-loop.md Step 4.9 (the review lists its IDs on stderr).

Dispatch follows ../../shared/includes/execution-policy.md through env-compat. Reuse existing authorization within that policy; session restrictions take precedence. Run each required gate and report its actual independence or an unmet requirement.

If adversarial-review is not in PATH: ~/.zuvo/adversarial-review (stable; the versioned cache path breaks after any release)

Wait for complete output. Then:

  • CRITICAL (incorrect API signatures, wrong commands, stale references) → fix in doc before delivery
  • WARNING (missing sections, vague descriptions) → note in completion output
  • INFO → ignore

Completion Gate Check

Before printing the final output block, verify every item. Unfinished items = pipeline incomplete.

COMPLETION GATE CHECK
[ ] Mandatory source files read before writing
[ ] Every shell command verified against source (package.json/Makefile)
[ ] Evidence Map present: factual claims trace to source file:line
[ ] Adversarial review ran on generated doc
[ ] Run: line printed and appended to log

Completion

After completing any mode, print:

DOCS COMPLETE
-----
Mode:  [readme | api | runbook | onboarding | update | changelog]
Run: <ISO-8601-Z>	docs	<project>	-	-	<VERDICT>	-	<DURATION>	<NOTES>	<BRANCH>	<SHA7>	<INCLUDES>	<TIER>
-----

Retrospective (REQUIRED)

Follow the retrospective protocol from retrospective.md. Gate check → structured questions → TSV emit → markdown append. If gate check skips: print "RETRO: skipped (trivial session)" and proceed.

Append via wrapper (REQUIRED). Never >> directly to ~/.zuvo/runs.log — the wrapper is the gate that verifies a retro entry exists for this run. Order: retro bash executed → wrapper invoked → completion claimed.

printf '%b\n' "$RUN_LINE" | ~/.zuvo/append-runlog

Expected stdout: OK: appended to runs.log (retro verified for <skill> on <project>). If exit 2 with RETRO_REQUIRED — go execute the retro bash from retrospective.md first; never bypass with ZUVO_SKIP_RETRO_GATE=1. After the wrapper succeeds, print a Logs: evidence line (tail -1 ~/.zuvo/retros.log, grep -c "^<!-- RETRO -->" ~/.zuvo/retros.md, tail -1 ~/.zuvo/runs.log) before claiming completion. Printing the markdown retro section without executing the bash leaves all three log files empty.

<DURATION>: use the mode label (readme, api, runbook, onboarding, changelog, or update).


Principles

  1. Read the code, write the docs. Every claim must be verifiable in the source.
  2. Write for the reader. README is for someone who just found the repo. Runbook is for someone at 2am.
  3. Start with the most useful information. Quick Start before architecture details.
  4. Stale docs are worse than no docs. Mark uncertainty with TODO rather than leaving wrong information.

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.