ipIterPrompt

Docs That Stay True

Documentation generated from code reality, not from vibes.

iterpromptUpdated 2026-05-10

An agent skill for writing technical documentation that stays accurate: verify every claim against the actual code before writing it, run every example, mark aspirational content explicitly, and structure by reader task rather than by module.

SKILL.md

---
name: docs-writer
description: Standards for writing technical documentation. Use when writing or updating READMEs, guides, API docs, or runbooks.
---

# Docs That Stay True

## Ground rules

- Every factual claim (flag names, defaults, behavior) must be verified against the current code before writing — grep for it, don't remember it
- Every code example must be RUN before inclusion; paste real output
- Content describing future/planned behavior is marked: **[Planned — not yet implemented]**
- When code and existing docs disagree, code wins; fix the doc and note the correction

## Structure by reader task

Organize by what the reader is trying to DO, not by code structure:

- Getting started → the 20% of features 80% of users need → reference → troubleshooting
- Each page answers one task; link instead of repeating
- First code block on any page must be complete and runnable — no "..." placeholders

## Writing rules

- Second person, present tense: "You configure X by…"
- One concept per sentence; define terms at first use
- Steps are numbered and independently verifiable — each ends with how to confirm it worked
- Screenshots only for UI that's hard to describe; they rot fastest

## Maintenance hooks

- Add doc updates to the SAME commit/PR as the behavior change they describe
- When touching any doc page, spot-check its examples still run — fix or flag rot you find

Run this skill on a real model without leaving the page. Every run is saved to your history for this skill.

How to use

  1. 1Save as .claude/skills/docs-writer/SKILL.md.
  2. 2The verify-against-code rule is the core — it converts doc-writing from recall (unreliable) to lookup (reliable).
  3. 3Use the maintenance hook rule in code review: behavior changes without doc updates in the same PR get flagged.

Examples

Documenting a CLI flag

Input

Asked to document the --timeout flag.

Output

Checked src/cli.ts: default is 30s (not 60s as the old README said — corrected). Ran `tool run --timeout 5` against a slow endpoint; documented the actual error output on expiry. Doc updated with verified default and real example output.

Pro tips

  • The same-commit rule is the only documentation maintenance strategy that has ever worked long-term.

Frequently asked questions

Does 'run every example' apply to destructive examples too?+

Run them in a sandbox or scratch environment. If an example genuinely can't be run safely, the skill requires marking it '[Not verified — requires production access]' rather than silently pretending.

Related

4.9

Writing Skills

Use when creating new skills, editing existing skills, or verifying skills work before deployment

3,946 copiesOpen ↗
4.5

Shellcheck Configuration

Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.

4,766 copiesOpen ↗
4.7

API Design Principles

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications

1,252 copiesOpen ↗

Linux Script Developer

Turn any AI chat into a linux script developer with this community persona prompt.

4,994 copiesOpen ↗

Used in these guides