Data & AI
AGENT_USAGE_GUIDE - Claude MCP Skill
Agent Usage Guide
SEO Guide: Enhance your AI agent with the AGENT_USAGE_GUIDE tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to agent usage guide... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Agent Usage Guide
## frontend-qc-agent and frontend-debug-agent
**Audience**: Claude Code users and developers
**Purpose**: Explain when and how to use frontend agent architecture
---
## Overview
The frontend skills (`frontend-qc` and `frontend-debug`) now feature intelligent complexity detection that automatically routes complex scenarios to specialized agents.
**User Benefit**: You don't need to know about agents - they activate automatically when needed.
## How It Works
### Automatic Routing
```
User Request
β
Skill Loads (Always)
β
Complexity Assessment
β
Decision:
ββ Simple β Skill handles (normal operation)
ββ Complex β Agent invoked (parallel/deep analysis)
```
**You see**: Same user experience
**Behind scenes**: Different execution strategy based on complexity
---
## frontend-qc: QA Testing
### Skill Mode (Automatic for Simple Cases)
**Triggers**:
- 1-3 components to test
- Sequential testing acceptable
- Standard QA workflow
**Example**:
```
User: "Test the login form"
β Skill Mode (sequential testing in main context)
```
### Agent Mode (Automatic for Complex Cases)
**Triggers**:
- >3 components
- "parallel" keyword
- Time-critical campaigns
**Example**:
```
User: "Test login, registration, checkout, and profile pages"
β Agent Mode (4 parallel sub-agents)
β Results aggregated
β 3x faster completion
```
**What Happens**:
1. Skill detects 4 components (>3 threshold)
2. Invokes `frontend-qc-agent` via Task tool
3. Agent spawns 4 sub-agents (1 per component)
4. Sub-agents test concurrently in isolated browsers
5. Agent aggregates results
6. Unified report generated
**Benefits**:
- **Speed**: 3-5x faster than sequential
- **Efficiency**: Isolated contexts, no token pollution
- **Quality**: Same thorough testing per component
---
## frontend-debug: Bug Debugging
### Skill Mode (Automatic for Simple Bugs)
**Triggers**:
- High confidence (>60%)
- Single domain (e.g., only UI issue)
- Clear root cause
**Example**:
```
User: "Login button not responding"
β Skill Mode (single-domain investigation)
β Root cause: Missing click handler
β Confidence: 85%
β Fix applied
```
### Agent Mode (Automatic for Complex Bugs)
**Triggers**:
- Low confidence (<60%)
- Multi-domain (network + state + UI)
- Systemic issues (affecting >3 components)
- Skill loop iteration failed
**Example**:
```
User: "Login sometimes fails randomly"
β Skill investigates
β Confidence: 45% (too low)
β Agent Mode activated
β Spawns Network + State specialists
β Specialists investigate in parallel
β Findings synthesized
β Root cause: Backend pool + frontend timing issue
β Confidence: 90%
β Integrated fix applied
```
**What Happens**:
1. Skill detects low confidence or multi-domain
2. Invokes `frontend-debug-agent` via Task tool
3. Agent scores specialist relevance
4. Spawns relevant specialists (network, state, UI, perf)
5. Specialists investigate in parallel
6. Agent synthesizes findings
7. Integrated fix generated and verified
**Benefits**:
- **Accuracy**: 85-95% confidence vs 45-60% in skill
- **Speed**: Parallel specialist investigation
- **Quality**: Multi-domain fixes address root causes
---
## Manual Invocation (Advanced Users)
If you understand the architecture, you can explicitly request agents:
### Force Agent Mode for QA
```
User: "Use the frontend-qc-agent to test these 10 components in parallel"
```
Claude will directly invoke the agent, bypassing skill complexity detection.
### Force Agent Mode for Debugging
```
User: "Use the frontend-debug-agent with network and state specialists to debug this issue"
```
Claude will invoke the agent with specified specialists.
---
## Monitoring Agent Activity
**TodoWrite Visibility**:
When agents are invoked, you'll see TodoWrite structure like:
```
Main Task: Parallel QA Campaign
βββ [in_progress] Sub-Agent 1: Login Component
βββ [in_progress] Sub-Agent 2: Registration Component
βββ [in_progress] Sub-Agent 3: Checkout Component
βββ [pending] Aggregate Results
```
Or for debugging:
```
Main Task: Complex Debug Investigation
βββ [in_progress] Network Specialist: API failure analysis
βββ [in_progress] State Specialist: Redux synchronization
βββ [pending] Synthesize Findings
βββ [pending] Verify Integrated Fix
```
---
## Performance Comparison
### frontend-qc
| Scenario | Skill Mode | Agent Mode | Speedup |
|----------|------------|------------|---------|
| 1 component | 15 min | N/A (uses skill) | - |
| 3 components | 45 min | N/A (uses skill) | - |
| 5 components | 75 min | 20 min | **3.75x** |
| 10 components | 150 min | 25 min | **6x** |
### frontend-debug
| Scenario | Skill Mode | Agent Mode | Improvement |
|----------|------------|------------|-------------|
| Simple bug (high confidence) | 20 min, 85% confidence | N/A (uses skill) | - |
| Complex bug (low confidence) | 60 min, 55% confidence | 30 min, 90% confidence | **2x speed, 1.6x confidence** |
| Multi-domain issue | 3 iterations (60 min), 60% confidence | 1 coordinated fix (30 min), 95% confidence | **2x speed, 1.6x confidence** |
---
## Troubleshooting
### Issue 1: Task Tool Not Available (CRITICAL)
**Symptoms**:
- Skill detects complexity correctly (e.g., "4 components > 3 threshold")
- Delegation decision logged
- Error message: "Task tool not available in current context"
- Falls back to coordinated sequential testing
**Root Cause**: Skill's `allowed-tools` configuration missing `Task` tool
**Diagnosis Steps**:
1. Check skill's SKILL.md frontmatter:
```bash
head -10 ~/.claude/skills/frontend-qc/SKILL.md
```
2. Look for `allowed-tools:` line
3. Verify `Task` is included in the list
**Fix**:
```yaml
# BEFORE (Broken - Phase 3.1 discovery)
allowed-tools: Skill(chrome-devtools), Skill(report-bug), Skill(email), Read, Write
# AFTER (Fixed)
allowed-tools: Skill(chrome-devtools), Skill(report-bug), Skill(email), Read, Write, Task
```
**Validation**:
1. Save the updated SKILL.md file
2. Re-invoke skill with complex scenario (>3 components or multi-domain issue)
3. Verify Task tool invocation succeeds
4. Confirm agent spawns and delegates work
**Real Example** (Phase 3.1):
- frontend-qc detected 4 components correctly
- Logged: "Decision: FALLBACK TO COORDINATED PARALLEL EXECUTION"
- Reason: "Task tool not available in current context"
- Fix: Added `, Task` to line 4 of SKILL.md
- Result: Agent delegation now works
**Prevention**:
- Use explicit `allowed-tools` for all delegation-capable skills
- Include `Task` in all skills that may delegate to agents
- See `DELEGATION_PATTERNS_GUIDE.md` for skill design checklist
### Issue 2: Agent Not Activating When Expected
**Check**:
1. Complexity thresholds met? (>3 components, <60% confidence, multi-domain)
2. Keywords present? ("parallel", "simultaneous", specific domains)
3. Skill escalation logic working? (Check logs for complexity assessment)
**Solution**:
- Explicitly request agent mode
- Verify Task tool is available (see Issue 1)
- Check that agent files exist
### Issue 3: Agent Fails to Spawn Sub-Agents
**Possible Causes**:
- Task tool not available (see Issue 1 - most common)
- Agent definition file missing or malformed
- Sub-agent file path incorrect
- Agent YAML frontmatter invalid
**Diagnosis**:
```bash
# Check agent files exist
ls -la ~/.claude/agents/frontend-*-agent.md
# Check agent frontmatter
head -20 ~/.claude/agents/frontend-qc-agent.md
# Check for syntax errors
grep -A 5 "^---$" ~/.claude/agents/frontend-qc-agent.md
```
**Solution**:
- Verify agent files exist at correct paths
- Validate YAML frontmatter syntax
- Ensure agent names match exactly in Task invocations
- Fix Task tool availability (Issue 1)
### Issue 4: Specialists Not Being Invoked
**Check**: Specialist relevance scores
- Network score >0.6? (Need API failures, CORS, 404, timeout in evidence)
- State score >0.6? (Need undefined errors, localStorage issues in evidence)
- UI score >0.6? (Need responsive design, CSS, rendering issues in evidence)
- Performance score >0.6? (Need slow loading, memory, bundle size in evidence)
**Diagnosis**:
```javascript
// Check if domain keywords are present in issue description
const hasNetworkKeywords = /API|404|CORS|timeout|endpoint/.test(issueDescription);
const hasStateKeywords = /undefined|null|state|redux|localStorage/.test(issueDescription);
const hasUIKeywords = /display|render|CSS|responsive|mobile/.test(issueDescription);
const hasPerfKeywords = /slow|memory|bundle|loading|performance/.test(issueDescription);
```
**Solution**:
- Provide more domain-specific evidence in issue description
- Include specific error messages (e.g., "404 on /api/payment")
- Mention domain indicators (e.g., "localStorage key mismatch")
- Lower specialist relevance threshold if too restrictive
### Issue 5: Performance Not Meeting Expectations
**Symptoms**:
- Parallel execution not faster than expected
- High token usage despite agent delegation
- Agents spawning slowly
**Possible Causes**:
- Specialists running sequentially instead of parallel
- Context being duplicated across specialists
- Network latency in MCP server calls
- Too many specialists spawned (resource contention)
**Diagnosis**:
```bash
# Check if specialists truly run in parallel
# Look for concurrent "in_progress" states in TodoWrite
# Check token usage patterns
# Monitor main context vs specialist context sizes
```
**Solution**:
- Ensure Task tool properly spawns parallel agents
- Minimize context passed to specialists
- Use isolated browser sessions (frontend-qc)
- Optimize specialist coordination logic
- Consider lowering max_concurrent limit if resource constrained
### Issue 6: Skill Configuration Inconsistency
**Symptoms**:
- One skill delegates successfully (e.g., frontend-debug)
- Another skill fails to delegate (e.g., frontend-qc)
- Both have similar complexity scenarios
**Root Cause**: Different `allowed-tools` configurations
**Examples**:
```yaml
# frontend-debug (works - no restrictions)
# No allowed-tools line = all tools available including Task
# frontend-qc (was broken - explicit restrictions)
allowed-tools: Skill(chrome-devtools), Skill(report-bug), Skill(email), Read, Write
# Missing: Task
```
**Solution**:
- Standardize on either explicit or permissive approach
- If using explicit `allowed-tools`, always include `Task` for delegation
- Document tool requirements in skill design
- See `DELEGATION_PATTERNS_GUIDE.md` for configuration patterns
---
## Best Practices
### For Users
1. **Let Automation Work**: Don't worry about agents, trust complexity detection
2. **Provide Good Evidence**: Clear issue descriptions help agent routing
3. **Watch TodoWrite**: Monitor agent progress through task tracking
4. **Trust the Process**: Agents take slightly longer to start but finish much faster
### For Developers
1. **Test Thresholds**: Validate complexity thresholds match your use cases
2. **Monitor Performance**: Track agent vs skill usage and performance
3. **Tune Scoring**: Adjust specialist relevance scoring based on accuracy
4. **Document Issues**: Report agent routing problems for tuning
---
## FAQ
**Q: Will agents increase costs (tokens)?**
A: No - agents isolate heavy reasoning in separate contexts, reducing main context pollution. Net effect: 30-50% token savings for complex scenarios.
**Q: Can I disable agent mode?**
A: Not currently, but you can set higher thresholds in skill complexity detection logic.
**Q: What if agent fails?**
A: Skills have fallback logic to continue in skill mode if agent invocation fails.
**Q: How do I know which mode is being used?**
A: Watch for Task tool invocation messages or TodoWrite structure changes indicating agent activity.
---
---
## Additional Resources
### Delegation Patterns Guide
For detailed technical information about skillβagent delegation architecture:
**See**: `~/.claude/skills/DELEGATION_PATTERNS_GUIDE.md`
**Topics Covered**:
- Architecture overview and benefits
- Delegation decision frameworks (quantity-based vs multi-factor)
- Configuration requirements and templates
- Complexity detection patterns
- Agent orchestration strategies
- Comprehensive troubleshooting
- Design checklists
- Real-world examples with performance metrics
**When to Read**:
- Designing new skills that delegate to agents
- Debugging delegation issues
- Understanding complexity thresholds
- Optimizing agent performance
### Phase 3 Test Results
**frontend-qc Testing**: `~/.claude/skills/frontend-qc/phase3-test-results.md`
- 4-component parallel testing validation
- Task tool availability fix discovery and resolution
- Bug discovery verification (2/2 intentional bugs found)
**frontend-debug Testing**: `~/.claude/skills/frontend-debug/phase3-test-results.md`
- Multi-domain complexity detection validation
- Escalation indicator system verification
- E-commerce checkout flow test application (10 intentional bugs)
---
**End of Usage Guide**
**Last Updated**: 2025-10-23 (Phase 3 validation complete)Signals
Information
- Repository
- arlenagreer/claude_configuration_docs
- Author
- arlenagreer
- Last Sync
- 3/12/2026
- Repo Updated
- 3/11/2026
- Created
- 1/15/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
upgrade-webkit
Upgrade Bun's Webkit fork to the latest upstream version of Webkit.
upgrade-nodejs
Upgrading Bun's Self-Reported Node.js Version
cursorrules
CrewAI Development Rules
cn-check
Install and run the Continue CLI (`cn`) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
Mastering tmux with Claude: A Complete Guide to the tmux Claude Skill
Learn how to use the tmux Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.