FA Dev Tools

English中文

Skill vs Agent (Subagent) in Claude Code and Cursor

ai/skill-vs-agent · By Derek Lam · Updated · 26 views · Tags: ai, claude-code, cursor, skills, agents

Written with claude-opus-5-5


TL;DR

  • A skill is a playbook (SKILL.md) that the agent you're already talking to loads and follows.
  • An agent (subagent) is a separate worker. It has its own fresh context, can use a different model and tools, and sends back only a summary.
  • A self-contained task that ends in a short answer, such as a review or a walkthrough, can be either one.
  • Use a skill when the work needs you or the conversation: questions partway through, steps you watch, workflows you start by name.
  • Use an agent when the work needs isolation: large searches, an independent second opinion, parallel jobs, a different model, or limited tools.
  • How to decide: does the main chat need to see the work, or only the result? If it needs the work, use a skill. If only the result, use an agent.

Contents

What each one is

SkillAgent (subagent)
What it isA SKILL.md playbook, sometimes with scriptsA persona file (agents/*.md) used to start a new worker
Where it runsIn the current chat's contextIn its own context, separate from the chat
How it startsYou type /name, or the model loads it when the description matchesThe parent starts it (Task / Agent tool); you don't chat with it directly
ModelThe chat's modelCan set its own in frontmatter (model:)
ToolsWhatever the chat hasCan be limited, e.g. read-only reviewers
What you seeAll of its work, in the chatOnly its final summary
Context costAdds to the main chat's contextKeeps file dumps out of the main chat
Runs in parallelNoYes, several at once (is_background: true in Cursor)
Best forRepeatable workflows (/ship, /commit, /how)Broad research, independent reviews, fan-out work

Where the files live:

ToolSkillsAgents
Claude Code.claude/skills/, ~/.claude/skills/.claude/agents/, ~/.claude/agents/
Cursor.cursor/skills/, plugin skills/.cursor/agents/, plugin agents/

Where they overlap

Both are markdown files with name / description frontmatter and a prompt body. You could put the same instructions in either one.

Shared traitSkillAgent
Markdown file with frontmatter and a promptSKILL.mdagents/*.md
description decides when it gets usedYesYes
Can tell the model to follow steps or read filesYesYes
Can be project-level or user-levelYesYes

The difference is where the prompt runs: a skill runs in the current chat, an agent runs as a separate worker.

Cases where either works

TaskAs a skillAs an agent
Review a diff/code-review in the chatcode-reviewer subagent
Explain how a subsystem works/howexplore subagent
Write a test planFollow a checklist in the chattest-planner subagent
Draft PR notespr-createdocs-writer subagent

Pick the skill when you'll want to follow up on the result ("why that one?", "fix it"). Pick the agent when you only need the verdict and want your main chat to stay small.

Must be a skill, or must be an agent

Must be a skillWhy an agent can't do it
A workflow that asks you questions partway through (e.g. choosing a branch name)A subagent can't talk to you. Only the parent can
Steps that rely on what was already said in the chatA subagent starts fresh and knows only its prompt
Orchestration: deciding which workers to start and combining their resultsSubagents usually can't start more subagents
You need to see every command and editYou only get the agent's summary
Small, quick tasksStarting a full worker costs more than the task
Must be an agentWhy a skill can't do it
Several independent jobs running at the same timeA skill runs once, in one chat
A review not influenced by your own reading of the codeA skill sees your whole conversation and its assumptions
A different model, or limited tools (read-only reviewer)A skill uses the chat's model and tools
A large search where you want only the conclusionA skill puts every file it reads into your context
Background work while the chat keeps goingA skill holds up the turn it runs in

How to decide

flowchart TD
  A[New repeatable task] --> B{Needs to ask you something,<br/>or use what's already in the chat?}
  B -- yes --> S[Skill]
  B -- no --> C{A workflow you start by name?}
  C -- yes --> S
  C -- no --> D{Different model, limited tools,<br/>parallel or background?}
  D -- yes --> G[Agent]
  D -- no --> E{Reads a lot, but you only<br/>need the conclusion?}
  E -- yes --> G
  E -- no --> F{Must judge without being<br/>influenced by the chat?}
  F -- yes --> G
  F -- no --> S2[Skill: cheaper and you can see what it does]
#QuestionIf yes
1Does it need to ask you something partway through, or use what's already in the chat?Skill
2Is it a workflow you'd start by name (/ship, /commit)?Skill
3Does it need a different model, limited tools, or to run in parallel or in the background?Agent
4Will it read a lot when you only need the conclusion?Agent
5Should it judge without being influenced by what the chat already thinks?Agent
6None of the aboveSkill

A skill holds the workflow and starts agents for the parts that need isolation or parallel work. /ship works this way with its reviewer subagents, and so does pstack's /poteto-mode with poteto-agent.

Two signs you picked wrong:

SignWhat it means
Your main chat fills up with file reads you never needed to seeIt should have been an agent
The agent's summary keeps missing context, and you have to re-explain the conversation in its promptIt should have been a skill

Example: pstack

pstack is a Cursor plugin, not a set of rules. Its plugin.json declares "skills": "./skills/" and "agents": "./agents/". It ships 45+ skills, 2 agents and no rules.

FileTypeWhat it does
skills/how/SKILL.mdSkillExplains a subsystem in the current chat. disable-model-invocation: true means it runs only when you type /how
skills/poteto-mode/SKILL.mdSkillThe main playbook. It owns the todo list and decides when to start subagents
agents/poteto-agent.mdAgentA worker that poteto-mode starts. It reads the poteto-mode skill first, then does one task on its own model

Disclaimer: These documents are personal notes. The information may be incomplete, out of date or wrong, so check it before you rely on it.