What are Claude Code subagents?

A subagent sounds like a service running somewhere. It is a text file. Understanding that one fact explains almost everything else about how they behave, why they are written the way they are, and why the same text still works in tools that have never heard of Claude Code.

THE MECHANISM

A subagent is a file, not a service

A Claude Code subagent is a Markdown file that lives in a folder called .claude/agents/. It opens with YAML frontmatter — a small block carrying at least a name and a description — and everything after that block is prose: the instructions a specialist in that area would be given before starting work.

Claude Code reads that folder. When a task comes up that matches what one of the descriptions says the file is for, Claude Code can hand the task to that subagent, which means running it with that file's instructions in place of the general ones. The specialist file is not additional software. It is a different set of instructions applied to the same model, in a separate context, for one job.

This is why the description field carries more weight than it looks like it should. It is not a summary for humans reading the folder; it is the text that routing reads to decide whether this file is the right one for the task at hand. Descriptions written as 'when to use this' behave noticeably differently from descriptions written as 'what this is', and the file's name is the other half of that signal.

It is not additional software. It is a different set of instructions, applied to the same model, for one job.

WHY ONE PER SPECIALITY

The reason the folder holds many small files

A single large instruction file has to be true for everything it might be asked to do, which pushes it towards generality. It ends up saying things that are correct for all tasks and specific to none. A file that only ever runs for one kind of work can be blunt: it can name the steps in the order that speciality does them, name what usually goes wrong, and name what the output is supposed to look like when it is finished.

Splitting by speciality has a second effect that matters more in practice. Each subagent runs in its own context, so the detail it needs — the conventions, the checklist, the vocabulary of that discipline — does not have to share room with the detail every other task needs. The main conversation stays about the work, and the specialist's instructions arrive only when that specialist is called.

The cost of this arrangement is that it is only as good as the writing in the files. A subagent does not make a model better at anything. It changes what it is asked to do and what it is told to attend to, and the output still has to be read by somebody who knows what right looks like.

PORTABILITY

The same text works without Claude Code

Because a subagent is a Markdown file, it is readable anywhere Markdown is readable, and the frontmatter block is inert text in every tool that is not looking for it. Paste the body of a subagent file into Claude, ChatGPT, Gemini or Microsoft Copilot as context and it does exactly what it does in Claude Code, minus the automatic routing: you are choosing the specialist yourself instead of letting the folder do it.

That gives two routes to the same content. Drop the folder into .claude/agents/ and the specialists are available to be invoked by name or picked automatically. Or open the file, copy what is under the frontmatter, and paste it at the top of a conversation in whatever tool you already use. Neither route installs anything and neither requires the other.

It also means these files version like code, because they are code-adjacent text. They sit in a repository, they diff line by line, and a change to how one speciality works is a change to one file that somebody can review. This is a quiet advantage over instructions kept in a chat history or a shared document, where nobody can tell what changed or when.

The practical consequence is that a set of subagents is a document, and it can be treated like one. Two people can disagree about a step and settle it by editing a paragraph. A checklist that keeps being ignored can be moved higher in the file to find out whether position was the problem. Nothing about that requires anybody to write code, which is the part that surprises people who came to it expecting a plugin.

A WORKED SET

Thirteen packs, 137 specialists

Maket Agency OS is a set built on exactly this mechanism: 137 subagent .md files, each with the YAML frontmatter Claude Code reads, arranged in thirteen subfolders by department. The same thirteen departments are also supplied as Markdown packs and as print-ready PDFs running to 89 pages in total, which is the paste-as-context route rather than the folder route.

The download also carries a START-HERE guide at 7 pages and a Claude Code setup guide at 6 pages covering both routes, and it is licensed MIT with the notice retained, as stated in LICENSES.md inside the download. What it is, precisely, is 137 specialist briefs in a format two different kinds of tool can read. What it is not is a promise about output: the files change what gets asked and what gets attended to, and reading the answer is still your job.

The thirteen departments, with the number of specialists in each, are the shape of the set:

  • Marketing Machine — 19 specialists
  • Engineering Team — 15
  • Business Ops — 15
  • Geospatial Studio — 13
  • Game Studio — 12
  • Security Command — 10
  • Design Studio — 9
  • Sales Force — 9
  • Product Lab — 9
  • QA Command — 8
  • Performance Marketing — 6
  • Spatial XR — 6
  • AI Orchestrator — 6

AI disclosure

I use AI tooling in the build and in the writing. That is exactly why every count in a guide comes from the catalogue of the file it names, and every rule from the published document the text cites.

Questions

Asked about subagents

Where do Claude Code subagent files live?

In a folder called .claude/agents/, as Markdown files. Claude Code reads the folder and can hand a matching task to the subagent described in one of those files, running it with that file's instructions in a separate context.

What goes in the YAML frontmatter?

At minimum a name and a description. The description is the part that carries the weight, because it is what routing reads to decide whether this file fits the task — which is why descriptions written as 'when to use this' work better than descriptions written as 'what this is'.

Do subagents work outside Claude Code?

The frontmatter is only meaningful to Claude Code, but the rest of the file is ordinary Markdown. Paste it as context into Claude, ChatGPT, Gemini or Microsoft Copilot and the instructions apply exactly the same way; what you lose is the automatic routing, because you are picking the specialist yourself.

What is in the Agency OS download?

137 subagent .md files in thirteen subfolders, the same thirteen departments as Markdown packs and as PDFs totalling 89 pages, a START-HERE guide of 7 pages and a Claude Code setup guide of 6 pages. It is licensed MIT with the notice retained.

One file per specialist, thirteen packs

137 subagent .md files with the frontmatter Claude Code reads, in thirteen departmental subfolders — plus the same thirteen as Markdown packs and as PDFs running to 89 pages, for pasting into Claude, ChatGPT, Gemini or Microsoft Copilot instead.

Instant download. MIT licence, notice retained, stated in LICENSES.md inside the download.