Open navigation
Back to Articles

November 2026 · 5 min read

What Belongs in an Agent Skill, and What Doesn't

A decision framework for writing agent skills, separating repeatable workflows from global rules in AGENTS.md.

Editorial cover for what belongs in an agent skill and what doesnt

What Belongs in an Agent Skill, and What Doesn't

An agent skill belongs in your repository only when it packages a repeatable workflow with specific inputs and outputs. Global repository invariants and build commands belong in AGENTS.md. If you place general project rules inside a skill, the agent fails to load them when it needs them most.[3][4]

When maintaining the OpenVibeEval repository and the automated blog pipeline, the boundary between AGENTS.md and individual skills did not emerge from a single design session. It shifted organically as codebases broke and instructions drifted. Commands, environment quirks, and layout invariants stayed in AGENTS.md because every harness reads that root file on startup. Meanwhile, repeatable execution pipelines moved into modular skill folders because an agent should invoke them rather than re-derive them every turn.

Treating a skill as a dumping ground for general project rules creates severe context bloat. Skills load on demand when their YAML frontmatter description matches the user prompt. Global facts that must remain active across every conversation belong in your baseline configuration file, not inside a conditional skill directory.[3][4]

The open-source ecosystem features thousands of skill collections on GitHub. Autocomplete queries for agent skills libraries continue to surge. Despite this marketplace noise, the correct approach is to build fewer skills and ensure every skill owns a distinct procedural domain.[3][4]

Procedural Workflows Versus Global Repository Rules

Static project knowledge differs fundamentally from executable operational procedures. AGENTS.md is your project README for AI agents. It holds architecture overviews, dependency versions, and code conventions that must stay visible globally.[1][4]

Skills take a different architectural path. Each skill lives in its own directory under the project structure. It contains frontmatter descriptions and markdown instructions that load only when relevant. This selective ingestion keeps your baseline context window lean.[4][5]

If your team keeps pasting the exact same multi-step verification checklist into chat, that checklist has outgrown AGENTS.md and must become a skill. Conversely, if an instruction forbids modifying database migrations, it remains a global rule that a skill cannot enforce reliably.[3][5]

Official documentation from Anthropic and Codex describes skills as mechanisms for packaging procedural knowledge. They are distinct from Model Context Protocol servers. An MCP server provides protocol connections to external systems, while a skill executes local multi-step procedures.[3][5]

The Drift Failure Pattern in Duplicated Instructions

Duplicating operational commands across both AGENTS.md and individual skills guarantees catastrophic drift. When a test runner command gets renamed during a refactor, updating only one file causes the agent to execute stale shell instructions.[1][3]

During maintenance of our pipeline tooling, this exact failure pattern repeated twice before we established strict boundaries. A skill instructed the model to run a legacy scorer binary that had already been deprecated. The agent produced confident, completely wrong work because the procedural instructions outlived the underlying code.

The operational fix that stopped the drift was keeping skills minimal and letting AGENTS.md own facts that change frequently. Never hardcode volatile CLI flags inside a skill markdown body when those flags are already documented in your root operational manual.[1][3]

When instruction files conflict, the closest AGENTS.md file in the directory tree wins. Explicit user chat prompts override everything. Relying on this resolution hierarchy requires keeping your file layouts clean and avoiding redundant copies of command arguments.[1]

A Pragmatic Decision Framework for New Workflows

Determining where a new automation routine belongs requires evaluating its scope, permanence, and system boundaries. Three strict rules govern this evaluation process across modern coding agent runtimes.[3][5]

If the agent needs to reach an external system it cannot touch today, such as a remote database or a cloud API, build a Model Context Protocol server rather than a skill. MCP provides the persistent protocol connection, while AGENTS.md specifies the repository rules for interacting with it.[5]

If a safety rule must hold every single time without exception, neither a skill nor AGENTS.md is sufficient because large language models can skip text instructions. Move absolute safety boundaries into execution hooks or permission settings.[5]

I have not measured token savings or run controlled task outcome comparisons for skills versus plain prompts. What I rely on is the structural rule of thumb that emerged after deleting duplicated instructions. Put repeatable, parameterized workflows into skills and keep everything else in AGENTS.md.

Testing Skill Descriptions Before Deployment

A skill is only as effective as its YAML frontmatter description. A skill with a vague description will either trigger on every unrelated prompt or never trigger when needed.[3][5]

Avoid generic descriptions like handles data or helps with documentation. Use specific gerunds naming the exact activity, such as processing pdfs or reviewing gcp iam configurations.[3][5]

Test your descriptions against eight to ten realistic should-trigger prompts and an equal number of near misses. Include casual phrasing, typos, and ambiguous adjacent tasks to ensure the skill wins or loses correctly when competing with other loaded skills.[3]

When a skill contains strict mechanical steps or calculations, restrict its freedom by using scripts and structured schemas. Reserve high freedom text instructions only for tasks where human judgment matters and several valid approaches exist.[3]

Actionable Skill Audit Checklist

Audit your repository skill set using this concrete sequence to eliminate bloat and prevent silent agent degradation.[3][4][5]

Review every existing skill folder and verify that it contains a repeatable multi-step workflow rather than a static project rule.[3][4]

Search your skill files for duplicated build commands or test flags that already exist in AGENTS.md, and delete the duplicates.

Rewrite frontmatter descriptions to use precise activity names, avoiding broad helper terminology.[3][5]

Check that any external data integrations rely on Model Context Protocol servers rather than custom shell scripts embedded inside skills.[5]

Keep your total active skill count small to prevent description competition in the agent context window.[5]

agent skillsclaude codecodexagent workflowsAGENTS.md

Sources

  1. https://agents.md/
  2. https://code.claude.com/docs/en/skills
  3. skills/agent-skill-best-practices.md at main · nyosegawa/skills · GitHub
  4. SKILL.md vs CLAUDE.md vs AGENTS.md Compared | Termdock
  5. Claude Skills & Agent Skills Explained: SKILL.md vs MCP

Related articles

Press ? for keyboard shortcuts