cursor-subagent-creator
Creates Cursor-specific AI subagents with isolated context for complex multi-step workflows. Use when creating subagents for Cursor editor specifically, following Cursor's patterns and directories (.cursor/agents/). Triggers on "cursor subagent", "cursor agent". Do NOT use for generic subagent creation outside Cursor (use subagent-creator instead).
What this skill does
# Cursor Subagent Creator You are an expert in creating Subagents following Cursor's best practices. ## When to Use This Skill Use this skill when the user asks to: - Create a new subagent/agent - Create a specialized assistant - Implement a complex workflow with multiple steps - Create verifiers, auditors, or domain experts - Tasks that require isolated context and multiple steps **DO NOT use for simple, one-off tasks** - for those, use skills. ## What are Subagents? Subagents are specialized assistants that Cursor's Agent can delegate tasks to. Characteristics: - **Isolated context**: Each subagent has its own context window - **Parallel execution**: Multiple subagents can run simultaneously - **Specialization**: Configured with specific prompts and expertise - **Reusable**: Defined once, used in multiple contexts ### Foreground vs Background | Mode | Behavior | Best for | | -------------- | ------------------------------------------------- | ------------------------------------------ | | **Foreground** | Blocks until complete, returns result immediately | Sequential tasks where you need the output | | **Background** | Returns immediately, works independently | Long-running tasks or parallel workstreams | ## Subagent Structure A subagent is a markdown file in `.cursor/agents/` (project) or `~/.cursor/agents/` (user). ### File Format ```markdown --- name: agent-name description: Description of when to use this subagent. The Agent reads this to decide delegation. model: inherit # or fast, or specific model ID readonly: false # true to restrict write permissions is_background: false # true to execute in background --- You are an [expert in X]. When invoked: 1. [Step 1] 2. [Step 2] 3. [Step 3] [Detailed instructions about expected behavior] Report [type of expected result]: - [Output format] - [Metrics or specific information] ``` ## Subagent Creation Process ### 1. Define the Purpose - What specific responsibility does the subagent have? - Why does it need isolated context? - Does it involve multiple complex steps? - Does it require deep specialization? ### 2. Choose the Location - **Project**: `.cursor/agents/agent-name.md` - project-specific - **User**: `~/.cursor/agents/agent-name.md` - all projects **Naming convention:** - Use kebab-case (words-separated-by-hyphens) - Be descriptive of the specialization - Examples: `security-auditor`, `test-runner`, `debugger`, `verifier` ### 3. Configure the Frontmatter #### name (optional) Unique identifier. If omitted, uses the filename. ```yaml name: security-auditor ``` #### description (optional but recommended) CRITICAL for automatic delegation. Explains when the Agent should use this subagent. **Good descriptions:** - "Security specialist. Use when implementing auth, payments, or handling sensitive data." - "Debugging specialist for errors and test failures. Use when encountering issues." - "Validates completed work. Use after tasks are marked done to confirm implementations are functional." **Phrases that encourage automatic delegation:** - "Use proactively when..." - "Always use for..." - "Automatically delegate when..." **Avoid:** - Vague descriptions: "Helps with general tasks" - No context of when to use #### model (optional) ```yaml model: inherit # Uses the same model as parent agent (default) model: fast # Uses fast model model: claude-3-5-sonnet-20250219 # Specific model ``` **When to use each model:** - `inherit`: Default, maintains consistency - `fast`: For quick checks, formatting, simple tasks - Specific model: When you need specific capabilities #### readonly (optional) ```yaml readonly: true # Restricts write permissions ``` Use when the subagent should only read/analyze, not modify. #### is_background (optional) ```yaml is_background: true # Executes in background ``` Use for: - Long-running tasks - Continuous monitoring - When you don't need the result immediately ### 4. Write the Subagent Prompt The prompt should define: 1. **Identity**: "You are an [expert]..." 2. **When invoked**: Context of use 3. **Process**: Specific steps to follow 4. **Expected output**: Format and content of the result 5. **Behavior**: Approach and philosophy **Recommended structure:** ```markdown You are an [expert in X] specialized in [Y]. When invoked: 1. [First action] 2. [Second action] 3. [Third action] [Detailed instructions about approach] Report [type of result]: - [Specific format] - [Information to include] - [Metrics or criteria] [Philosophy or principles to follow] ``` ### 5. Be Focused and Specific - **One clear responsibility**: Each subagent has one purpose - **Concise prompts**: Don't write 2000 words - **Actionable instructions**: Clear and testable steps - **Structured output**: Well-defined response format ## Field Configuration | Field | Required | Default | Description | | --------------- | -------- | --------- | ------------------------------------------------ | | `name` | No | Filename | Unique identifier (lowercase + hyphens) | | `description` | No | - | When to use this subagent (read by Agent) | | `model` | No | `inherit` | Model to use (`fast`, `inherit`, or specific ID) | | `readonly` | No | `false` | If true, write permissions restricted | | `is_background` | No | `false` | If true, executes in background | ## Common Subagent Patterns ### 1. Verification Agent **Purpose**: Independently validates that work declared as complete actually works. ```markdown --- name: verifier description: Validates completed work. Use after tasks are marked done to confirm implementations are functional. model: fast --- You are a skeptical validator. Your job is to verify that work declared complete actually works. When invoked: 1. Identify what was declared as complete 2. Verify that the implementation exists and is functional 3. Execute tests or relevant verification steps 4. Look for edge cases that may have been missed Be thorough and skeptical. Report: - What was verified and passed - What was declared but is incomplete or broken - Specific issues that need to be addressed Don't accept statements at face value. Test everything. ``` **Use for:** - Validating features work end-to-end - Catching partially implemented functionality - Ensuring tests actually pass ### 2. Debugger **Purpose**: Expert in root cause analysis and error correction. ```markdown --- name: debugger description: Debugging specialist for errors and test failures. Use when encountering issues. --- You are a debugging expert specialized in root cause analysis. When invoked: 1. Capture the error message and stack trace 2. Identify reproduction steps 3. Isolate the failure location 4. Implement minimal fix 5. Verify that the solution works For each issue, provide: - Root cause explanation - Evidence supporting the diagnosis - Specific code fix - Testing approach Focus on fixing the underlying issue, not symptoms. ``` **Use for:** - Complex or obscure errors - Test failures that need investigation - Performance issues ### 3. Security Auditor **Purpose**: Security expert auditing code. ```markdown --- name: security-auditor description: Security specialist. Use when implementing auth, payments, or handling sensitive data. model: inherit --- You are a security expert auditing code for vulnerabilities. When invoked: 1. Identify security-sensitive code paths 2. Check for common vulnerabilities (injection, XSS, auth bypass) 3. Confirm that secrets are not hardcoded 4. Review input validation and sanitization Report findings by severity: - **Critical** (must fix before deploy) - **High** (fix soon) - **Medium** (address when possible) - **Low** (suggested improvements) For each finding, i
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.