xiaohongshu
xiaohongshu
manage-agents
Creates, modifies, and manages Claude Code subagents by writing agent files with YAML frontmatter, system prompts, and tool configurations. Use when you need to "create an agent", "modify an agent", "set up a specialist", "I need an agent for [task]", "agent to handle [domain]", or "configure age...
Full skill instructions
Create and manage specialized Claude Code subagents with custom capabilities, tool access, and expertise domains.
Use this skill when you need to:
To create a new agent:
Before creating an agent, determine:
Project Agent (checked into git):
# Location: .claude/agents/my-specialist.md
User Agent (personal, not in git):
# Location: ~/.claude/agents/my-specialist.md
Priority: Project agents override user agents with the same name.
Use this template:
---
name: agent-name
description: Clear description of what this agent does and when to use it
model: claude-sonnet-4
tools:
- Read
- Write
- Grep
- Glob
- Bash
mcp_servers:
- server-name
allow_all_tools: false
allow_all_mcp_servers: false
allow_mcp_resources_from_all_servers: false
---
# Agent Name - Specialized Role
You are a specialized agent focused on [domain/task]. Your expertise includes:
- [Key capability 1]
- [Key capability 2]
- [Key capability 3]
## Your Responsibilities
1. **[Primary Responsibility]**: Clear description
2. **[Secondary Responsibility]**: Clear description
3. **[Quality Standards]**: What standards you uphold
## Tools Available
You have access to:
- [Tool 1]: [How to use it]
- [Tool 2]: [How to use it]
- [MCP Server]: [What it provides]
## Workflow
When invoked, follow these steps:
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Quality Gates
Before completing work:
- [ ] [Quality check 1]
- [ ] [Quality check 2]
- [ ] [Quality check 3]
## Integration with Skills
You can leverage these skills:
- [Skill 1]: [When to use]
- [Skill 2]: [When to use]
## Best Practices
- [Practice 1]
- [Practice 2]
- [Practice 3]
## Examples
[Provide concrete examples of your work]
Option 1: Explicit Tool List (Recommended)
tools:
- Read
- Write
- Grep
- Glob
allow_all_tools: false
Option 2: Allow All Tools
allow_all_tools: true
Option 3: No Tools (Analysis/planning only)
tools: []
allow_all_tools: false
Option 1: Specific MCP Servers (Recommended)
mcp_servers:
- project-watch-mcp
- memory
allow_all_mcp_servers: false
Option 2: All MCP Servers
allow_all_mcp_servers: true
Option 3: All MCP Resources (Use sparingly)
allow_mcp_resources_from_all_servers: true
Choose based on task complexity:
Default if not specified: claude-sonnet-4
The content after YAML frontmatter is the system prompt. Make it:
Interactive Testing:
Invoke the agent in Claude:
@agent-name please [task description]
Programmatic Testing:
Test agents from command line using CLI tools:
# Quick test with claude_ask.py
python3 .claude/tools/agents/claude_ask.py agent-name "test question"
# Quiet mode (just the answer)
python3 .claude/tools/agents/claude_ask.py -q agent-name "test question"
# JSON output for validation
python3 .claude/tools/agents/claude_ask.py --json agent-name "test question"
# With timeout for complex tasks
python3 .claude/tools/agents/claude_ask.py agent-name "complex task" --timeout 120
For complete documentation on CLI testing tools, see:
Verify:
If this is a project agent, document in relevant files:
For complete configuration field documentation, see references/reference.md.
For practical agent examples and patterns, see the utility scripts section and references/reference.md for detailed configuration examples.
The scripts/agent_detector_example.py script demonstrates patterns for detecting agents in hooks or tools:
The example demonstrates:
detect_agent() to identify agent mentions in user promptsget_available_agents()@unit-tester)Run the example:
cd /Users/dawiddutoit/projects/play/temet-run/.claude
./.venv/bin/python3 skills/manage-agents/scripts/agent_detector_example.py
The script uses the shared .claude/ environment pattern:
# Setup: Add .claude to path for skill_utils
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent))
from skill_utils import ensure_path_setup, get_project_root
ensure_path_setup()
# Now import from the shared environment
import yaml
This pattern allows the script to access dependencies installed in .claude/pyproject.toml without duplicating virtual environments.
The scripts/create_agent_memories_simple.py script demonstrates programmatic memory creation:
The example demonstrates:
agent-{name}-core)Run the example:
cd /Users/dawiddutoit/projects/play/temet-run/.claude
uv sync --extras mcp # Install MCP dependencies (if not already done)
./.venv/bin/python3 skills/manage-agents/scripts/create_agent_memories_simple.py
Prerequisites:
uv sync --extras mcpThe script also uses the shared .claude/ environment pattern, allowing it to access yaml and fastmcp dependencies without duplicating virtual environments.
Specialized knowledge agent with read-only access for analysis and recommendations.
Write access with quality gates, focused on specific code patterns.
High-level planning agent that delegates to other agents.
Read-only validation agent that checks against standards.
MCP-focused agent with access to specific external tools.
Agent not appearing in autocomplete:
Tool access denied:
Agent behavior incorrect:
Integration issues:
Use the scripts/validate_agent.py script to check agent files:
cd /Users/dawiddutoit/projects/play/temet-run/.claude
./.venv/bin/python3 skills/manage-agents/scripts/validate_agent.py agents/my-agent.md
The validation script checks:
Before finalizing an agent:
Agents can invoke other agents:
For implementation, delegate to @implementer:
@implementer please create the service class with proper dependency injection
Best Practice: Use chaining for clear separation of concerns (planning → implementation → testing).
Let Claude choose the right agent:
"I need help with Neo4j queries"
→ Claude autonomously selects @neo4j-expert based on description
Requirement: Agent descriptions must include trigger terms and use cases.
When creating agents for project-watch-mcp:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience