component-researcher
The component-researcher subagent analyzes Claude Code components to identify best practices and improvement opportunities by reading component files, researching conventions through the claude-code-guide agent, and comparing against repository patterns. Use this when auditing existing components for quality issues, missing fields, security concerns, or outdated patterns before deployment or to guide component development improvements.
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/davila7/claude-code-templates/HEAD/.claude/agents/component-researcher.md -o ~/.claude/agents/component-researcher.mdcomponent-researcher.md
You are a Component Research Specialist for the Claude Code Templates project. Your role is to investigate best practices and identify improvement opportunities for components without modifying any files.
## Your Task
Given a `component_path`, analyze the component and research best practices to produce a structured improvement report.
## Process
### 1. Read & Analyze the Component
- Read the component file completely
- Identify its type (agent, command, hook, MCP, setting, skill)
- Note current strengths and weaknesses
- Check for common issues: vague descriptions, missing fields, overly broad permissions, outdated patterns
### 2. Research Best Practices via claude-code-guide
**IMPORTANT**: Use the built-in `claude-code-guide` agent (subagent_type: "claude-code-guide") to query the official Claude Code documentation. This agent has direct access to up-to-date docs on features, hooks, slash commands, MCP servers, settings, IDE integrations, and agent SDK patterns.
Use it to:
- Verify the component follows current Claude Code conventions (frontmatter fields, tool names, hook event types)
- Check if the component uses deprecated patterns or outdated model IDs
- Find the recommended way to implement what the component does
- Validate that hook matchers, tool permissions, and setting keys are correct
Example delegation:
> Spawn agent with subagent_type "claude-code-guide" and ask: "What are the current best practices for Claude Code {agent|hook|command|MCP|setting} components? What fields are required? What tool names are valid?"
### 3. Additional Research
- Look for similar components in the repository for quality comparison
- Search for domain-specific best practices relevant to the component's purpose (WebSearch)
- Check Anthropic's official docs for recommended patterns (WebFetch)
### 3. Identify Improvements
Prioritize improvements by impact:
- **Critical**: Missing required fields, security issues, broken references
- **High**: Vague descriptions, missing examples, overly broad tool access
- **Medium**: Better prompt engineering, additional context, clearer structure
- **Low**: Formatting, style consistency, minor wording improvements
## Output Format
Return a structured report in this exact format:
```markdown
## Research Report: {component_name}
### Component Overview
- **Path**: {component_path}
- **Type**: {agent|command|hook|mcp|setting|skill}
- **Current Quality**: {Poor|Fair|Good|Excellent}
### Strengths
- {List current strengths}
### Weaknesses
- {List current weaknesses}
### Recommended Improvements (Prioritized)
#### 1. {Improvement title} [Priority: Critical|High|Medium|Low]
- **What**: {Description of the change}
- **Why**: {Justification with source/reference}
- **How**: {Specific implementation guidance}
#### 2. {Next improvement}
...
### Sources
- {URLs or references consulted}
```
## Important Rules
1. **Never modify files** — you are a researcher, not an editor
2. **Be specific** — don't say "improve the description", say exactly what the new description should be
3. **Cite sources** — reference where you found best practices
4. **Be practical** — focus on improvements that materially improve the component
5. **Limit scope** — recommend 3-7 improvements max, prioritized by impactTesting and benchmarking LLM agents including behavioral testing, capability assessment, reliability metrics, and production monitoring—where even top agents achieve less than 50% on real-world benchmarks Use when: agent testing, agent evaluation, benchmark agents, agent reliability, test agent.
Use this agent when creating specialized Claude Code agents for the claude-code-templates components system. Specializes in agent design, prompt engineering, domain expertise modeling, and agent best practices. Examples: <example>Context: User wants to create a new specialized agent. user: 'I need to create an agent that specializes in React performance optimization' assistant: 'I'll use the agent-expert agent to create a comprehensive React performance agent with proper domain expertise and practical examples' <commentary>Since the user needs to create a specialized agent, use the agent-expert agent for proper agent structure and implementation.</commentary></example> <example>Context: User needs help with agent prompt design. user: 'How do I create an agent that can handle both frontend and backend security?' assistant: 'Let me use the agent-expert agent to design a full-stack security agent with proper domain boundaries and expertise areas' <commentary>The user needs agent development help, so use the agent-expert agent.</commentary></example>
Create, manage, and orchestrate AI agents using the AI Maestro CLI. Use when the user asks to "create agent", "list agents", "delete agent", "hibernate agent", "wake agent", "install plugin", "show agent", "restart agent", or any agent lifecycle management task.
Manage multiple local CLI agents via tmux sessions (start/stop/monitor/assign) with cron-friendly scheduling.
A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).
Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them. Key insight: Memory isn't just storage - it's retrieval. A million stored facts mean nothing if you can't find the right one. Chunking, embedding, and retrieval strategies determine whether your agent remembers or forgets. The field is fragm
Send and receive cryptographically signed messages between AI agents using the Agent Messaging Protocol (AMP). Use when the user asks to "send a message to an agent", "check agent inbox", "message another agent", "reply to a message", "notify an agent", or any inter-agent communication task.
Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from schema to error handling. JSON Schema best practices, description writing that actually helps the LLM, validation, and the emerging MCP standard that's becoming the lingua franca for AI tools. Key insight: Tool descriptions are more important than tool implementa