writing-for-agents

writing-for-agents is a skill for Claude Code, Codex from aethrox/doctrine. It costs 67 tokens per session (1,038 once invoked), scanned A, original, MIT.

A writing guide for documents that AI agents read, such as skills and project instruction files.

In plain words
What is it for?
Use it when creating or editing skills, AGENTS.md files, CLAUDE.md files, or linked documentation for coding agents.
Why use it?
It helps keep executable steps, factual reference information, and explanations separate so agents can find and follow instructions reliably.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the doctrine plugin — 33 skills shipped together

Good fit Use it when creating or editing skills, AGENTS.md files, CLAUDE.md files, or linked documentation for coding agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aethrox/doctrine/writing-for-agents
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aethrox/doctrine --skill writing-for-agents
Clone the repo
git clone --depth 1 https://github.com/aethrox/doctrine

Made for: Claude Code, Codex.

Or install doctrine, the plugin that ships this one along with the rest of its 33 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-for-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/aethrox/doctrine/writing-for-agents/github.svg)](https://agentmods.dev/skills/aethrox/doctrine/writing-for-agents)
Your own site
<a href="https://agentmods.dev/skills/aethrox/doctrine/writing-for-agents"><img src="https://agentmods.dev/badge/skills/aethrox/doctrine/writing-for-agents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-for-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/aethrox/doctrine/writing-for-agents"><img src="https://agentmods.dev/badge/skills/aethrox/doctrine/writing-for-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01038
Opus 5 $0.00034 $0.00519
Sonnet 5 $0.00013 $0.00208
Haiku 4.5 $0.00007 $0.00104

Measured 9d ago against content hash 4952ee48302d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

writing-for-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/writing-for-agents/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Writing for Agents

A document a human reads and a document an agent re-reads on every invocation serve different needs, and the mismatch is where most skill docs go wrong. This skill's defining constraint adapts Diátaxis (the four-way documentation framework (tutorial, how-to, reference, explanation)) to that difference: an agent almost never needs a tutorial (a guided first-exposure experience; the agent isn't building lasting comprehension across sessions the way a human learner is), so a document written for an agent should be built almost entirely from how-to (the steps it executes) and reference (facts it consults on demand), with explanation (the "why") minimized or relocated to where a human maintainer, not the executing agent, will actually read it.

Phase 1: Classify before writing

Before adding a line, decide which Diátaxis quadrant it belongs to:

  • How-to: an ordered action the agent takes. This is the spine of most skill documents.
  • Reference: a fact, definition, or rule consulted on demand, not read top to bottom (a table of standards, a checklist of criteria).
  • Explanation: the reasoning behind a choice, useful for understanding why, not for knowing what to do.
  • Tutorial: a guided first-exposure walkthrough. Almost never belongs in an agent-facing document: see Phase 4.

Content of one kind buried inside another is where documents go stale and hard to maintain: an explanation sitting mid-procedure reads like a step, and an agent that treats it as one either stalls or improvises past it.

Phase 2: Write the how-to as the spine

The numbered phases or steps are what the agent actually executes, in order, each ending on a condition clear enough to tell done from not-done. This is the tier that earns the top of the document; everything else exists to support it, not to compete with it for attention. Write generated prose without em dashes, using a comma, colon, period, or a reworded sentence instead.

Phase 3: Push reference behind structure, not narrative

Read the full file on GitHub · 44 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 44 lines · 67 tokens per session scan A 4952ee48302d

Subscribe to this mod's changes

writing-for-agents is a skill published in the GitHub repository aethrox/doctrine (18 stars, last pushed 28d ago), licensed MIT. It adds 67 tokens to every session and 1,038 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

openspec-verify-change

Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.

Fission-AI/OpenSpec · 32 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agentinsightsissue entities, then fills the gaps with list (filters, sort, a time…

comet-ml/opik-mcp · 174 tokens

qa-knowledge

To run QA engineering — requirements/gap analysis, scenario & spec design, test implementation, failure triage — over the QA knowledge base.

griddynamics/rosetta · 32 tokens

ue-mcp-epic-routing

Use when deciding between ue-mcp's native category actions and Epic's wrapped ToolsetRegistry tools (the epic actions, incl. the Blueprint graph DSL) for a task in Unreal. Pulls in when authoring Blueprint graph bodies, or any time both a native action and an epic action could do the job and you need to pick.

db-lyon/ue-mcp · 81 tokens