xiaohongshu
xiaohongshu
hybrid-agent-detector
Detects hybrid agent anti-pattern where agents perform execution work directly instead of delegating to skills
Full skill instructions
Correct Pattern: Agents orchestrate (invoke skills), Skills execute (run scripts) Anti-Pattern: Agents do both orchestration AND execution
Problem: Agents doing work directly consumes context unnecessarily and violates separation of concerns.
Impact:
You analyze agents to identify execution patterns that should be in skills. </CONTEXT>
<CRITICAL_RULES>
Detect agents performing execution work directly.
Input:
project_path: Path to Claude Code project rootProcess:
scripts/detect-hybrid-agents.sh "{project_path}"Output:
{
"status": "success",
"hybrid_agents_detected": true,
"total_hybrid_agents": 3,
"agents": [
{
"agent_name": "data-processor",
"file": ".claude/agents/data-processor.md",
"hybrid_score": 0.75,
"execution_patterns": [
{
"pattern_type": "file_operations",
"instances": 5,
"evidence": ["Read tool", "Write tool", "Edit tool"],
"severity": "high"
},
{
"pattern_type": "data_processing",
"instances": 3,
"evidence": ["Direct JSON parsing", "Data transformation"],
"severity": "medium"
}
],
"orchestration_present": true,
"recommendation": "Extract execution to skills"
}
]
}
Analyze tool usage patterns in agents to identify execution vs orchestration.
Input:
project_path: Path to Claude Code project roothybrid_agents: Detected hybrid agents from detect-hybrid-agents operationProcess:
scripts/analyze-tool-usage.sh "{project_path}" "{hybrid_agents_json}"Output:
{
"status": "success",
"tool_analysis": [
{
"agent_name": "data-processor",
"tools_used": ["Read", "Write", "Edit", "Skill", "Bash"],
"orchestration_tools": ["Skill"],
"execution_tools": ["Read", "Write", "Edit", "Bash"],
"hybrid_score": 0.80,
"tool_usage_breakdown": {
"orchestration_percentage": 0.20,
"execution_percentage": 0.80
},
"verdict": "Hybrid - primarily execution"
}
],
"patterns": {
"pure_orchestrators": 2,
"hybrid_agents": 3,
"pure_executors": 0
}
}
Calculate benefits of separating execution into skills.
Input:
project_path: Path to Claude Code project roothybrid_agents: Detected hybrid agentsProcess:
scripts/calculate-separation-benefits.sh "{project_path}" "{hybrid_agents_json}"Output:
{
"status": "success",
"separation_benefits": [
{
"agent_name": "data-processor",
"current_agent_size": 52000,
"execution_logic_size": 28000,
"projected_agent_size": 24000,
"new_skills_created": 3,
"skills_total_size": 15000,
"context_reduction": 13000,
"reduction_percentage": 0.25,
"reusability_score": 0.70,
"benefits": [
"25% context reduction in agent",
"3 reusable skills created",
"Execution testable independently"
]
}
],
"total_context_savings": 35000,
"total_new_skills": 8
}
</OPERATIONS>
<DOCUMENTATION> Upon completion of analysis, output:✅ COMPLETED: Hybrid Agent Detector
Project: {project_path}
───────────────────────────────────────
Hybrid Agents: {count}
Avg Hybrid Score: {score}
Context Savings: {tokens} tokens ({percentage}% reduction)
New Skills Extractable: {count}
───────────────────────────────────────
Results returned to: project-auditor agent
</DOCUMENTATION>
<ERROR_HANDLING>
No hybrid agents detected:
{
"status": "success",
"hybrid_agents_detected": false,
"message": "All agents properly delegate to skills"
}
Script execution failed:
{
"status": "error",
"error": "script_failed",
"script": "{script_name}",
"message": "{error_output}"
}
</ERROR_HANDLING>
Invoked By:
Depends On:
.claude/agents/Outputs To:
Execution Patterns Detected:
File Operations: Read, Write, Edit tools used directly
Evidence: Read tool usage in agent prompt
Should be: Invoke skill that uses Read
Data Processing: Direct manipulation in agent
Evidence: JSON parsing, transformation logic
Should be: Skill with processing script
API Calls: Direct HTTP requests in agent
Evidence: Bash curl commands
Should be: API client skill
System Operations: Direct bash commands
Evidence: grep, awk, sed in agent workflow
Should be: Skills with dedicated scripts
Orchestration Patterns (Correct):
Hybrid Score Calculation:
hybrid_score = execution_tools / total_tools
0.0 - 0.2: Pure Orchestrator (Good)
0.2 - 0.5: Mostly Orchestrator (Acceptable)
0.5 - 0.8: Hybrid (Needs Improvement)
0.8 - 1.0: Pure Executor (Anti-Pattern)
Severity Levels:
Valid Execution in Agents:
Migration Strategy:
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