Skill v1.0.1
currentLLM-judged scan95/100+1 new
version: "1.0.1" name: agent-development description: Use for создания или настройки кастомных сабагентов со специализированными промптами (ревьюер, отладчик, доменный ассистент). Helps определить расположение, структуру и системный контекст нового агента.
Creating Custom Subagents
Subagents are specialized AI assistants running in isolated contexts with custom system prompts. If previous conversation context exists, infer the subagent's purpose from what was discussed.
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-reviewerdescription: Reviews code for quality and best practices---You are a code reviewer. When invoked, analyze the code and providespecific, 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. Include "use proactively" to encourage automatic delegation.
# Bad — too vaguedescription: Helps with code# Good — specific trigger conditionsdescription: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
Example Subagent
---name: code-reviewerdescription: 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 changes2.Focus on modified files3.Begin review immediatelyReview 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 addressedProvide feedback organized by priority:-Critical issues (must fix)-Warnings (should fix)-Suggestions (consider improving)Include specific examples of how to fix issues.
Subagent Creation Workflow
- Decide scope: project (
.cursor/agents/) or user (~/.cursor/agents/) - Create file:
mkdir -p .cursor/agents && touch .cursor/agents/my-agent.md - Write frontmatter:
nameanddescription(required) - Write system prompt: what to do when invoked, workflow, output format, constraints
- Test: ask the AI to use the new subagent
Best Practices
- Each subagent should excel at one specific task
- Include trigger terms in descriptions so the AI knows when to delegate
- Check project subagents into version control
- Include "use proactively" in descriptions
Troubleshooting: Subagent Not Found
- File must be in
.cursor/agents/or~/.cursor/agents/ - File must have
.mdextension - YAML frontmatter syntax must be valid
depends_on: []