Write AI agent skills that actually work
A practical guide to SKILL.md playbooks: progressive loading, trigger-rich descriptions, Gather-Act-Verify structure, and a checklist that keeps coding agents on track.
1 What an agent skill really is
An AI agent skill is a small, versioned playbook. Usually a folder with a SKILL.md. It tells a coding agent when to wake up and how to run one job: open a PR, grill a plan, insert a knowledge pill, review security, deploy to staging.

Skills are not career skills
Search “AI skills for engineers” and you get Python, RAG, evals. Useful later. Day to day I care more about agent skills: short process files that stop the model from reinventing your workflow every session.
Links Cursor Skills docs Agent Skills standard Earlier thales.dev guide
2 Skills vs rules
If everything is always-on context, you burn tokens and the agent ignores half of it. Split the job:
/skill-name).paths can limit a skill to **/*.tsx or a package folder so it stays quiet elsewhere.A skill that never triggers is a docs file with a costume. Fix the description before you pad the body.
3 How loading works (why short beats long)
Cursor-style agents do not dump every skill body into the prompt. They climb a ladder:
- DiscoverOnly
name+descriptionfor each skill - ActivateFull
SKILL.mdwhen the task matches - On demandRead
references/, runscripts/
Context cost Tiny catalog→One playbook→Extra files if needed
Keep SKILL.md lean
Put the decision tree and steps in the main file. Park long checklists, API tables, and style dumps in references/. The agent opens those only when the step needs them.
4 Anatomy of a good SKILL.md
Minimum shape: a folder named like the skill, plus frontmatter the agent can index.
Minimal skeleton
---
name: deploy-staging
description: Deploy this app to staging. Use when the user asks to deploy, ship to staging, or release a preview.
---
# Deploy staging
## Instructions
1. Read current git status and failing tests.
2. Run scripts/validate.sh
3. Run scripts/deploy.sh staging
4. Verify the health URL returns 200
| Field | Required | What it is for |
|---|---|---|
name | Yes | Lowercase id; must match the folder name |
description | Yes | Trigger text. This is the search index, not marketing copy |
paths | No | Glob list so the skill only surfaces on matching files |
disable-model-invocation | No | true = slash-command only (good for destructive or billing flows) |
- Cursor
- Claude Code
- Codex
- agentskills.io
5 Write the description like a trigger list
Most “my skill never runs” bugs are vague descriptions. The body can be perfect and still sleep forever.
Do this
- Lead with what the skill does in plain words
- List real verbs users type: “open PR”, “publish article”, “triage bugs”
- Add negative triggers when overlap is messy
- Write in third person (how the agent catalogs it)
Avoid this
- “Helpful coding assistant for deploys”
- Synonym spam that never names the user phrases
- Descriptions that could match half the chat
- Hiding the only trigger words in the body
Trigger-rich example
description: Create a GitHub pull request for the current branch. Use when the user asks to open a PR, create a pull request, or submit changes for review. Do not use for push-only or local commits.
6 Structure the body: Gather, Act, Verify
I steal this shape from people who ship skills that survive real repos. It forces the agent to look before it types, then prove the work landed.
- Gather: which files, status commands, or docs must be read first
- Act: the ordered steps, scripts, or edits (one verb family: deploy or release, not both as synonyms)
- Verify: tests, HTTP checks,
git status, screenshot, whatever proves done
If a step cannot end on something checkable, the model will invent success. Put the acceptance test in the skill.

Loop Gather→Act→Verify→Fix or stop
7 Quality checklist before you commit
| Ship-ready skill checks | |||
|---|---|---|---|
| One job | Trigger verbs | Checkable steps | Lean main file |
| Composable | Repo truth | Guardrails | Pruned sediment |
Acceptance test
Trigger the skill with three different phrasings of a real task. If none load it, rewrite the description. Only then grow the body.
8 Start this week
Concrete path
- Pick one pain you hit twice a week (PR writeups, deploys, article inserts, flaky reviews)
- In Cursor, try
/create-skillor copy a thin skill from a trusted set - Write the description first, with the verbs you actually say out loud
- Fill Gather → Act → Verify with checkable steps
- Move long reference material into
references/ - Run it on a real change, then prune anything the agent ignored
Where skills live
- Project:
.cursor/skills/or.agents/skills/ - User:
~/.cursor/skills/or~/.agents/skills/ - Also discovered under Claude/Codex skill folders for compatibility
- Nested package folders work in monorepos
9 Resources worth opening
| Resource | Why open it |
|---|---|
| Cursor Agent Skills docs | Directories, frontmatter, scripts, migration from rules |
| Cursor: coding with agents | Rules vs skills, plan mode, practical agent habits |
| agentskills.io | Open standard behind the SKILL.md pattern |
| mattpocock/skills | Small, composable skills aimed at real engineering failure modes |
| Metablogue: skills that work | Trigger writing, context budgets, negative triggers |