Agent Selection and Definition Loading
Use this skill whenever a command instructs you to "apply the agent-selection skill" or "follow agent-selection": identify which agents are relevant, load their definitions, and apply their perspective to the task.
1. Identify Relevant Agents
Discover available agents from .cursor/agents/ (the plugin manifest .cursor-plugin/plugin.json points "agents" to that folder). For each task, pick the agent(s) whose domain matches. The command may override with a Relevant agents for this command list; use that when provided.
| Domain |
Agent |
When to use |
| Skills / agent workflows |
ai-automation-expert |
Write or refine technical skills, agent definitions, SKILL.md, or automation rules with strict style and philosophy |
| Architecture / compliance |
architecture-strategist |
PRs, adding services, structural refactors, pattern compliance |
| Backend / API |
backend-architect |
APIs, server-side code, databases |
| Backend review |
backend-reviewer |
Review APIs, server logic, data integrity; produce rework lists |
| Database / schema / queries |
database-expert |
Schema design, migrations, queries, indexing, DBA-level tuning |
| Research / deep investigation |
deep-research-agent |
Comprehensive research, adaptive strategies |
| E2E / integration testing |
e2e-runner |
Playwright E2E tests, coverage, critical paths |
| Frontend / UI |
frontend-architect |
UI, components, accessibility, client-side code |
| Frontend review |
frontend-reviewer |
Review UI, a11y, performance; produce rework lists |
| Learning / explanations |
learning-guide |
Teaching concepts, explaining code |
| Patterns / consistency |
pattern-recognition-specialist |
Design patterns, anti-patterns, naming, duplication |
| Performance |
performance-engineer |
Bottlenecks, optimization, measurement-driven analysis |
| Refactoring / code quality |
refactoring-expert |
Technical debt, safe refactors, clean code |
| Requirements / discovery |
requirements-analyst |
PRDs, user stories, acceptance criteria |
| Security |
security-engineer |
Auth, sensitive data, OWASP-aligned checks |
| System architecture |
system-architect |
Scalable design, maintainability, technical decisions |
| Technology choices |
tech-stack-researcher |
New features, tech comparisons, implementation options |
| Documentation |
technical-writer |
APIs, guides, README, docs structure |
Cursor-only subagent types (for task spawning, e.g. mcp_task): generalPurpose, explore, shell, docs-researcher. These may not have definition files in .cursor/agents/; use them when the workflow requires general-purpose execution, codebase exploration, shell commands, or docs lookup.
2. Read Agent Definitions
- Load the relevant agent definition files from
.cursor/agents/<agent-name>.md.
- Read frontmatter (name, description), triggers, behavioral mindset, focus areas, key actions, and boundaries.
3. Apply Agent Perspective
- Use each agent’s behavioral mindset when analyzing or executing the task.
- Apply the agent’s focus areas to the work (e.g. security checks, performance considerations).
- Follow the agent’s key actions and respect boundaries (what the agent will/will not do).
4. Multi-Agent Tasks
If the task spans multiple domains:
- Identify all relevant agents and read each definition.
- Plan how their perspectives integrate and separate concerns in the output (e.g. Backend Tasks vs Frontend Tasks).
Single Source of Truth
- Agent definitions:
.cursor/agents/ — one .md file per agent (e.g. backend-architect.md, frontend-reviewer.md). The table above reflects the agents present in this folder.
- Commands that use this skill may list only the subset of agents relevant to that command (e.g. feature-plan, project-manager).
1---2name: agent-selection3description: Select and load relevant agent definitions before a task. Use when a command or workflow needs to apply specialized agent perspectives (backend, frontend, security, etc.) without duplicating the full agent list in every command.4---56# Agent Selection and Definition Loading78Use this skill whenever a command instructs you to "apply the agent-selection skill" or "follow agent-selection": identify which agents are relevant, load their definitions, and apply their perspective to the task.910## 1. Identify Relevant Agents1112Discover available agents from **`.cursor/agents/`** (the plugin manifest `.cursor-plugin/plugin.json` points `"agents"` to that folder). For each task, pick the agent(s) whose domain matches. The command may override with a **Relevant agents for this command** list; use that when provided.1314| Domain | Agent | When to use |15|--------|--------|-------------|16| **Skills / agent workflows** | **ai-automation-expert** | **Write or refine technical skills, agent definitions, SKILL.md, or automation rules with strict style and philosophy** |17| Architecture / compliance | architecture-strategist | PRs, adding services, structural refactors, pattern compliance |18| Backend / API | backend-architect | APIs, server-side code, databases |19| Backend review | backend-reviewer | Review APIs, server logic, data integrity; produce rework lists |20| Database / schema / queries | database-expert | Schema design, migrations, queries, indexing, DBA-level tuning |21| Research / deep investigation | deep-research-agent | Comprehensive research, adaptive strategies |22| E2E / integration testing | e2e-runner | Playwright E2E tests, coverage, critical paths |23| Frontend / UI | frontend-architect | UI, components, accessibility, client-side code |24| Frontend review | frontend-reviewer | Review UI, a11y, performance; produce rework lists |25| Learning / explanations | learning-guide | Teaching concepts, explaining code |26| Patterns / consistency | pattern-recognition-specialist | Design patterns, anti-patterns, naming, duplication |27| Performance | performance-engineer | Bottlenecks, optimization, measurement-driven analysis |28| Refactoring / code quality | refactoring-expert | Technical debt, safe refactors, clean code |29| Requirements / discovery | requirements-analyst | PRDs, user stories, acceptance criteria |30| Security | security-engineer | Auth, sensitive data, OWASP-aligned checks |31| System architecture | system-architect | Scalable design, maintainability, technical decisions |32| Technology choices | tech-stack-researcher | New features, tech comparisons, implementation options |33| Documentation | technical-writer | APIs, guides, README, docs structure |3435**Cursor-only subagent types** (for task spawning, e.g. `mcp_task`): `generalPurpose`, `explore`, `shell`, `docs-researcher`. These may not have definition files in `.cursor/agents/`; use them when the workflow requires general-purpose execution, codebase exploration, shell commands, or docs lookup.3637## 2. Read Agent Definitions3839- Load the relevant agent definition files from `.cursor/agents/<agent-name>.md`.40- Read frontmatter (name, description), triggers, behavioral mindset, focus areas, key actions, and boundaries.4142## 3. Apply Agent Perspective4344- Use each agent’s behavioral mindset when analyzing or executing the task.45- Apply the agent’s focus areas to the work (e.g. security checks, performance considerations).46- Follow the agent’s key actions and respect boundaries (what the agent will/will not do).4748## 4. Multi-Agent Tasks4950If the task spans multiple domains:5152- Identify all relevant agents and read each definition.53- Plan how their perspectives integrate and separate concerns in the output (e.g. Backend Tasks vs Frontend Tasks).5455## Single Source of Truth5657- **Agent definitions:** `.cursor/agents/` — one `.md` file per agent (e.g. `backend-architect.md`, `frontend-reviewer.md`). The table above reflects the agents present in this folder.58- Commands that use this skill may list only the **subset** of agents relevant to that command (e.g. feature-plan, project-manager).