/docs-hygiene:write-for-agents [<file or section being written>]from docs-hygiene
Writes and trims agent-consumed markdown files like CLAUDE.md, AGENTS.md, and .claude/rules. Activates when editing or creating files that agents read, ensuring concise, budget-aware instructions.
Ships in docs-hygiene. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The docs-hygiene siblings audit docs that already exist. This skill is the write-side complement:
it fires while the doc is written, so the problems the audits catch are never created. Its scope
is any markdown an agent will consume; the auto-read surfaces (CLAUDE.md scopes, .claude/rules,
auto-memory, and their kin) are the high-value core because their cost recurs every session. Read
reference/agent-doc-surfaces.md when you need to know
whether, when, and how much of a target file the harness loads. Write differently for an
always-loaded surface than for an on-demand one.
Every line spends two budgets, and cutting one can overspend the other:
Fewer words spends less of both. The universal brevity rules apply: no more words than the meaning
needs, no filler, hedging, intensifiers, expletive openings, or restatement of an adjacent line;
active voice; one idea per sentence; a factual register with nothing sold. /writing:be-concise (if enabled)
owns those rules; without it, apply them from this
paragraph. Take those rules and no more of that doctrine: its human-only rules do not transfer. A
bottom-line-first opening, headings written to be skimmed, bullet lists for scanning, and bounded
bold serve a person moving down a page fast; an agent needs the rule stated where it applies, not
staged for a skim.
Three vehicles shape the system prompt: a subagent definition's body, an output style, and the
launch flags that replace or append to it (--system-prompt, --append-system-prompt, and their
-file forms). Write CLAUDE.md files, rules, and skill bodies as instructions read in the
conversation, not as system prompt, stating the rule, its scope, and its reason. A rule that must hold at system-prompt level goes in a subagent body, an output
style, or a launch flag.
A pointer is a routing instruction: the reader decides from the pointer text alone whether to follow it, without opening the target.
harness-memory:audit's C5 fix guidance, if that
plugin is enabled.)/doctor trim in
my CLAUDE.md is too large.The sibling audit skill owns the full pointer-quality criteria. Invoke
/docs-hygiene:audit-progressive-disclosure via the Skill tool to grade a draft against them,
rather than failing them at audit time.
Steps are read in order and executed; reference is jumped into and queried. Mixing them hurts both: lookup tables interrupt a procedure's thread, and reference buried in a procedure is unfindable.
A step is done when its criterion says so, not when text resembling the step has been produced.
A task-shaped or long-run instruction also names the whole task's finish line and its stops:
When one doc serves two moments in time, split it at the moment boundary: the reader at step one should not scroll past material for step nine. Splitting an instruction surface into skills with different invocation modes is a different axis with its own decision rubric: follow the invocation-mode rubric (§ Splitting by invocation) rather than deciding it ad hoc.
Write what to do, not what to avoid: a prohibition drags the banned behavior into context, and pretrained leading words are the compact anchors that steer ("Prefer X" over "Never do Y unless"). Keep a negation only when the positive form genuinely loses the constraint, and state the positive alternative in the same sentence. A design exclusion is the exception that stays negative: name the specific styles to leave out ("no hero banner, no pill-shaped buttons"), since "avoid a generic look" swaps one default for another.
Ask for outcomes, not thinking. Whether a "think carefully" line helps depends on the target model,
so follow /harness-config:audit-instructions (if enabled) criterion I8-f for the model the text will run on.
A line telling the model to think less or
not at all is I8-c's, scoped per model the same way. Never ask the model to show or reproduce
its reasoning in the reply, which some models decline; ask for what the reader needs, such as the
rationale in two or three sentences or the evidence as a list.
Words like "reasonably", "tasteful" and "where appropriate" are too soft to force the agent to follow them, so it falls back to its defaults: those sentences don't change behavior. State the condition or the boundary instead, which narrows the answers the agent has to choose from. State a number only where the requirement itself fixes one (a field limit, a count a parser checks), not as a cap on prose length. An example of the form:
Bad: Keep the summary reasonably short and mention the tests where appropriate.
Good: The summary says what changed and why, and nothing else. Name each test command you ran
with its pass and fail counts.
Strict means precise, not loud. State each rule in plain words with its scope and reason, and
write no all-caps and no marker words (IMPORTANT, MUST, NEVER, ALWAYS, CRITICAL) to make
it stick. A plain firm word (never, always) stays when the sentence gives the rule's scope and
reason. For a rule that must hold every time, name the call /corrections:codify "<the rule>" (if enabled)
for the user; this skill does not build the mechanism. When /corrections:codify (if enabled) is among the
available skills, hand it the choice of mechanism; it picks the strongest rung of the enforcement
ladder that can decide the rule and proves the check. Otherwise, propose the strongest mechanism
that can decide the rule: a change that makes the mistake impossible first, then a check that
blocks it, then a test, and an instruction only when nothing a machine runs can decide it. Say
that the corrections plugin was not available, so the proposal is unproven. A line that keeps
getting missed means the file needs to be shorter. Bold is structure only: a list-item label
or a defined term at its first use, never a whole sentence or a rule.
Pointer: skill-creator, How to think about improvements.
Pointer: Claude Code best practices, What you can stop doing.
A leading word is a compact concept the model already holds from pretraining, repeated as a token and never re-explained, so it anchors a region of behavior in few tokens.
Run it sentence by sentence. An instruction the model already follows by default spends load and says nothing. Running the document, not debate, settles whether a sentence changes behavior. Delete a failing sentence whole. A word too weak to beat the default is a no-op too; the fix is a stronger word: a more precise one, and a firm one only for a hard limit (Be strict with precise words).
init commandA request for a CLAUDE.md in a repository that has none can reach either surface.
init (built-in command): generates a starter CLAUDE.md from the codebase and writes it.
The model and the person can both invoke it (record).Routing: when the built-in init command resolves in this session and the repository has no
CLAUDE.md or AGENTS.md, or the request is a CLAUDE.md from scratch, run /init first, then trim
what it wrote with this skill. Every other write or trim stays here.
Mutation gate: /init writes project files. Run it only for a from-scratch request, never
over an existing CLAUDE.md or AGENTS.md unless the person asks. Records:
reference/native-init.md.
/playbooks:skill-authoring (if enabled) territory (description shape
and caps: ## Descriptions; body size: ## Body), enforced by /skill-quality:check (if enabled). Prose
inside an already-authored SKILL.md is still this skill's, since a SKILL.md is agent-consumed
markdown. The boundary is authorship against wording, not a whole file this skill may not look
at; read otherwise, the largest agent-facing surface most repos have is governed by no
authoring doctrine at all.docs-hygiene:write-for-humans, which fires at this same moment and resolves the consuming
project's own style guide first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub melodic-software/claude-code-plugins --plugin docs-hygiene10 skills in this plugin
/audit-derivabilityAudit derivabilityRead-only audit of whether a doc earns its existence or an agent can re-derive it from code, config, and structure: verdict per file (delete, convert-to-pointer, keep-as-derivation-cache, keep-owns-facts). Use when: 'is this doc worth keeping', 'audit doc value', 'prune redundant docs', or derivability. Not for noise: /docs-hygiene:audit-noise. Load it before judging whether a doc should stay or go./audit-encapsulationAudit encapsulationAudit skill encapsulation and boundary leak where external citation reaches private skill surface (.claude/skills/X/, plugins/*/skills/X/) beyond slash invocation; read-only, explicit fix FILE:LINE. Use when 'audit encapsulation', 'find skill leaks', 'check skill boundaries', skill boundary violation, reaching into SKILL, API drift, refactor skill. Load it to ask what depends on another plugin's internals. Load it too before publishing plugins as separate installs./audit-noiseAudit noiseRead-only audit of tracked markdown (rule/skill/convention doc) for nine noise shapes: stale historical citation, ghost ref, preamble, tracker back-ref, negation without positive, conversational residue. Use when 'audit markdown noise', 'find ghost refs', 'declutter', sweep for noise. Not for code comments: /code-tidying:remove-comments. Load it before listing a doc's leftover lines to cut before sharing it./audit-progressive-disclosureAudit progressive disclosureRead-only progressive-disclosure audit of agent instruction markdown: grades file and context loading across always-loaded, invocation-loaded, on-demand tiers; flags split, hub-and-spoke, disclosure defect. Use when 'progressive disclosure', 'split this file', 'too much context'. Not for noise: /docs-hygiene:audit-noise; QA: /skill-quality:check. Load it before advising what in a CLAUDE.md or rule stays loaded./compressCompress markdown (drop filler/hedging; keep directives, thresholds, examples; articles per compress_articles) with semantic-diff revert guard; default, audit/compare (read-only). Use when 'compress this doc', 'tighten markdown', 'cut prose'. Not for compaction: /compact, noise: /docs-hygiene:audit-noise, or SSOT: /docs-hygiene:extract-ssot./extract-ssotExtract SSOTDeduplicate repeated markdown (rule files, skill bodies, ADRs, docs) into one source of truth, migrating call sites to cite it by exact heading; below Rule of Three, offers non-abstracting remedies and refuses a new SSOT artifact. Use when prose, literals, or concepts recur: 'DRY this prose', 'extract a shared rule', 'single source of truth for X'. Load it before planning one place for text copied into files. Load it too when a rule pasted into several files should change in one place, or a user proposes a new shared file for it.Other plugins' skills for the same job