document

Generate source-backed package READMEs and durable architecture documentation from code evidence.

4|1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/alvis/.agents --skill document-alvis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: document
Source: https://github.com/alvis/.agents/tree/main/plugins/coding/skills/document
Command: npx skills add https://github.com/alvis/.agents --skill document-alvis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Package documentation drifts out of sync with code, and architecture overviews are often missing or invented rather than grounded in the actual source. This Skill produces README and docs/architecture content where every claim traces back to package metadata, exports, entry points, scripts, configuration, or tests. ## Core Features & Use Cases - Source-backed README authoring: Creates or refreshes a package readme.md covering audience, installation, quick start, public API, and configuration, with every claim verified against code. - Durable architecture documentation: Generates docs/architecture/<slug>.md files with module topology, data flow, state lifecycle, design patterns, invariants, and Mermaid diagrams, using bundled templates and archetype examples for libraries, CLIs, services, IaC stacks, and monorepos. - Evidence-map verification: Builds an evidence map before drafting, executes documented examples where safe, checks TOC display width via a script, and runs a self-review audit checklist with optional independent read-only review. - Use Case: After refactoring a TypeScript CLI package, invoke the Skill to realign its README with the new exports and produce an architecture document showing the parse-rule-report pipeline, verified against the actual source tree. ## Quick Start Ask the agent to document the current package, for example: regenerate the README and add an architecture overview for this package based on its source code.

Frequently Asked Questions about document

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate architecture documentation for a TypeScript package?

Invoke the document skill on the package root; it classifies the archetype, builds an evidence map from exports and source modules, then writes docs/architecture/<slug>.md with module topology, data flow, and invariants sections. Every claim is verified against the actual code before drafting.

How do I update a stale README after code changes?

Run the document skill against the package; it re-derives the evidence map from current metadata, exports, scripts, and tests, then integrates updates into the existing README sections while preserving the document's voice. Unsupported or stale claims are removed during the audit pass.

Can this skill write product specifications or Notion pages?

No. The skill explicitly rejects product specifications and Notion documentation, routing those to specification skills instead. It owns only package readme.md content and durable docs/architecture/*.md artifacts.

When is an architecture document created versus skipped?

An architecture doc is created when explicitly requested or when the package has multiple entry points, cross-process data flow, meaningful dependency layering, or at least three cooperating components unclear from the README. Simple packages skip it via --no-architecture or --readme-only.

Does the skill work in a monorepo with multiple packages?

Yes. It resolves the target package from the working directory, an explicit --project flag, or the nearest manifest, and documents only the selected package unless the selector is the workspace root. Monorepo architecture can be split into per-subsystem documents.

Why does the skill refuse to document certain API behavior?

It never invents API behavior: every documented export, command, path, and dependency must trace to package metadata, source, or tests. If evidence is missing or the source is unreadable, it reports the gap instead of fabricating content.