Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Agent Skills guide

Agent Skill best practices: nine design patterns with real examples

Agent skill best practices as nine design patterns, from checklists and routers to script-backed and gated skills, each with a real example and when to use it.

By Intermediate · Updated 20 November 20266 min read
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

The best practice that matters most for an agent skill is doing one job well: a description that names when to use it, a short SKILL.md that holds only what the model would not know, a script for anything mechanical, and detail pushed into reference files that load on demand. The patterns below are the shapes that follows from that.

After reading a few hundred published skills, the good ones fall into a small number of shapes. Knowing them makes it easier to decide how to structure your own and what to leave out. Each pattern below links to a skill in our directory that uses it well.

1. The checklist

A short list of what to check or do, plus examples of what good and bad look like. No scripts, no reference files.

For example, Sentry’s code-review is about 100 lines: a review checklist, guidance on tone and approval, and a handful of before-and-after code samples.

Use it when the model already has the skill and needs your standards applied consistently. It is the right starting point for most team-convention skills, and the easiest to keep up to date.

2. The router

A short SKILL.md that decides which reference file applies and sends the agent there. Detail lives in many small files, each covering one topic.

For example, stripe-best-practices routes between payments, Connect, billing, tax and Treasury. Supabase’s Postgres skill is an index into about 35 one-rule files, and Remotion’s remotion-best-practices is a pure router that sends the agent to one of a dozen sub-guides.

Use it when the domain is broad but any single task needs only a slice of it. Progressive disclosure does the work: the agent pays for the one rule it needs, not all of them. Keep the routing table explicit (“for X, read references/x.md”) and keep references one level deep.

3. The script-backed skill

Instructions describe when and why; scripts do the fiddly, deterministic work.

For example, Anthropic’s pdf skill has scripts that detect fillable fields, fill them and render pages to images for checking. xlsx makes a recalculation step mandatory after any formula change.

Use it when there is a correct procedure the model gets wrong or does slightly differently each time. A script is cheaper (only its output enters the context), repeatable and testable. Make scripts non-interactive, give them clear errors and say in SKILL.md whether to run or read each one.

4. The template

The core of the skill is an output format: sections, headings, required fields, sometimes a few complete examples.

For example, internal-comms is a 30-line router into example documents. incident-response carries fixed templates for status updates and postmortems.

Use it when the shape of the output matters more than the reasoning behind it. Concrete examples beat descriptions of a format; one real filled-in example is often worth a page of rules.

5. The discipline

A process the agent must follow, stated firmly, with a list of the excuses it might use to skip steps and a rebuttal for each.

For example, obra’s systematic-debugging has an “iron law” (no fix without a known root cause), four phases, and a table of common rationalisations. test-driven-development works the same way.

Use it when the failure you are fixing is the model taking a shortcut, not the model lacking knowledge. The rationalisation list is the clever part: it names the shortcut before the model takes it.

6. The gated loop

Numbered phases with explicit entry and exit conditions, often looping until a check passes.

For example, Sentry’s iterate-pr fetches CI status and review feedback, fixes, verifies locally, pushes, then monitors and repeats, with written exit conditions so it knows when to stop.

Use it when the task is long-running and the risk is either stopping too early or never stopping. Put the verification step inside the loop, and say what “done” means in checkable terms.

7. The tool guide

A skill that teaches the agent to use one CLI or MCP server well: the commands, the flags that matter, the right order, the common errors.

Microsoft’s playwright-cli, Hugging Face’s hf-cli and Firecrawl’s scrape skill are all built this way.

Use it when you ship a tool and want agents to use its current interface rather than whatever version they saw in training. Many vendor skills are exactly this. If the CLI changes often, consider the stub pattern below.

8. The setup skill

A skill whose job is to configure something once: install a hook, write a config file, set up a project.

For example, git-guardrails-claude-code asks whether to install at project or user scope, copies a hook script and wires it into Claude Code settings.

Use it when the lasting effect should be enforced by something other than the model. The skill does the setup; the hook does the enforcing.

9. The stub

A tiny SKILL.md that points at instructions served from somewhere else: a CLI command, a URL, another skill.

For example, agent-browser loads its guide from the installed CLI so the instructions always match the binary version. web-design-guidelines fetches its rules from GitHub on each run.

Use it when instructions must track something that changes faster than people update skills. Know the trade-off: users cannot review what the agent will follow by reading the skill, and the content can change after install. For anything security-sensitive, prefer shipping the instructions in the folder.

Anti-patterns

  • The kitchen sink: one skill that covers your whole stack. Its description becomes vague, it triggers at the wrong times, and when it loads it fills the context with irrelevant rules. Split it, or turn it into a router.
  • The menu: “You can use pypdf, pdfplumber, PyMuPDF or pdfminer.” Give a default and an exception instead: “Use pdfplumber; for scanned files, use OCR.”
  • Explaining what the model already knows: paragraphs on what a REST API is waste the budget you need for your actual conventions.
  • Dated statements: “The new API” and “as of this year” go stale silently. Put legacy information in a clearly labelled section, and date anything that must be dated.
  • Deep reference chains: a reference file that points to another that points to a third. Agents may only skim files reached through chains. Link everything from SKILL.md.
  • Secrets in the folder: skills get copied, zipped and committed. Read credentials from the environment at runtime, never from a file in the skill.

Putting the patterns to work

Pick the simplest pattern that does the job, then test it. A checklist you can read in a minute beats a router nobody maintains. If you are starting from nothing, how to create a Claude skill walks through a small script-backed skill end to end, and what Agent Skills are explains the loading model these patterns are built around.

Three guides go deeper on the parts that decide whether a pattern works in practice: skill description best practices for the trigger, bundling scripts in skills for the script-backed and gated patterns, and testing and evaluating Agent Skills for proving the skill beats no skill at all. The five recipes, starting with a skill for your design system through to a framework migration Agent Skill, show the patterns combined in complete skills.

  • Agent Skills authoring

    Writing, testing and sharing SKILL.md packages that agents load on demand.

    SkillBeginner

  • Context engineering

    Deciding what instructions, documents, tools and history a model sees at each step.

    SkillIntermediate

Back to top