use-claude-code-subagents

Installation
SKILL.md

Use Claude Code subagents

When to use

Cursor's Task tool pins custom subagents to the parent model when a personal Anthropic API key is on, or when the agent's model is not enabled in Cursor. This skill runs the project's custom subagents through Claude Code (headless claude -p) so each runs on the model: in its own agent file. The mode lasts for the rest of the chat. When the user says "use cursor subagents", switch back to the Task tool and confirm in one line.

Skip for Cursor's built-in subagents (explore, generalPurpose, ...), for Cloud Agents (no claude CLI there), and for any agent whose model: is missing, inherit, or not Anthropic (see step 2). Those keep using the Task tool.

Before you start

  1. Gather first. Read the agent file for each agent named (step 1) before you ask the user anything.
  2. Consent. If the user typed /use-claude-code-subagents or asked for Claude Code subagents, continue. If this skill loaded on its own (the user only described a symptom), ask once: "Run custom subagents through Claude Code? Runs bill your Claude Code account and edits bypass Cursor's review and undo. Reply yes to switch." Wait for yes. On no, use the Task tool.
  3. Reply exactly: Subagent mode: claude code.
  4. Preflight once. Run claude --version from the Shell tool with required_permissions: ["all"]. This skill needs Claude Code 2.1.281 or later (--permission-prompts needs 2.1.259, the --agents <file> form needs 2.1.281). If the command fails, point the user to the Claude Code setup guide and tell them to run claude once to sign in. If the version is older, ask them to run claude update. Stay in Cursor native mode until it passes.
  5. Light path. For one agent and one task, do steps 1, 2, 4 and 5 with a single claude call. Skip parallel runs and --resume unless the agent asks a question.
  6. If the user's message included a task, do it. Otherwise wait.

1. Resolve the agent

Installs
4
First Seen
11 days ago