writing-for-agents

Write skills, AGENTS.md, and CLAUDE.md documents that agents follow predictably.

2|Updated Oct 16, 2021
One-click install
npx skills add https://github.com/pattobrien/dotfiles --skill writing-for-agents-pattobrien
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: writing-for-agents
Source: https://github.com/pattobrien/dotfiles/tree/main/.agents/skills/writing-for-agents
Command: npx skills add https://github.com/pattobrien/dotfiles --skill writing-for-agents-pattobrien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Documents written for AI agents often produce inconsistent behavior: weak descriptions fail to trigger skills, bloated files bury key steps, and vague completion criteria let agents stop early. This Skill provides a reference of writing techniques that make agent-consumed documents predictable across runs. ## Core Features & Use Cases - Context pointer design: Write skill descriptions and AGENTS.md lines that reliably trigger the right material by front-loading leading words and mapping one trigger per branch. - Information hierarchy guidance: Decide what stays inline as steps or reference versus what gets disclosed behind pointers into separate files, preventing document sprawl. - Completion criteria and splitting: Sharpen step boundaries to prevent premature completion, and split documents by sequence or invocation when the cut earns its context or cognitive load. - Use Case: When authoring a new skill, use this reference to write a description that fires on the right prompts, prune no-op sentences the model already obeys, and consult SKILL-MECHANICS.md for frontmatter and model- versus user-invocation trade-offs. ## Quick Start Use the writing-for-agents skill to review and improve the description and structure of my new skill's SKILL.md file.

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 skill description that triggers reliably?▼

Write the description as a context pointer: front-load the leading word that does the triggering work, list one trigger per genuinely distinct branch, and cut identity the body already carries. Synonyms renaming one branch should be collapsed into a single trigger.

When should I split a skill into multiple files?▼

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. Push reference material into separate files reached by pointers when only some branches need 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: true, so only a human typing its name can reach it, costing zero context load.

How do I prevent agents from finishing steps prematurely?▼

Sharpen the completion criterion first so done is clearly distinguishable from not-done, using checkable and exhaustive conditions. If the bound is irreducibly fuzzy and rushing persists, hide later steps by splitting the sequence across a real context boundary.

When should documentation repeat information from config files?▼

Only when the lookup is expensive or the information is unwritten, such as conventions, rationale, or gotchas no config confesses. Restating one-file or one-command lookups creates a cache that goes stale; leave those to the environment as the source of truth.