documentation
Use when creating, reviewing, or auditing a codebase's documentation — README and docs/ trees, architecture/workflow diagrams, API references, formal doc sites (OpenAPI, MkDocs, Sphinx, ReadTheDocs) — and you need the bar for accessibility (concise synthesis, diagrams where structure beats prose) and accuracy over time (code-cited facts under an explicit maintenance contract).
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- documentation
- metadata
- { "owner": "tze", "status": "active", "authors": [ "tze", "Claude Fable 5" ], "last_reviewed": "2026-06-12" }
- description
- Use when creating, reviewing, or auditing a codebase's documentation — README and docs/ trees, architecture/workflow diagrams, API references, formal doc sites (OpenAPI, MkDocs, Sphinx, ReadTheDocs) — and you need the bar for accessibility (concise synthesis, diagrams where structure beats prose) and accuracy over time (code-cited facts under an explicit maintenance contract).
02 资源文件 1
- 参考文档references/interface-semantics.md3.1 KB
03 SKILL.md 正文
Documentation
Documentation keeps a codebase accessible to reviewers and future maintainers — load-bearing in a spec-driven workflow. Its failure mode is not absence but rot: confident prose no longer matching the code. Hold docs to two standards at once: accessible (newcomer orients in minutes) and maintainable (every claim re-verifiable against code).
Use This Skill When
- Writing or restructuring a project's README, docs/ tree, or doc site
- Reviewing whether a change's documentation is adequate and current
- Auditing existing docs for staleness, missing synthesis, or missing diagrams
- Documenting an interface's behavioral contract — side effects, statefulness, idempotency, failure semantics — in docstrings or endpoint descriptions
- Setting up or judging formal doc tooling (OpenAPI, MkDocs, Sphinx, ReadTheDocs, docstring-generated references)
Do Not Use This Skill For
- Five-pillar knowledge architecture (doctrine, contracts, specs, topology,
standards) —
/th-projects(project-shape). This subskill governs the everyday docs of any repo, shaped or not. - Skill packages — skill-standards
- Code comments — code-readability
Core Rule
Document the contract; cite the code. Every documented fact is a claim about the code: couple it to the location it derives from, and state it at an altitude where only a behavior change — never a behavior-preserving refactor — can falsify it. A doc that cannot be re-verified is already rotting; a doc narrating internals re-rots on every refactor.
The Bar
Cite the item violated, with doc and code evidence:
- A concise synthesis orients first — Top of
README.mdor the docs/ intro states, in a screenful: what the project does, who it is for, goals and non-goals, how the pieces fit. Missing or buried synthesis is the highest-severity finding. - Diagrams wherever structure beats prose — Architecture, happy-path
data flow, error handling, and lifecycle/state each get a diagram when
the project has real structure there. Generate via
excalidraw-diagram; commit
.excalidrawsource plus rendered SVG beside the embedding doc; fall back to Mermaid. Real component and event names — never generic boxes. - Facts carry citations to interface sites — Each claim links the code
making it true (
path/to/file.py:Symbol), anchored at definition and interface sites — module, endpoint handler, schema — never internal call chains. Prefer symbol anchors over line numbers. Uncited claims and stale citations are findings. - Claims survive behavior-preserving refactors — If a behavior-preserving refactor would falsify a claim, it documents internals: raise it to what callers observe, or delete it.
- Public interfaces carry a semantics card — Endpoints, exported
functions, jobs, and CLI commands document side effects, state,
idempotency, failure, and (where it matters) concurrency as a few
labeled lines adjacent to the interface, per
references/interface-semantics.md. - Docs operate under a maintenance contract — The docs entry point
states it: behavior changes update affected docs in the same change
(engineering-bar bias 7); stale claims get
fixed or marked
STALEwith evidence, never left silently. Living catalogs open with their own write-back contract. - Prose earns its place — Types, names, and defaults already document; prose states only what they cannot: semantics, invariants, units, the why. Every doc has a nameable reader and a question it answers — can't name both, delete or merge it.
- Formal doc tooling serves human readers — OpenAPI/MkDocs/Sphinx output is judged as prose: human-written summaries, intent and failure modes, happy-path examples. Schema dumps, empty autogenerated stubs, and boilerplate padding are findings. Concise beats complete.
- Content lives at the right distance — Structure follows the reader's
journey (orient → run → how it works, where diagrams live → change →
reference); placement follows the gradient: semantics at the interface,
architecture in
docs/, synthesis in the README. Wrong-distance and twice-homed content are findings.
Workflow
- Inventory — README, docs/ tree, doc-site config, embedded diagrams; note what is generated and what claims to be current.
- Synthesis first (bar 1) — Draft or fix it before judging anything else; keep it a screenful.
- Diagram pass (bar 2) — List the architecture/data-flow/error-handling shapes the project actually has; generate missing high-value diagrams; embed them where the prose discusses that structure.
- Citation and altitude audit (bars 3–4, 6) — Trace claims to code (all in review scope; a sample in a repo audit); label each cited-and-true, stale, uncited, or wrong-altitude. Fix in scope; add the maintenance contract if absent.
- Semantics-card audit (bar 5) — Each public interface in scope has a card, adjacent to its definition, matching the code. A wrong card is worse than no card.
- Rendered-output pass (bars 7–9) — Read as the intended consumer; flag schema dumps, signature-restating prose, empty stubs, and wrong-distance content; fix what is in scope.
- Verify — Build the doc site (broken builds and dead links are findings); re-read the synthesis end-to-end after edits.
Trigger Sanity Check
- Should trigger: "Document this service so a reviewer can follow the data flow", "audit docs/ for stale claims", "our Sphinx site is a schema dump".
- Should not trigger: "Bootstrap the five-pillar knowledge architecture"
(
/th-projects) or "review this SKILL.md" (skill-standards).
04 同仓库更多 Skills
progress-dashboard
Use when asked to "give this session a dashboard", "show loop progress", "monitor subagents", or "steer this run in a browser": a durable local workspace for current work, findings, agents, measured usage and feedback.
spec-concretization
Use when specs and implementation must be fully reconciled in both directions — code doing things no spec describes, specs requiring things the code doesn't do yet, or the two disagreeing — and the result must land as vision-gated spec updates plus a complete, backlog-deduplicated work plan. Also the read-only audit form ("does code match the spec?"), and re-runs that must not duplicate prior findings. Triggers: "reconcile spec vs implementation", "does code match the spec", "what's implemented but undocumented", "what's specified but not built", "the code is ahead of the spec", "plan the work to finish the spec", "concretize the specs".
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.