writing-for-agents

Guides writing skills, AGENTS.md, and CLAUDE.md documents for agent consumption.

243k|20.6k|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/mattpocock/skills --skill writing-for-agents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-for-agents
Source: https://github.com/mattpocock/skills/tree/main/skills/productivity/writing-for-agents
Command: npx skills add https://github.com/mattpocock/skills --skill writing-for-agents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Documents written for AI agents often fail unpredictably: bloated files dilute attention, weak descriptions never trigger, and vague completion criteria let agents stop early. This Skill provides a reference of writing principles that make agent-consumed documents behave consistently across runs.

Core Features & Use Cases

  • Context pointer design: Rules for writing skill descriptions and AGENTS.md lines that reliably trigger the right material at the right branch.
  • Information hierarchy: A ladder model (in-file steps, in-file reference, disclosed reference) for deciding what to inline versus push behind a pointer.
  • Completion criteria and pruning: Techniques for sharpening step boundaries, eliminating duplication, no-op sentences, and stale sediment in long-lived documents.
  • Use Case: When authoring a new skill or editing CLAUDE.md, consult this reference to decide frontmatter invocation mode, split documents by sequence or branch, and replace restated phrases with leading words.

Quick Start

Ask the agent to review your draft skill or AGENTS.md file using the writing-for-agents principles and suggest specific edits.

Frequently Asked Questions about writing-for-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a good skill description for an AI agent?

Front-load the leading word that triggers the skill, list one trigger per distinct branch the document handles, and cut any identity the body already carries. Every word of an always-loaded description costs context on every turn, so prune it harder than the body.

When should I split a skill into multiple documents?

Split by sequence when visible later steps tempt the agent to rush the current one, and split by invocation when a distinct trigger word should fire a skill on its own. Each split spends context or cognitive load, so the cut must earn it.

What is the difference between model-invoked and user-invoked skills?

A model-invoked skill keeps a description so the agent and other skills can fire it autonomously, paying permanent context load. A user-invoked skill sets disable-model-invocation so only a human typing its name can reach it, costing zero context but requiring the human to remember it exists.

Should I put reference material in AGENTS.md or a separate file?

Inline what every branch needs and push material only some branches reach into a separate file behind a context pointer. This progressive disclosure keeps the top-level document legible while detailed reference loads only when the pointer fires.

Why does my agent stop a task before finishing it?

Premature completion happens when a step's completion criterion is vague and later steps are visible, pulling attention toward being done. Sharpen the criterion's bound first; only hide later steps across a real context boundary if the rush persists.