This skill should be used when designing agent coordination, implementing context handoffs, reducing context overhead, creating multi-agent workflows, optimizing agent communication, implementing progressive disclosure, selecting architectural patterns (hierarchical vs swarm), or debugging agent context issues. Provides SOTA patterns for multi-agent systems achieving 78%+ context reduction while maintaining analysis quality.
Implements context-efficient multi-agent workflows using selective projection and tiered fidelity patterns. Triggers when designing agent coordination, optimizing communication, or debugging context overhead in complex multi-agent systems.
/plugin marketplace add abossenbroek/abossenbroek-claude-plugins/plugin install red-agent@abossenbroek-claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/context-engineering.mdreferences/examples.mdreferences/patterns.mdState-of-the-art patterns for context-efficient multi-agent systems. These patterns enable complex agent workflows while minimizing token overhead through strategic context engineering.
| Pattern | Use When | Trade-offs |
|---|---|---|
| Hierarchical | Clear decomposition, audit trails | Central bottleneck, sequential latency |
| Swarm | Parallel exploration, diverse perspectives | Coordination overhead, emergent behavior |
| ReAct | Dynamic adaptation, tool-heavy workflows | Myopic decisions, may meander |
| Plan-Execute | Clear sequence, predictability needed | Less adaptive, requires replanning |
| Reflection | Quality refinement, self-correction | Added latency, may reinforce errors |
| Hybrid | Multiple coordination needs | Implementation complexity |
For detailed YAML definitions and examples of each pattern, see references/patterns.md.
Pass only fields each agent needs, not full data structures.
# BAD: Full snapshot everywhere
snapshot: {...20KB...}
# GOOD: Selective projection
context:
mode: deep
claims_analyzed: 15
high_risk_count: 4
Define explicit tiers based on agent role:
| Tier | Description | Example Agent |
|---|---|---|
| FULL | Complete data | Initial analyzer |
| SELECTIVE | Relevant subset | Domain workers |
| FILTERED | Criteria-matched | Validators |
| MINIMAL | Mode + counts | Strategy/routing |
| METADATA | Scope stats only | Report synthesis |
For large data, pass reference instead of full structure:
# Embedding (expensive)
raw_findings: [{...}, {...}, ...] # 40+ items
# Reference (efficient)
findings_summary:
total: 45
by_severity: {CRITICAL: 3, HIGH: 12}
# Agent fetches specific findings on-demand
Load data on-demand, not upfront:
initial_context:
scope: {item_count: 45}
available_data:
- name: findings
fetch: "request by severity or ID"
For implementation details and patterns, see references/context-engineering.md.
handoff:
from_agent: context-analyzer
to_agent: attack-strategist
context_level: MINIMAL
payload:
mode: deep
analysis_summary:
claim_count: 15
high_risk_count: 4
patterns: [pattern_1, pattern_2]
expected_output:
format: yaml
schema: strategy_v1
Reduce validation operations by routing based on priority:
batching:
CRITICAL: [all_validators] # 4 agents
HIGH: [checker, verifier] # 2 agents
MEDIUM: [checker] # 1 agent
LOW/INFO: [] # Skip
# Result: 60-70% fewer operations
level_1_always_loaded:
- skill_name
- skill_description
tokens: ~100
level_2_on_trigger:
- main_skill_body
- core_patterns
- quick_reference_tables
tokens: ~2000
level_3_on_demand:
- detailed_references
- extended_examples
- implementation_guides
tokens: as_needed
validation:
hook: post_tool_use
on_invalid:
action: block_and_retry
max_retries: 2
on_valid:
action: continue
Document what each agent does NOT receive:
agent_context:
receives:
- analysis_summary
- assigned_vectors
not_provided: # CRITICAL: Explicit exclusions
- full_snapshot
- other_agents_data
- conversational_arc
Track these to validate optimization:
| Metric | Target |
|---|---|
| Total context passed | < 100KB |
| Redundancy ratio | < 0.1 |
| Validation efficiency | > 3:1 findings/operations |
| Tier compliance | 100% |
references/context-engineering.md - Detailed context management patternsreferences/patterns.md - Architectural patterns with YAML definitionsreferences/examples.md - Red-agent implementation examples