create-subagent
Skill4 starsChanged 3 months agoMITView on GitHub
Create custom subagents for specialized AI tasks. Use when you want to create a new type of subagent, set up task-specific agents, configure code reviewers, debuggers, or domain-specific assistants with custom prompts.
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If you have previous conversation context, infer the subagent's purpose and behavior from what was discussed.
- Distinctive: line 31
When multiple subagents share the same name, the higher-priority location wins.
- Very specific: line 39
Create a .md file with YAML frontmatter and a markdown body (the system prompt):
- Very specific: line 195
Write the frontmatter with the required fields (name and description).
- Distinctive: line 207
Ask the AI to use your new agent:
- Very specific: line 223
Ensure file is in .cursor/agents/ or ~/.cursor/agents/
- Very specific: line 224
Check file has .md extension
- Distinctive: line 225
Verify YAML frontmatter syntax is valid
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Custom Subagents
This skill guides you through creating custom subagents for Cursor. Subagents are specialized AI assistants that run in isolated contexts with custom system prompts.
When to Use Subagents
Subagents help you:
- Preserve context by isolating exploration from your main conversation
- Specialize behavior with focused system prompts for specific domains
- Reuse configurations across projects with user-level subagents
Inferring from Context
If you have previous conversation context, infer the subagent's purpose and behavior from what was discussed. Create the subagent based on specialized tasks or workflows that emerged in the conversation.
Subagent Locations
| Location | Scope | Priority |
.cursor/agents/ | Current project | Higher |
~/.cursor/agents/ | All your projects | Lower |
When multiple subagents share the same name, the higher-priority location wins.
Project subagents (.cursor/agents/): Ideal for codebase-specific agents. Check into version control to share with your team.
User subagents (~/.cursor/agents/): Personal agents available across all your projects.
Subagent File Format
Create a .md file with YAML frontmatter and a markdown body (the system prompt):
---
name: code-reviewer
description: Reviews code for quality and best practices
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.Required Fields
| Field | Description |
name | Unique identifier (lowercase letters and hyphens only) |
description | When to delegate to this subagent (be specific!) |
Writing Effective Descriptions
The description is critical - the AI uses it to decide when to delegate.
# ❌ Too vague
description: Helps with code
# ✅ Specific and actionable
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.Include "use proactively" to encourage automatic delegation.
Example Subagents
Code Reviewer
---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
---
You are a senior code reviewer ensuring high standards of code quality and security.
When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately
Review checklist:
- Code is clear and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed
Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)
Include specific examples of how to fix issues.Debugger
---
name: debugger
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
---
You are an expert debugger specializing in root cause analysis.
When invoked:
1. Capture error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify solution works
Debugging process:
- Analyze error messages and logs
- Check recent code changes
- Form and test hypotheses
- Add strategic debug logging
- Inspect variable states
For each issue, provide:
- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach
- Prevention recommendations
Focus on fixing the underlying issue, not the symptoms.Data Scientist
---
name: data-scientist
description: Data analysis expert for SQL queries, BigQuery operations, and data insights. Use proactively for data analysis tasks and queries.
---
You are a data scientist specializing in SQL and BigQuery analysis.
When invoked:
1. Understand the data analysis requirement
2. Write efficient SQL queries
3. Use BigQuery command line tools (bq) when appropriate
4. Analyze and summarize results
5. Present findings clearly
Key practices:
- Write optimized SQL queries with proper filters
- Use appropriate aggregations and joins
- Include comments explaining complex logic
- Format results for readability
- Provide data-driven recommendations
For each analysis:
- Explain the query approach
- Document any assumptions
- Highlight key findings
- Suggest next steps based on data
Always ensure queries are efficient and cost-effective.Subagent Creation Workflow
Step 1: Decide the Scope
- Project-level (
.cursor/agents/): For codebase-specific agents shared with team - User-level (
~/.cursor/agents/): For personal agents across all projects
Step 2: Create the File
# For project-level
mkdir -p .cursor/agents
touch .cursor/agents/my-agent.md
# For user-level
mkdir -p ~/.cursor/agents
touch ~/.cursor/agents/my-agent.mdStep 3: Define Configuration
Write the frontmatter with the required fields (name and description).
Step 4: Write the System Prompt
The body becomes the system prompt. Be specific about:
- What the agent should do when invoked
- The workflow or process to follow
- Output format and structure
- Any constraints or guidelines
Step 5: Test the Agent
Ask the AI to use your new agent:
Use the my-agent subagent to [task description]Best Practices
- Design focused subagents: Each should excel at one specific task
- Write detailed descriptions: Include trigger terms so the AI knows when to delegate
- Check into version control: Share project subagents with your team
- Use proactive language: Include "use proactively" in descriptions
Troubleshooting
Subagent Not Found
- Ensure file is in
.cursor/agents/or~/.cursor/agents/ - Check file has
.mdextension - Verify YAML frontmatter syntax is valid
Other versions11 projects use a version of this.
Word for word · 4
- Goodnessmbakara/codex-skills★ 1100% same
- PandelisZ/skills★ 1100% same
- filipefalcaofs/repo-padrao★ 0100% same
- marslo/skills★ 0100% same
Edited · 3
- 32103210/cursor-skills★ 1100% same
- JameMy0001/antigravity-skills-hub★ 196% same
- leishifu666/skills★ 198% same
Wrote their own version · 4
- QBall-Inc/the-bulwark★ 8same name
- 0mlkrizzz655335v/claude-skills-zh★ 2same name
- franckdjiongo/claude-skills★ 0same name
- seek888/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use review-bugbot, origin and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
HermeticOrmusSkillautomate
Turn a repetitive task into a reliable automation script. Scope the task and its frequency/inputs/outputs/edge cases, pick the simplest tool, implement the smallest version, add error handling and idempotency, dry-run then schedule. Use when the task is "automate this", "write a script for", or scheduling an unattended job.
Also in 4 projects that use this
PydanticSkillreview-security
Security review of the current branch against its merge base — sandbox escapes, memory errors, panics and resource-limit bypasses. Use when reviewing changes for security risk, or before merging anything touching the heap/ module, path_security.rs, the wire protocol or the pool.
Also in 4 projects that use this
- +2 more from 0mlkrizzz655335v
In this repository48 other files it gives its agents.
- .claude/templates/AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .cursor/rules/core.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/k8s.mdcCursor rule
- .cursor/rules/node.mdcCursor rule
- .cursor/rules/python.mdcCursor rule
- .cursor/rules/rust.mdcCursor rule
- .cursor/rules/tdd.mdcCursor rule
- .cursor/rules/workbench.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
- cmux-sprint-orchestratorSkill
- config-auditSkill
- doneSkill
- eurekaSkill
- goalSkill
- go-reviewSkill
- handoffSkill
- js-reviewSkill
- k8s-debugSkill
- k8s-reviewSkill
- kickoffSkill
- pr-review-ingestSkill
- pr-reviewSkill
- python-reviewSkill
- reflectionSkill
- skill-evalSkill
- tdd-protocolSkill
- team-executeSkill
- team-planSkill
- team-shutdownSkill
- test-reviewSkill
- validate-recommendationSkill
- worktree-guideSkill
- babysitSkill
- canvasSkill
- create-hookSkill
- create-ruleSkill
- create-skillSkill
- migrate-to-skillsSkill
- sdkSkill
- shellSkill
- split-to-prsSkill
- statuslineSkill
- update-cli-configSkill
- update-cursor-settingsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

