.claude/skills/flow-skill-engineer-subagent/SKILL.md
Guide for creating effective Subagents (custom agent definitions). Use when users want to create a new subagent, set up task-specific agents, configure code reviewers, debuggers, or domain-specific assistants. Works across IDEs (Cursor, OpenCode).
npx skillsauth add korchasa/ai-skel-ts flow-skill-engineer-subagentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides through creating effective Subagents — custom agent definitions that provide specialized AI assistants with focused system prompts.
Subagents are specialized AI assistants that extend agent capabilities with:
Subagents work across multiple IDEs. Before creating a subagent, determine the current environment and ask the user where to place it.
| Primitive | Scope | Cursor | Claude Code | OpenCode |
| :--- | :--- | :--- | :--- | :--- |
| Custom Agents (Subagents) | User | ~/.cursor/agents/*.md | ~/.claude/agents/*.md | ~/.config/opencode/agents/*.md |
| | Project | .cursor/agents/*.md | .claude/agents/*.md | .opencode/agents/*.md |
| IDE | Personal Subagents | Project Subagents |
|-----|-------------------|-------------------|
| Cursor | ~/.cursor/agents/*.md | .cursor/agents/*.md |
| Claude Code | ~/.claude/agents/*.md | .claude/agents/*.md |
| OpenCode | ~/.config/opencode/agents/*.md | .opencode/agents/*.md |
.cursor/ directory → Cursor.claude/ directory → Claude Code.opencode/ directory or opencode.json → OpenCodeIMPORTANT: Never create subagents in ~/.cursor/agents-cursor/ (reserved for Cursor internals) or other IDE-reserved directories.
Each subagent should excel at one specific task.
code-reviewer — focused on reviewing code qualityhelper — too broad, overlaps with default agentThe description determines when the main agent delegates to this subagent.
| Freedom Level | When to Use | Example | |---------------|-------------|---------| | High (manual) | User explicitly requests | "Use the data-analyst to..." | | Medium (suggested) | Agent suggests based on context | "Consider using debugger for errors" | | Low (proactive) | Automatic delegation on pattern match | "Use code-reviewer after code changes" |
Every subagent is a .md file with YAML frontmatter and a markdown body:
my-agent.md
├── Frontmatter (YAML) # Metadata: name, description, mode, etc.
└── Body (Markdown) # System prompt: behavior, workflow, constraints
---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
model: inherit
readonly: false
---
| Field | Description | Default |
|-------------|---------------------------------------------------|----------------------------|
| name | Agent name | Required |
| description | Task description and role definition | Required |
| model | Suggested model (inherit, fast, slow, or model ID) | Inherits from conversation |
| readonly | If true, restricts agent to read-only tools (no file edits, shell writes) | false |
---
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
mode: subagent
model: gpt-4o
temperature: 0.3
permission: auto
---
| Field | Description | Default |
|-------|-------------|---------|
| mode | primary / subagent / all | subagent |
| model | Specific model string | Inherits from conversation |
| temperature | Creativity (0.0-2.0) | Inherits |
| top_p | Nucleus sampling (0.0-1.0) | Inherits |
| steps | Max reasoning steps | Inherits |
| tools | Allowed tools | Inherits |
| permission | auto / ask / none | Inherits |
| color | UI color code | Inherited |
| hidden | Hide from UI | false |
| disable | Disable subagent | false |
The description is critical - the AI uses it to decide when to delegate.
Third person (injected into system prompt):
Specific with trigger terms:
Include WHAT and WHEN:
Action verbs: Start with verbs describing what the subagent does.
# ❌ Too vague
description: Helps with code
# ❌ Not specific enough
description: Code reviewer
# ✅ Specific and actionable
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
---
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.
---
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.
---
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.
---
name: docs-specialist
description: Technical documentation expert for API docs, README files, and inline comments. Use proactively when writing or updating documentation.
---
You are a technical documentation specialist focused on clarity and completeness.
When invoked:
1. Understand the code or feature being documented
2. Identify target audience (developers, users, etc.)
3. Structure documentation logically
4. Write clear, concise explanations
5. Include examples and use cases
Documentation principles:
- Start with user's goal, not implementation
- Provide concrete examples
- Keep explanations simple and direct
- Use consistent terminology
- Link to related topics
For each documentation piece:
- Overview (what and why)
- Quick start (minimal example)
- Reference (detailed parameters)
- Examples (common use cases)
- Troubleshooting (common issues)
Gather from user:
If context from prior conversation exists, infer the subagent from discussed workflows or specialized tasks.
Create the file in the IDE-appropriate location:
# Cursor (project-level)
mkdir -p .cursor/agents && touch .cursor/agents/my-agent.md
# Claude Code (project-level)
mkdir -p .claude/agents && touch .claude/agents/my-agent.md
# OpenCode (project-level)
mkdir -p .opencode/agents && touch .opencode/agents/my-agent.md
Write the frontmatter with required fields:
name, description; optional model, readonlyname, description; optional modeldescription, optional mode, model, etc.Write the system prompt body:
Test the subagent:
# Test by asking the main agent to use it
"Use the my-agent subagent to [task description]"
Checklist:
general-helper not code-reviewerscripts/helper.py, not scripts\helper.py| Aspect | Skills | Subagents |
|--------|--------|-----------|
| Purpose | Teach agent how to do something | Define a specialized assistant |
| Format | Directory with SKILL.md | Single .md file |
| Context | Loaded as reference when triggered | Isolated conversation context |
| Use case | Reusable workflows and patterns | Specialized behavior or domain expertise |
| Scope | Procedural knowledge | Behavioral specialization |
Choose Skills when you want to extend the main agent's capabilities with new workflows or knowledge.
Choose Subagents when you want a separate assistant with a focused role and isolated context.
tools
Scaffold a complete AI agent application skeleton with LLM integration, tool calling, observability, cost tracking, session management, and content fetching using @korchasa/ai-skel-ts. Use when the user asks to create an AI agent, add LLM integration, scaffold an AI application, or mentions "ai-skel", "agent skeleton", or "AI scaffold". Works with any programming language.
testing
Create structured specification for large features using phased decomposition. Produces documents/spec-{name}.md with dependency-ordered phases, atomic tasks, explicit boundaries, and per-phase status tracking.
documentation
Guidelines for writing comprehensive Product Requirements Documents (PRD)
development
How to write in informational style