agentleFS
pecigonzalopecigonzalo/agent-skills/skills/standards-documentation/SKILL.md

standards-documentation

Skill0 starsChanged 4 months agoMITView on GitHub

Use this skill when writing or reviewing READMEs, API references, setup guides, release notes, migration notes, or code comments that need concise structure and conventions, even when the user only asks for a small doc update. Use role-technical-writer when audience or information architecture needs deciding, and standards-markdown for formatting.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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
  1. Distinctive:

    Provides: Document skeletons for the common types, a comment taxonomy, and clarity rules for maintainable technical docs.

    line 8
  2. Distinctive:

    Golden Rule: Document what helps the reader act correctly

    line 12
  3. Distinctive:

    Every documented contract should list inputs, outputs, and errors.

    line 98
  4. Distinctive:

    Add a comment for:

    line 104
  5. Distinctive:

    Do not comment what clear code already says:

    line 120
  6. Distinctive:

    Before finishing documentation work:

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Documentation Standards

Provides: Document skeletons for the common types, a comment taxonomy, and clarity rules for maintainable technical docs.

Quick Reference

Golden Rule: Document what helps the reader act correctly

Document:

  • Purpose, setup, usage, public contracts, and common failure modes
  • Why a non-obvious decision was made
  • Constraints, compatibility notes, and migration steps
  • Known limitations and workarounds, with the reason

Avoid:

  • Restating what the code plainly says
  • Large background sections the reader does not need
  • Stale examples or unverified commands

Principles: Audience first, show rather than tell, keep current


Document Skeletons

Pick the shape that matches the artifact instead of growing a README until it covers everything.

README (orientation and quick start):

# Project name

One or two sentences explaining what this is for.

## Quick start
## Usage
## Development
## Contributing

Guide (task-based procedure):

## Goal
## Prerequisites
## Steps
## Verify
## Troubleshooting

API reference (per endpoint or function):

## Endpoint or function

Purpose, inputs, response or return value, errors, example, compatibility notes.

Decision record or spec:

## Context
## Decision
## Alternatives considered
## Consequences
## Rollout or migration

A guide without a Verify step leaves the reader unsure whether it worked. A decision record without Alternatives considered cannot be revisited later, because the reasoning is gone.


Examples in Docs

Show real usage with expected output, not abstract placeholders:

### POST /api/users

Create a new user.

**Request:**
{ "name": "John", "email": "john@example.com" }

**Response:**
{ "id": "123", "name": "John", "email": "john@example.com" }

**Errors:**
- 400 - Invalid input
- 409 - Email already exists

Every documented contract should list inputs, outputs, and errors. Errors are the part most often omitted and most often needed.


Comments

Add a comment for:

  • Invariants the code relies on but does not state.
  • Workarounds, with the condition for removing them.
  • Surprising side effects or ordering requirements.
  • Links to an external algorithm, spec, ticket, or incident.
// Discount tiers are contractual: Bronze 5%, Silver 10%, Gold 15%.
const discount = getDiscountByTier(customer.tier);

// The upstream API returns null instead of [] on an empty result.
// Remove once vendor ticket SUP-4821 ships.
const items = response.items || [];

Do not comment what clear code already says:

// ❌ Increment i
i++;

// ❌ Get user
const user = getUser();

Checklist

Before finishing documentation work:

  • The reader can tell whether this document applies to them
  • The document uses the skeleton matching its type
  • Commands and examples are current, or explicitly marked unverified
  • Public contracts list inputs, outputs, and errors
  • Comments explain invariants, workarounds, and ordering, not the obvious
  • Every workaround comment states when it can be removed
  • Code changes in this task are reflected in the docs in the same change
  • Terminology is consistent with the surrounding docs

See also

  • Load standards-markdown for the formatting and layout rules.
  • Load role-technical-writer when the audience or information architecture is still undecided.
  • Load standards-api-design when documenting a public or partner contract.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.