agentleFS
pranav8494pranav8494/team-of-agents/skills/document-writer/SKILL.md

document-writer

Skill7 starsChanged 6 months agoMITView on GitHub

Use when writing or improving technical documentation, API references, runbooks, onboarding guides, READMEs, changelogs, ADRs, release notes, or any content that ships to engineers or end users. Also use for structuring documentation sites (MkDocs, Docusaurus) and diagrams-as-code.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use code-review.

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.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

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

    Ask for confirmation: before creating or overwriting any files

    line 23
  2. Distinctive:

    Use this table to determine what to produce for each task type:

    line 30
  3. Distinctive:

    Every document falls into exactly one of four quadrants.

    line 49
  4. Distinctive:

    If the task is outside this skill's scope or you lack the information needed to proceed, return this instead of a confidence signal:

    line 269
  5. Distinctive:

    Do not guess or produce low-quality output to avoid returning BLOCKED.

    line 275

“Common” is measured: kept by at least 6 in 10 of the 3 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.

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

Document Writer

Iron Law

Documentation is a product. Write for the reader, not the writer.
Every API endpoint, CLI flag, and configuration option needs a real, runnable example.
Examples are not optional, they are the most important part of the documentation.

Before Taking Any Action

  1. Announce what you intend to write or change, and for which audience
  2. Clarify the documentation type (tutorial vs. how-to vs. reference vs. explanation) before drafting
  3. Ask for confirmation before creating or overwriting any files
  4. Report what was created, the intended audience, and what still needs review

Task Approach

Use this table to determine what to produce for each task type:

User asks forWhat to produce
API referenceEndpoint-by-endpoint reference using the API Reference template below: method + path, description, headers table, request body with JSON example and field table, all response codes with example bodies
READMEREADME using the structure below: one-sentence purpose, Quick Start (≤5 commands), Installation, Configuration (all options with types/defaults/examples), Usage, Development, Architecture, Contributing, Licence
RunbookStep-by-step response procedure using the Runbook template: purpose, triggering conditions, prerequisites, numbered steps with exact commands and expected output, escalation path, related runbooks
ADRCompleted ADR using the template: status, context (constraints and forces), decision, consequences (positive / negative / neutral)
Changelog entryKeep a Changelog format entries grouped by Added / Changed / Deprecated / Removed / Fixed / Security; each entry is one line with the user-visible change
TutorialStep-by-step learning document classified to Diátaxis Tutorial quadrant: outcome guaranteed by following steps; no explanation mixed in; every command is runnable as written
How-to guideTask-oriented guide classified to Diátaxis How-to quadrant: starts from a working state; addresses a specific real-world goal; no teaching detours
Explanation / concept docConceptual document classified to Diátaxis Explanation quadrant: explores context, trade-offs, history; contains no instructions
Documentation auditGap analysis against the Documentation Quality Checklist; each failing item flagged with the specific problem and a suggested fix
Doc site structureProposed IA with page types labelled by Diátaxis quadrant; navigation hierarchy; cross-link strategy

Diátaxis Framework (Procida)

Every document falls into exactly one of four quadrants. Mixing types in the same document creates confusion, separate them deliberately.

TypeQuestion it answersReader stateKey characteristic
TutorialHow do I learn this?New to the topic; learningStep-by-step; outcome is guaranteed by following the steps; teaching, not explaining
How-to guideHow do I do X?Knows the domain; has a specific goalTask-oriented; starts from a working state; addresses a real-world problem
ReferenceWhat is X?Looking something up; not reading top-to-bottomComplete, accurate, consistent; describes the system as it is
ExplanationWhy does X work this way?Wants to understand, not doConceptual; explores context, trade-offs, history; does not include instructions

Common mistake: mixing how-to steps inside a reference page, or explaining concepts inside a tutorial. Separate them.


Style Rules

RuleWrongCorrect
Active voice"The file can be run with...""Run the file with..."
Imperative mood for instructions"You should install...""Install..."
Second person for user-facing docs"Users must configure...""Configure your..."
Third person for reference"The user can set...""The API accepts..."
Short sentences"The configuration file, which is located in the root directory of the project, must contain the database connection string, the API key, and the environment name.""The configuration file lives in the project root. It must contain three values: the database connection string, the API key, and the environment name."
No jargon without definition"Use the idempotency key""Use the idempotency key, a unique identifier you generate that prevents duplicate operations if the request is retried."
Consistent terminologyMixing "endpoint", "route", "URL", "path"Pick one term per concept and use it throughout

Documentation Templates

ADR (Architecture Decision Record)

# ADR-NNN: [Title]

## Status
[Proposed / Accepted / Superseded by ADR-NNN]

## Context
[What is the situation that forces a decision? What are the constraints?]

## Decision
[What was decided?]

## Consequences
### Positive
- [Benefits this decision enables]
### Negative / Trade-offs
- [Costs and risks this decision introduces]
### Neutral
- [Things that change but are neither positive nor negative]

Runbook

# Runbook: [Alert Name or Operational Procedure]

## Purpose
[What situation does this runbook address?]

## When to use this runbook
[Triggering conditions, alert name, error pattern, user-reported symptom]

## Prerequisites
- [Access / permissions required]
- [Tools required]

## Steps
1. **[Step title]**: [Action with exact command]
   Expected output: `[exact output]`
   If you see X instead: [what to do]

2. **[Step title]**: ...

## Escalation
If the issue is not resolved after [N] minutes, escalate to [team/person] via [channel].

## Related runbooks
- [Links to related runbooks]

API Reference Endpoint

## POST /payments

Creates a new payment. Idempotent with the same `idempotency_key`.

### Request

**Headers**
| Header | Required | Description |
|---|---|---|
| `Authorization` | Yes | Bearer token |
| `Idempotency-Key` | Yes | UUID; retries with the same key return the original response |

**Body**
```json
{
  "amount": 10000,
  "currency": "GBP",
  "recipient_account_id": "acc_abc123"
}
FieldTypeRequiredDescription
amountintegerYesAmount in minor units (pence for GBP)
currencystringYesISO 4217 currency code
recipient_account_idstringYesID of the destination account

Response

201 Created

{ "payment_id": "pay_xyz789", "status": "pending" }

400 Bad Request, invalid input
409 Conflict, idempotency key already used with different parameters
422 Unprocessable Entity, business logic failure (insufficient funds, blocked account)


---

## README Structure

A README is a how-to guide for contributors and consumers of the repository:

```markdown
# Project Name

[One sentence: what does this do and who is it for?]

## Quick Start

[Minimal steps to get something running. Under 5 commands.]

## Installation

[Full setup instructions]

## Configuration

[All config options with types, defaults, and examples]

## Usage

[Common use cases with working examples]

## Development

[How to run tests, lint, build locally]

## Architecture

[Link to detailed architecture docs or a 1-paragraph summary]

## Contributing

[PR process, coding standards link, review process]

## Licence

Changelog Format (Keep a Changelog)

# Changelog

## [Unreleased]

## [1.2.0] - 2025-05-01
### Added
- Payment retry with exponential backoff

### Changed
- `/payments` now requires `Idempotency-Key` header

### Deprecated
- `POST /v1/send`, use `POST /v2/payments` instead; removed in v3.0

### Removed
- `GET /status` endpoint (deprecated since v1.0)

### Fixed
- CLS regression on the transaction history page

### Security
- Upgraded `jackson-databind` to 2.16.1 (CVE-2024-XXXXX)

Documentation Quality Checklist

  • Every code sample is runnable as written (no ... or YOUR_VALUE_HERE without explanation)
  • Every CLI flag/param is documented with type, required/optional, default, and example
  • Error cases are documented (not just the happy path)
  • Document is classified to exactly one Diátaxis type
  • Technical terminology is consistent throughout (no synonym churn)
  • A new reader could complete the stated goal without asking for help
  • "Next steps" or "related" section points readers where to go after this document

Output Protocol

End every response with a confidence signal on its own line:

CONFIDENCE: [High|Medium|Low], [one-line reason]
  • High, output is complete, correct, and based on sufficient context
  • Medium, output is reasonable but contains an assumption or a gap; state the assumption inline
  • Low, insufficient context to produce a reliable result; state what is missing

If the task is outside this skill's scope or you lack the information needed to proceed, return this instead of a confidence signal:

BLOCKED: [reason], [what information would unblock this]

Do not guess or produce low-quality output to avoid returning BLOCKED. A precise BLOCKED is more useful than a low-confidence guess.

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.