Bilal Labs

Subagent examples for Claude Code and Cursor

A subagent is a Markdown file with YAML frontmatter that defines a specialist agent with its own context window and system prompt. Every example below comes in both formats, checked against the Claude Code and Cursor docs.

Convert a subagent between Claude Code and Cursor

---
name: code-reviewer
description: "Reviews changes for bugs. Use proactively before committing."
model: inherit
readonly: true
---

You are a strict code reviewer. Run git diff and report issues by severity.

Runs in your browser. Nothing is uploaded.

Claude Code vs Cursor subagent format

All 33 subagents

FAQ

Where do subagent files go?

Claude Code: .claude/agents/ in the project or ~/.claude/agents/ for all projects. Cursor: .cursor/agents/ or ~/.cursor/agents/. Cursor also loads .claude/agents/ and .codex/agents/ for compatibility.

Can one file work in both Claude Code and Cursor?

Mostly. Cursor reads .claude/agents/, and name, description and the prompt body carry over. But Cursor ignores Claude-only fields such as tools, and Claude Code ignores Cursor's readonly. For a read-only agent, keep a Cursor copy with readonly: true.

Which frontmatter fields are required?

Claude Code requires name and description. In Cursor both are optional (name defaults to the file name), but without a description the agent cannot decide when to delegate.

More AI dev guides: how to make videos with Claude Opus 5.5.