documentation
Skill66 starsChanged 5 months agoMITView on GitHub
Use when shipping features with public interfaces that lack docs, generating documentation, updating README files, writing API docs, creating architecture documentation, or when documentation is incomplete or outdated. Also use when adding breaking changes, implementing complex algorithms, or before shipping any phase — if a public function lacks a docstring, this skill applies.
58 other projects use a version of this.
Adopted by
Most recently taken up by
- paruff/uFawkesAItheir own version, first seen Oct 3, 2026
- shortcuts/dotfilestheir own version, first seen Oct 2, 2026
- fabiandistler/agentstheir own version, first seen Sep 30, 2026
- microsoft/hve-coretheir own version, first seen Sep 29, 2026
- DepressionCenter/extractiumtheir own version, first seen Sep 29, 2026
- YLfjuk/skillstheir own version, first seen Sep 28, 2026
Used with
Projects with it also use refactoring, typescript and 9 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.
pproencaSkillrefactoring
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Also in 8 projects that use this
MicrosoftSkilltypescript
Use this guide when working on TypeScript changes in the FAST monorepo — authoring Web Components, writing templates and styles, working with the observable/reactive system, and testing.
Also in 5 projects that use this
VercelSkilloauth
Configure OAuth providers (Google, Apple, Microsoft, Facebook, GitHub, etc.) to work with portless local dev URLs. Use when setting up OAuth redirect URIs, fixing "redirect_uri_mismatch" or "invalid redirect" errors, configuring sign-in providers for local development, or when a provider rejects .localhost subdomains. Triggers include "OAuth not working with portless", "redirect URI mismatch", "Google/Apple/Microsoft sign-in fails locally", "configure OAuth for local dev", or any task involving OAuth callback URLs with portless domains.
Also in 3 projects that use this
MicrosoftSkillrust
Use this guide when working on Rust changes in the FAST monorepo.
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 10 projects that use this
Other versions58 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 58
- anthropics/knowledge-work-plugins★ 26ksame name
- microsoft/fast★ 9.7ksame name
- mufeedvh/code2prompt★ 7.7ksame name
- github/gh-aw★ 5.3ksame name
- mcollina/skills★ 1.9ksame name
- microsoft/hve-core★ 1.5ksame name
- microsoft/wassette★ 957same name
- griddynamics/rosetta★ 352same name
- extra-org/extra★ 113same name
- natnew/Awesome-Prompt-Engineering★ 113same name
48 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-simplificationSkill
- git-workflowSkill
- import-spec-fileSkill
- import-specSkill
- infrastructure-validationSkill
- lessons-learnedSkill
- parallel-dispatchSkill
- security-auditSkill
- shipyard-brainstormingSkill
- shipyard-debuggingSkill
- shipyard-executing-plansSkill
- shipyard-handoffSkill
- shipyard-tddSkill
- shipyard-testingSkill
- shipyard-verificationSkill
- shipyard-writing-plansSkill
- shipyard-writing-skillsSkill
- using-shipyardSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 26 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 52 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
After implementing new features with public interfaces
- Distinctive: line 15
When making breaking changes
- Distinctive: line 16
When adding complex algorithms or business logic
- Distinctive: line 17
Before shipping a phase or milestone
- Distinctive: line 18
When documentation is flagged as incomplete
- Distinctive: line 19
When conversation mentions: document, README, API docs, changelog
- Distinctive: line 43
Document non-obvious code for developers reading the implementation.
- Distinctive: line 54
Read the function/class from the consumer's perspective
- Distinctive: line 55
Ask: "Would a senior dev understand WHY this exists?" If no, add a comment
- Distinctive: line 69
Document return values and all error conditions
- Distinctive: line 70
Write at least one realistic example per function
- Distinctive: line 72
Run every example to verify it works
- Distinctive: line 97
Document data flow: where data enters, how it transforms, where it exits
- Distinctive: line 100
Document deployment topology (single box, microservices, cloud regions)
- Distinctive: line 133
Write steps numbered sequentially — one action per step
- Distinctive: line 135
Add a "What if it fails?" section for common errors
- Distinctive: line 136
Test the guide yourself from scratch
- Distinctive: line 181
Not for "simple" functions
- Distinctive: line 182
Not for "internal-but-public" interfaces
- Distinctive: line 183
Not for "obvious" parameter names
- Distinctive: line 184
Not for "we'll add docs later"
- Distinctive: line 188
Write for the intended audience.
- Distinctive: line 189
Document actual behavior, not intended behavior
- Distinctive: line 190
Verify code samples compile/run
- Distinctive: line 192
Update docs in the same commit as code changes
- Distinctive: line 199
Stop and fix before shipping:
“Common” is measured: kept by at least 6 in 10 of the 52 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.
Files
<!-- TOKEN BUDGET: 290 lines / ~870 tokens -->Documentation Generation
<activation>When to Use
- After implementing new features with public interfaces
- When making breaking changes
- When adding complex algorithms or business logic
- Before shipping a phase or milestone
- When documentation is flagged as incomplete
- When conversation mentions: document, README, API docs, changelog
Natural Language Triggers
- "document this", "write docs", "update README", "API docs", "needs documentation"
</activation>When NOT to Use
- Internal helper functions not part of any public interface
- Generated code (auto-generated files, protobuf outputs, migrations)
- Throwaway prototypes, scripts, or spike code
- Trivial one-liners where the code IS the documentation
Generate accurate, useful documentation that serves its audience. API docs for developers, guides for users, architecture docs for maintainers.
The documenter agent references this skill for systematic documentation generation.
<instructions>Documentation Types
1. Code Documentation (Inline)
Document non-obvious code for developers reading the implementation.
What to document:
- Complex algorithms and business logic
- Non-obvious design decisions
- Workarounds and edge cases
- Performance considerations
What NOT to document: Anything a competent developer can understand by reading the code itself.
HOW — step by step:
- Read the function/class from the consumer's perspective
- Ask: "Would a senior dev understand WHY this exists?" If no, add a comment
- For public functions: write docstring with parameters, returns, exceptions, and at least one example
- For classes: write purpose + responsibilities in one paragraph
- For modules: write one-line overview at the top
Format: Docstrings with parameters, returns, exceptions, and examples for functions. Purpose and responsibilities for classes. Overview for modules.
2. API Documentation
Help developers use public interfaces correctly.
HOW — step by step:
- List every public endpoint/function in the module
- For each: write description (one sentence max), then parameters with types + constraints
- Document return values and all error conditions
- Write at least one realistic example per function
- For HTTP APIs: add authentication/authorization requirements
- Run every example to verify it works
Per endpoint/function:
- Description (one sentence)
- Parameters with types and constraints
- Return values
- Error conditions
- At least one realistic example
- Authentication/authorization requirements (for APIs)
Checklist:
- All public functions/endpoints documented
- Parameter types and constraints specified
- Return values described
- Error conditions documented
- At least one example per function
- Auth requirements noted for HTTP APIs
3. Architecture Documentation
Help developers understand system design and make consistent changes.
HOW — step by step:
- Draw (or describe) the component diagram first — boxes and arrows
- For each component: one sentence on what it does, one on what it does NOT do
- Document data flow: where data enters, how it transforms, where it exits
- For each key design decision: record the decision, why it was chosen, alternatives rejected
- List all external dependencies with version constraints
- Document deployment topology (single box, microservices, cloud regions)
Architecture doc example:
## Components
| Component | Responsibility | Does NOT handle |
|-----------|---------------|-----------------|
| API Gateway | Route requests, auth validation | Business logic |
| User Service | CRUD user accounts | Billing, permissions |
| Notification Worker | Send emails/SMS async | Template rendering |
## Key Decision: Event-Driven vs. Synchronous
**Decision:** Use async events for cross-service communication
**Rationale:** Decouples services; allows independent scaling
**Rejected:** Direct HTTP calls — too much coupling, cascading failuresChecklist:
- System overview exists
- Component responsibilities documented
- Data flow explained
- Design decisions recorded with rationale
4. User Documentation
Help end-users accomplish tasks.
HOW — step by step:
- Identify the user's goal (not the feature name)
- List prerequisites (what must already be installed/configured)
- Write steps numbered sequentially — one action per step
- Show expected output after each step
- Add a "What if it fails?" section for common errors
- Test the guide yourself from scratch
User guide example:
## How to Set Up Webhook Notifications
**Prerequisites:** Admin account, HTTPS endpoint that accepts POST requests
1. Go to Settings → Integrations → Webhooks
2. Click **Add Webhook**
3. Enter your endpoint URL (must start with `https://`)
4. Select events to subscribe to (e.g., `user.created`, `order.paid`)
5. Click **Save** — a test ping is sent to your endpoint immediately
**Expected:** Your endpoint receives a `POST` with `{"event": "test.ping"}`
**If it fails:** Check that your endpoint returns HTTP 200. Non-200 responses
are retried 3 times then marked failed.Types:
- Getting Started: Installation, first-run config, hello world, next steps
- How-To Guides: Goal-oriented, step-by-step, prerequisites, expected outcome
- Tutorials: Learning-oriented, guided, explains why not just how
- Reference: CLI commands, config options, env vars, troubleshooting
Checklist:
- Installation/setup instructions complete
- Getting started guide exists and works
- Major features have how-to guides
- Configuration options documented
- Troubleshooting section exists
</instructions><rules>Iron Law
NEVER SHIP A PUBLIC API WITHOUT DOCSTRINGSNo exceptions:
- Not for "simple" functions
- Not for "internal-but-public" interfaces
- Not for "obvious" parameter names
- Not for "we'll add docs later"
Quality Standards
- Write for the intended audience; define jargon on first use
- Document actual behavior, not intended behavior
- Verify code samples compile/run
- 100% of public APIs documented; breaking changes have migration paths
- Update docs in the same commit as code changes
- Remove deprecated documentation
Spirit vs. Letter: Technically having a docstring that says "Creates a user" satisfies the letter but violates the spirit. Documentation must enable a developer to use the interface without reading the implementation.
Red Flags
Stop and fix before shipping:
- Public function with no docstring, or docstring that only restates the function name
- Example code that throws an error when run
TODO:inside documentation ("TODO: document this parameter")- Architecture doc that records WHAT was decided but not WHY
- User guide with steps but no expected output
AI-Specific Documentation Pitfalls
| Pitfall | Example | Fix |
| Over-commenting obvious code | x += 1 # increment x | Delete the comment |
| Redundant docstrings | def get_user(): → """Gets a user.""" | Add args, returns, raises, example |
| Missing "why" | Documents WHAT the code does, not WHY | Add rationale for non-obvious choices |
| Hallucinated examples | Example calls function with wrong signature | Run every example before committing |
| Template docs | Copies docstring structure without real content | Verify every field has actual values |
Rationalization Prevention
| Excuse | Reality |
| "It's obvious from the name" | Obvious names still need types, return values, and error conditions |
| "We'll document it later" | "Later" becomes "never" once the team moves on |
| "Only internal use" | Internal APIs become public APIs when the team grows |
| "The tests serve as docs" | Tests cover inputs/outputs; docs explain purpose and constraints |
| "Too busy right now" | Undocumented APIs cost more time in support and onboarding |
| "AI can read the code" | Future AI instances still benefit from documented intent and rationale |
Anti-Patterns
- Documenting the obvious (
x = 5 # set x to 5) - Duplicating information across files
- Including example code that doesn't work
- Letting docs drift from code
- Writing novels when a sentence suffices
</rules><examples>Documentation Output Examples
Good: Inline code comment -- explains the "why"
# Cache invalidation here because user permissions
# affect multiple downstream services. Without this,
# stale permissions persist for up to 5 minutes (TTL).
invalidate_permission_cache(user.id)Bad: Inline code comment -- restates the "what"
x = x + 1 # increment x by 1Good: API function docstring -- complete, has example
def create_user(name: str, email: str, role: str = "viewer") -> User:
"""Create a new user account.
Args:
name: Display name (1-100 characters).
email: Must be unique across all accounts.
role: One of "viewer", "editor", "admin". Defaults to "viewer".
Returns:
The newly created User object with generated ID.
Raises:
DuplicateEmailError: If email is already registered.
Example:
user = create_user("Alice", "alice@example.com", role="editor")
"""Bad: API function docstring -- no types, no detail
def create_user(name, email, role="viewer"):
"""Creates a user."""</examples>Integration
Called by: shipyard:documenter — when generating phase documentation Pairs with: shipyard:shipyard-verification — documentation completeness is part of "done" Pairs with: shipyard:code-simplification — clear code needs less documentation Leads to: shipyard:lessons-learned — after documentation is complete, capture what was learned
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
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.

