skills/code-documentation/SKILL.md
This skill should be used when the user asks to write, update, review, scaffold, or reorganize documentation for code, folders, services, repos, workflows, architectural decisions, or operational processes. Trigger for `README.md`, `ARCHITECTURE.md`, `TESTS.md`, `SETUP.md`, `RUNBOOK.md`, `CHANGELOG.md`, `SECURITY.md`, `OVERVIEW.md`, `FAQ.md`, `DECISIONS.md`, `DEPENDENCIES.md`, `AGENTS.md`, `PLAN.md`, `SPEC.md`, `SOUL.md`, `PRINCIPLES.md`, `DESIGN.md`, `runbooks/**/*.md`, `docs/**/*.md`, MDX docs, JSDoc/TSDoc, docstrings, ADRs, post-mortems, migration guides, and PR documentation-impact reviews.
npx skillsauth add alvarovillalbaa/agent-suite code-documentationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write documentation that stays close to the code, tells the next reader what to do, and remains maintainable by both humans and agents.
Documentation in this repo falls into five surfaces:
README.md, ARCHITECTURE.md, TESTS.md, and related files that explain one directoryAGENTS.md, PLAN.md, SPEC.md, SOUL.md, PRINCIPLES.md, DESIGN.mdrunbooks/ or a local RUNBOOK.mddocs/ for references, audits, guides, memories, specs, and longer-form artifactsDefault rule: put the doc in the narrowest place that future readers will naturally look first.
| Need | Default location |
|---|---|
| Explain a public function, component, hook, API surface, or class | Inline docs |
| Explain what a directory is for and how to navigate it | README.md in that directory |
| Explain internal design or data flow for one directory | ARCHITECTURE.md in that directory |
| Explain how to test one directory or service | TESTS.md in that directory |
| Document setup or bootstrap steps for one area | SETUP.md in that directory |
| Document a repeatable operational workflow | runbooks/<name>.md or local RUNBOOK.md |
| Record repo-wide operating rules for humans and agents | AGENTS.md |
| Record planned execution steps | PLAN.md |
| Record required behavior or scope | SPEC.md |
| Record product intent, voice, or core spirit | SOUL.md |
| Record non-negotiable engineering or product rules | PRINCIPLES.md |
| Record design-system, architecture, or UX rules | DESIGN.md |
| Record audits, ADRs, post-mortems, reports, migrations, or references | docs/ |
Every meaningful folder can carry its own documentation. Unless repo-local rules say otherwise, use this default set.
Always consider these first:
README.mdARCHITECTURE.mdTESTS.mdAdd these only when the folder actually needs them:
SETUP.mdRUNBOOK.mdCHANGELOG.mdSECURITY.mdUse these when the domain justifies them:
OVERVIEW.mdFAQ.mdDECISIONS.mdDEPENDENCIES.mdREADME.md — entry point, purpose, usage, links to neighboring docsARCHITECTURE.md — internals, flows, boundaries, design decisionsTESTS.md — how to run tests, test layout, fixtures, expectationsSETUP.md — non-obvious environment and initialization stepsRUNBOOK.md — local operational procedure for this folderCHANGELOG.md — user-facing or package-facing release historySECURITY.md — security boundaries, secrets handling, abuse cases, review expectationsOVERVIEW.md — concept-first orientation when a README would become too denseFAQ.md — repeated questions and troubleshootingDECISIONS.md — folder-local decisions that do not justify standalone ADRsDEPENDENCIES.md — dependency map, contracts, and upgrade notesUse the smallest set that makes the folder legible. Do not create files just to satisfy the list.
Treat these as first-class documentation, not miscellaneous meta files:
AGENTS.md — repo operating instructions for agents and contributorsPLAN.md — current execution strategy and orderingSPEC.md — contract, scope, acceptance criteriaSOUL.md — product intent, voice, or qualitative directionPRINCIPLES.md — invariants and non-negotiable rulesDESIGN.md — design system, architecture, UX, or interaction rulesWhen a change affects how the repo is operated, designed, or extended, review these files the same way you would review a README or architecture doc.
Use a runbook when the reader must perform a workflow, not just understand a concept.
runbooks/<workflow>.md for repo-wide or multi-folder processes<folder>/RUNBOOK.md for a folder-local workflow tied to one subsystemPrefer runbooks/ when the workflow spans folders, services, or roles. Do not bury repeatable procedures inside long docs/ pages or unrelated READMEs.
Keep commands copy-pasteable. Prefer concrete checks over narrative explanation.
Borrow the quality bar from mature operational runbooks:
auto-improvecode-documentation defines what good documentation looks like. auto-improve is the mechanism that should tighten documentation that keeps drifting, confusing readers, or missing operational details.
When documentation work reveals repeated gaps, stale instruction files, or recurring workflow confusion:
AGENTS.md, PLAN.md, SPEC.md, SOUL.md, PRINCIPLES.md, DESIGN.md, runbooks/**/*.md, and the in-folder docs above as valid documentation targetscode-documentation defines the doc taxonomy, and auto-improve should harden that same taxonomy automaticallyskills/auto-improve/AGENTS.md, CLAUDE.md, project READMEs, or existing doc conventions.docs/.Good documentation lets the next engineer or agent answer all of these quickly:
Prefer short, high-signal docs over exhaustive prose. If a README becomes dense, split depth into ARCHITECTURE.md, RUNBOOK.md, DECISIONS.md, or docs/.
For Next.js or MDX-heavy repositories, keep using the existing references and templates in this skill:
references/nextjs-doc-conventions.mdreferences/nextjs-code-to-docs-mapping.mdtemplates/nextjs-api-reference.mdxtemplates/nextjs-guide.mdxUse them only when the repo actually follows that MDX documentation style.
Load only what the task needs:
references/documentation-types.md — documentation taxonomy, including root docs and in-folder defaultsreferences/continuous-docs.md — logs, changelogs, inline docs, maintenance cadencereferences/frontend-documentation.md — component, hook, route, and UX-contract docsreferences/one-off-docs.md — ADRs, reports, post-mortems, migrationsreferences/writing-standards.md — tone, structure, anti-patternsreferences/nextjs-doc-conventions.md — MDX conventionsreferences/nextjs-code-to-docs-mapping.md — Next.js source-to-doc mappingtemplates/service-readme.mdtemplates/runbook.mdtemplates/daily-log.mdtemplates/memory-lesson.mdtemplates/memory-fact.mdtemplates/memory-procedure.mdtemplates/memory-fix.mdtemplates/technical-report.mdtemplates/adr.mdtemplates/post-mortem.mdtemplates/nextjs-api-reference.mdxtemplates/nextjs-guide.mdxscripts/find-docs.sh — locate existing docs and recent log destinations before creating new filesdevelopment
Use for frontend engineering work such as components, routes, state management, accessibility, performance, design-system integration, and browser-facing debugging or refactors.
development
This skill should be used when the user asks to write, update, review, scaffold, move, remove, or continuously improve documentation for code, folders, services, repos, workflows, architectural decisions, or operational processes. Trigger for inline docs, `README.md`, `ARCHITECTURE.md`, `TESTS.md`, `SETUP.md`, `RUNBOOK.md`, `CHANGELOG.md`, `SECURITY.md`, `OVERVIEW.md`, `FAQ.md`, `DECISIONS.md`, `DEPENDENCIES.md`, `AGENTS.md`, `PLAN.md`, `SPEC.md`, `SOUL.md`, `PRINCIPLES.md`, `DESIGN.md`, `logs/`, `lessons/`, `items/`, `fixes/`, `audits/`, `raw/`, `plans/`, `specs/`, `sources/`, `lib/`, `references/`, `cookbook/`, `knowledge/`, `runbooks/`, `research/`, `official-documentation/`, `context/`, MDX docs, JSDoc/TSDoc, docstrings, ADRs, post-mortems, migration guides, documentation cleanups, and documentation-impact reviews.
tools
Cross-cloud CLI-first cloud operations for AWS, Azure, and GCP. Use when the assistant needs to identify which cloud provider or multi-cloud estate a repo uses, deploy new resources or services, wire automatic deployments, inventory and optimize infrastructure, or diagnose and repair cloud failures entirely from the terminal, with explicit approval gates for high-cost, destructive, identity-sensitive, or hard-to-reverse changes. Covers AWS Amplify full-stack projects, serverless workloads (Lambda, API Gateway, Step Functions, SAM, CDK), and the full AWS database portfolio (RDS, Aurora, Aurora DSQL, DynamoDB, ElastiCache), as well as deep Azure references for diagnostics, storage, compute, compliance, identity, Foundry, and cross-cloud migrations.
development
Use for backend engineering work such as APIs, services, data models, persistence, queues, caching, auth, background jobs, and server-side debugging or refactors.