habit-hooks-prompting
Write or revise a habit-hooks coaching prompt. Use when a linter / knip / jscpd rule fires and the agent's default fix is wrong…
Write or trim habit-hooks documentation under docs/. Use when creating, editing, reviewing or cutting any doc in this repo — keeps docs user-facing, short, and example-first. Exemplar of a finished cut commit f79594fd.
$ npx -y skills add habit-hooks/habit-hooks --skill writing-docs --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/writing-docsContext preview
The summary Claude sees to decide when to auto-load this skill.
Write or trim habit-hooks documentation under docs/. Use when creating, editing, reviewing or cutting any doc in this repo — keeps docs user-facing, short, and example-first. Exemplar of a finished cut commit f79594fd.
name: writing-docs description: Write or trim habit-hooks documentation under docs/. Use when creating, editing, reviewing or cutting any doc in this repo — keeps docs user-facing, short, and example-first. Exemplar of a finished cut commit f79594fd.
Everything in `docs/` is user-facing: it onboards a user (install → run → interpret output → configure) or a contributor extending the system. Short, extremely clear, executable examples as the main communication device.
The finished-cut exemplar: `git show f79594fd` — `docs/smell-vocabulary.md` went from 211 lines to 13. What survived: the catalogue table, severity semantics, how to propose a smell. What went: per-plugin translation tables, design rationale, edge-case essays.
**Audience and purpose**
**Examples are the message**
**Stays true**
**Length**
**Format**
**Boundaries**
Run these in order, before writing prose or cutting it. A doc that skips a step is why a reader bounces off it (`docs/config.md` before its 2026-09 rework: no audience, no promise, mechanism-named sections).
1. **Decide who the audience is.** One doc, one reader, one job. Signal it by talking to that reader — never announce who the doc is for, and never narrate what the reader just did ("you open this page to…"). 2. **Phrase the reader's expectation on opening it** — one sentence: "I will find out how to disable a rule I don't agree with." If it takes two sentences, the doc has two jobs: split it. 3. **Make the headlines deliver on those expectations.** Name the problem being solved, never the mechanism — not the design name (`## Advanced configuration`) and not the syntax (`[smells.<name>]`): `## Silence or demote a smell`. If a headline can't carry its promise, rename the headline — don't paper over it with a task index. 4. **Make the first paragraph summarise the content and place the doc in context.** The summary itself tells the right reader they are in the right place. 5. **Write each section to deliver on the promise of its headline** — and only that promise. Deliver with executable examples; reference data is a bullet list, `- **key**: description`, never a table and never prose.
Fix structure first with the process (audience → expectation → headlines → first paragraph → sections), then cut prose.
1. Delete every sentence whose absence changes nothing the reader does or understands. 2. Delete state inventories code already answers; link to the truth instead. 3. Move per-plugin detail to the plugin, and mechanism walk-throughs to the doc that owns them. 4. If two distinct readers or jobs remain, split into two docs. 5. Keep: reference tables the reader looks up, acceptance criteria, executable examples.
Check: read only the examples — does the doc still teach its job? Then read the prose; anything the examples already said is gone.
Cross-reference other docs with a link, never a summary.
For every line, ask as the reader with a task in hand, not the writer who wrote it: does the user need this — and is this the one place it is said? Repeated anywhere else, or nothing the user does depends on it → delete.
Intuitive rules (precedence, who-wins) are stated once, at the end, for the reader checking their intuition — never inline at each point of possible conflict.
Examples that demonstrate a default show nothing; the default is already stated. Delete them.
Turn best-practice coding advice into AI habits. Stop reciting software engineering literature to your AI agent.
Write or revise a habit-hooks coaching prompt. Use when a linter / knip / jscpd rule fires and the agent's default fix is wrong…
Spawn a reviewer sub-agent to assess a change set against habit-hooks's coding principles. Use AFTER habit-hooks reports clean —…
Cut a new release of the habit-hooks packages. Use when asked to release, publish, or bump the version. Reviews what lands,…