Skip to content

When to create a skill vs an agent (plus MCP and hooks)

When to create a skill vs an agent: a repeated rule goes to AGENTS.md, a repeated procedure becomes a skill, outside data needs MCP, noisy tasks go to subagents and guarantees are hooks.

Ramon Gomes 10 min read Level: Intermediate

Also available in: Español, Français, Português

Today I maintain more than 150 skills, a few subagents and a rules file for every project. I did not start that way. I started by pasting the same text into the chat every time, then I overdid it and created a skill for everything, and I learned the expensive way that each piece has the right moment to be born.

This post is not about what each thing is. It is about when to create each one.

One Line Each

  • AGENTS.md or CLAUDE.md: the project rules file, read in every conversation.
  • Skill: a folder with a SKILL.md that teaches a procedure. Only the name and description stay loaded all the time; the rest comes in when the topic shows up (Anthropic).
  • Subagent: a separate agent, with its own context and limited tools, that does the work and hands back only the summary (Claude Code, subagents).
  • MCP: the protocol that connects the agent to outside systems, like a database, an APIContract that defines how one program asks another for data or actions: which endpoints to call, what to send and what comes back. On the web, usually HTTP with JSON. or a tool (MCP).
  • Hook: a command that always runs at a certain moment, like before a file is edited, without depending on the model to remember (Claude Code, hooks).
Unfolded pocket knife on the left and a helper robot with a tool belt on the right, joined by a plug cable and safety latch
Skills are procedural tools, subagents are helpers, MCP connects and hooks protect.

Skills vs Agents: When to Create Each One

When you notice a signal, create the right piece

The Claude Code documentation itself has a similar table, and it is one of the most useful things I have read on the subject (Extend Claude Code). The core idea: do not create ahead of time, create when the signal shows up.

Let's take it piece by piece.

The Agent Broke the Same Rule Twice: AGENTS.md

If the agent used npm for the second time in a project that runs on pnpm, or hardcoded text in a component when the project requires everything to go through the translation file, that rule belongs in the project file.

The catch: this file is read in every conversation. Every line always costs something. Anthropic recommends keeping it under 200 lines and treating changes to it like code, with review. A rule that is a fact ("the project uses pnpm") stays there. A rule that is a procedure ("how to publish a release") does not.

AGENTS.md has become an open standard, read by Codex, Cursor, Copilot, Gemini CLI and many others (agents.md). If you use more than one agent, it pays to keep your rules there. I compared how Codex, Claude Code and Cursor read that file in the article on AI coding agents in a front-end team.

You Pasted the Same Step-by-step for the Third Time: Skill

This is the clearest signal. If you keep pasting the same review checklist, the same deploy script or the same writing pattern, that is a skill waiting to be born.

A practical test I use: if a section of AGENTS.md turned into a step-by-step, it is already a skill. Pull it out and save context in every conversation that does not need it.

What makes a skill work:

  • The description is everything. It decides whether the skill gets used at all. A vague description never fires. State the concrete trigger: "use when writing a database migration", not "helps with databases".
  • One skill, one job. A skill that tries to solve everything becomes a manual nobody reads.
  • A script instead of an explanation, whenever possible. A script runs without taking up context.

You Copy Data from a System the Agent Cannot See: MCP

If you open the database console, copy a result and paste it into the chat, or go to a library's documentation and paste a snippet, the agent needs a connection, not an instruction. That is where MCP comes in.

The difference from a skill, in one sentence from the documentation itself: MCP connects the agent to external services; a skill teaches what it knows, including how to use those services well. Often the two go together. I use an MCP that fetches up-to-date library documentation and a skill that says when it is worth checking it.

A Side Task Floods the Conversation: Subagent

Running a test suite and reading the whole log, sweeping a hundred files looking for a pattern, researching ten pages on the web. All of that fills the main conversation with output you will never read again.

Something Must Happen Every Time: Hook

This is the one most people get wrong. Writing "never edit the .env file" in AGENTS.md or in a skill is a request, not a guarantee. The documentation says it in those exact words.

If the rule can never fail, it has to be deterministic. A hook that runs before every edit and blocks the forbidden file is a guarantee. The line I keep in mind: instructions are there to guide, hooks are there to protect.

The Cost Nobody Mentions: Context

Each piece has a different price in the agent's context:

Piece When it takes up context
AGENTS.md In every conversation, in full
Skill Only name and description, until it is used
MCP Tool names; the details come on demand
Subagent Nothing in the main conversation, only the summary that comes back
Hook Nothing, unless it returns some output
Organized tool wall with drawers and a laptop on the workbench
Everything in its place: what stays at hand and what only comes out of the drawer when the job needs it.

And here is a real number. In Codex, the initial skills index has a cap: 2% of the model's context windowMaximum amount of text, measured in tokens, that a language model can take into account at once, counting both input and output., or 8 thousand characters when that window is unknown (OpenAI, Codex skills). Go past it and it truncates descriptions or leaves skills out.

With more than 150 skills, I hit that cap. The fix was splitting them into profiles: one for UI, one for backend, one for review, a minimal one for short tasks. Each profile loads only the skills for that kind of work. The review profile has two. In one of those measurements, I found out that a single test review skill took up 12% of the whole index, with its description alone. It left the UI profile and moved to the quality one, where it makes sense.

Be Careful with Third-party Skills

And this has already become a real problem. In February 2026, Snyk audited 3,984 public skills and found 76 confirmed malicious ones, most of them using prompt injectionAttack where malicious text in an email, website or document carries instructions the model follows as if they came from the user, hijacking its behavior.; 13.4% had some critical issue (Snyk). OWASP already has its own list of skill risks, with malicious skills at the top (OWASP).

My rule: I read every skill before installing it, and the ones that matter live in my own repository, under version control.

The same care applies to MCP servers installed with npm or pip: look the package up on Snyk or OSV.dev first, and check that the name really is the official project.

A Roadmap to Get Started

  1. Start with one short AGENTS.md file: how to run, how to test, the three rules that matter most.
  2. Take note when you paste the same instruction for the third time. That becomes your first skill.
  3. If you keep copying data from somewhere, look for a ready-made MCP for it before writing your own.
  4. Use subagents for research and sweeps, not for the main task.
  5. For what cannot fail, a hook.
  6. Once a month, review: a skill that never fired goes away or gets a better description.

This way of organizing things fits well with writing the spec before letting the agent code, which I explained in what is spec-driven development (SDD). And if you are torn between building the agent in a visual tool or in code, I wrote about n8n vs AI agents in code.

It is the kind of structure I set up in AI agents for companies and in AI automation.

Frequently Asked Questions

When to create a skill vs an agent?

Create a skill when you keep repeating the same procedure. Create a subagent when a side task pollutes the conversation or needs limited tools. A fixed project rule goes into AGENTS.md, an external connection is MCP and a guarantee is a hook.

What is the difference between a skill and MCP?

MCP gives access to an outside system. A skill teaches a procedure, including how to use that access. One does not replace the other.

Do skills work outside Claude Code?

Yes. Agent Skills became an open standard in December 2025, and Codex, Cursor, Copilot and others read the same format.

How many skills is too many?

When they start not being found, or the agent loads the wrong one. In Codex, there is a character cap for the index. If you went past it, split them into profiles by kind of work.

References

Source: https://ramongomessilva.com.br/blog/when-to-create-skill-vs-agent · Accessed on December 02, 2026

Share Share on LinkedIn Share on X
Cite this article

Ready-made reference, with today as the access date.

ABNT

Brazilian standard (NBR 6023). Use it in theses and academic papers submitted in Brazil.

GOMES, Ramon. When to create a skill vs an agent (plus MCP and hooks). Ramon Gomes, 26 out. 2026. Disponível em: https://ramongomessilva.com.br/blog/when-to-create-skill-vs-agent. Acesso em: 2 dez. 2026.

APA

American Psychological Association style. Common in scientific papers and journals, especially in the social, behavioral and health sciences.

Gomes, R. (2026, October 26). When to create a skill vs an agent (plus MCP and hooks). Ramon Gomes. https://ramongomessilva.com.br/blog/when-to-create-skill-vs-agent

BibTeX

Format for LaTeX users (Overleaf, for example). Paste it into your .bib file or import it into Zotero or Mendeley.

@online{gomes2026whentocreate,
  author = {Gomes, Ramon},
  title = {{When to create a skill vs an agent (plus MCP and hooks)}},
  organization = {Ramon Gomes},
  year = {2026},
  month = oct,
  date = {2026-10-26},
  url = {https://ramongomessilva.com.br/blog/when-to-create-skill-vs-agent},
  urldate = {2026-12-02}
}
Found a mistake?

Wrong fact, broken link, outdated information: tell me and I will fix it.

10 to 2,000 characters. If you can, point to the right source.

Only so I can reply. It never shows on any page of the site.

Written by

Ramon Gomes

Software Engineer

Full stack software engineer. I like taking a messy problem, listening to the people who live with it and shipping something that holds up day to day. These days I split my time between my own products, applied AI and client work.

Available for projects

Need Something Like This Built?

I build websites, systems, apps and AI automations, from design to deploy. Tell me what you need or see what I offer.

Related Articles