doc logo

doc

doc

boshu2/agentops783installs376starsDocumentation

SKILL.md

Full skill instructions

Doc Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Generate and validate documentation for any project. --mode selects the artifact family — the default mode handles code/API docs and code-maps; --mode=readme generates a gold-standard README; --mode=oss scaffolds and audits the open-source doc pack.

Modes

--modeArtifactRead first
(default)API docs, code-maps, doc coverage/validatethis file
readmeGold-standard README (interview → generate → council-validate)references/readme-craft.md
ossOSS doc pack (CONTRIBUTING/CHANGELOG/AGENTS.md, audit + scaffold)references/oss-pack.md

Mode routing (absorbed skills):

You typedRuns
"readme", "rewrite the README", "validate the README"/doc --mode=readme [...]
"oss docs", "scaffold contributing", "audit OSS docs"/doc --mode=oss [...]

When invoked with --mode=readme or --mode=oss, read the corresponding reference above and follow its workflow verbatim. The default-mode steps below apply only when no mode (or the implied code-docs mode) is selected.

Execution Steps (default mode — code/API docs)

Default mode is deliberately thin — a frontier model runs it correctly with no payload. Given /doc [command] [target]:

  1. Detect project typels package.json pyproject.toml go.mod Cargo.toml + existing docs/; classify CODING / INFORMATIONAL / OPS.
  2. Run the commanddiscover (grep undocumented funcs), coverage (documented vs total), gen [feature] (read code → stamp function/class markdown), all, or validate.
  3. Write the report to .agents/doc/YYYY-MM-DD-<target>.md (coverage %, generated, gaps, validation issues), then report coverage + gaps to the user.

Full step-by-step detail — grep recipes, function/class + code-map templates, the report skeleton, key rules, worked examples, and the troubleshooting table — lives in references/default-mode.md (moved there in the generic-craft trim). Read it when you need the exact shapes; otherwise just do the three steps.

Reference Documents

Examples

/doc                    # default: docs for the changed surface (references/default-mode.md)
/doc --mode=readme      # gold-standard README, council-validated
/doc --mode=oss         # full OSS doc pack

Troubleshooting

ProblemFix
Default mode feels heavyweightRead references/default-mode.md — or just ask the model directly for simple docs
README mode verdict failsRe-run with the council findings addressed (see the readme-mode references listed above)