Agents & MCP
The complete craft guide for SKILL.md files seeded from this repo's AGENTS.md: the four sections every skill needs, how to write a trigger an agent will actually match, what the pitfalls section is really for, and the signs a skill is complete vs still a draft.
2 files
Description
The complete craft guide for SKILL.md files seeded from this repo's AGENTS.md: the four sections every skill needs, how to write a trigger an agent will actually match, what the pitfalls section is really for, and the signs a skill is complete vs still a draft.
A skill is a SKILL.md file that turns a general-purpose agent into a trained teammate for one specific job.
Before writing a skill for this repo, read AGENTS.md once - specifically CRITICAL RULES, Local Commands, and Deployment + Tooling Gotchas. Those sections are the ground truth; this skill teaches structure and craft, not project rules.
For verified commands, design rules, and the ship workflow, see reference/project-conventions.md (this skill's companion file).
You are writing a new skill, improving an existing one, or a skill is not loading at the right moment or being followed correctly.
1. Frontmatter description - the only thing the model reads before deciding to load the skill
Write it as "Use when [specific condition]". A condition, not a topic.
Covers database work.Use when applying a Drizzle migration to a live Neon database. Covers generate/migrate, why db:push destroys data, and safe additive changes.2. When to trigger
Plain-language expansion. Name exact actions, errors, or user requests. Be specific enough that the wrong kind of request clearly does not match.
3. Procedure
Numbered steps with exact commands and real file paths - nothing approximated. Rules:
AGENTS.md > Local Commands. Do not invent variants.git add steps must only list paths confirmed to exist. A single nonexistent path aborts the entire staging operation silently (see AGENTS.md > Deployment + Tooling Gotchas).4. Pitfalls
Real failure modes only - not theoretical cautions. Each entry: one concrete wrong action + exact consequence + exact fix. "Be careful about X" is not a pitfall.
AGENTS.md - reference them, do not copy them. A copied rule drifts silently when AGENTS.md changes.ls itself.| Runtime | Write to |
|---|---|
| Codex | .agents/skills/<name>/SKILL.md |
| Claude Code | .claude/skills/<name>/SKILL.md |
Both must be created and kept in sync. A skill that only exists in one location is invisible to the other runtime.
Public library: single-file skills in lib/library/skills.ts; multi-file flagship skills in skills-source/ + generator. See AGENTS.md > Repo Skills > Flagship skill authoring.
AGENTS.md > Local Commands.AGENTS.md.AGENTS.md.AGENTS.md rules in a skill creates drift. When AGENTS.md is updated, the skill goes stale silently. Point there instead.git add step that might include a nonexistent path will silently abort the entire staging operation. Guard with [ -e path ] && git add path or only list confirmed-present paths..claude/skills/ will not load for Codex agents, and vice versa.Added 2026-07-05. Back to the Skill Library.

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.