skills/dowwie/multi-agent-analysis/SKILL.md
Analyze coordination patterns, handoff mechanisms, and state sharing in multi-agent systems. Use when (1) understanding how agents transfer control, (2) evaluating shared vs isolated state patterns, (3) mapping communication protocols between agents, (4) assessing multi-agent orchestration approaches, or (5) comparing coordination models across frameworks.
npx skillsauth add aiskillstore/marketplace multi-agent-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyzes coordination patterns in multi-agent systems.
┌─────────────┐
│ Supervisor │
│ (Router) │
└──────┬──────┘
│
┌──────────┼──────────┐
│ │ │
▼ ▼ ▼
┌───────┐ ┌───────┐ ┌───────┐
│Worker1│ │Worker2│ │Worker3│
│(Search)│ │(Code) │ │(Write)│
└───────┘ └───────┘ └───────┘
class Supervisor:
def route(self, task: str) -> Agent:
"""Decide which worker handles the task"""
if "search" in task:
return self.search_agent
elif "code" in task:
return self.code_agent
else:
return self.general_agent
def run(self, input: str):
while not self.is_done():
agent = self.route(self.current_task)
result = agent.run(self.current_task)
self.update_state(result)
Characteristics:
┌───────┐ ┌───────┐
│Agent A│◄───►│Agent B│
└───┬───┘ └───┬───┘
│ │
│ ┌───────┐ │
└─►│Agent C│◄─┘
└───────┘
class PeerAgent:
def __init__(self, peers: list["PeerAgent"]):
self.peers = peers
def delegate(self, task: str):
"""Find a peer that can handle this"""
for peer in self.peers:
if peer.can_handle(task):
return peer.run(task)
return self.run_locally(task)
def broadcast(self, message: str):
"""Send to all peers"""
for peer in self.peers:
peer.receive(message)
Characteristics:
┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
│Planner│───►│Executor│───►│Reviewer│───►│Output │
└───────┘ └───────┘ └───────┘ └───────┘
class Pipeline:
def __init__(self, stages: list[Agent]):
self.stages = stages
def run(self, input):
result = input
for stage in self.stages:
result = stage.run(result)
return result
Characteristics:
class MarketCoordinator:
def __init__(self, agents: list[Agent]):
self.agents = agents
def auction(self, task: str):
"""Agents bid on tasks"""
bids = []
for agent in self.agents:
bid = agent.bid(task) # Returns confidence/cost
bids.append((agent, bid))
# Select winner
winner = max(bids, key=lambda x: x[1])
return winner[0].run(task)
Characteristics:
class Agent:
def handoff_to(self, target: "Agent", context: dict):
"""Explicit control transfer"""
return HandoffResult(
target_agent=target,
context=context,
return_control=True
)
def run(self, input):
result = self.think(input)
if result.needs_specialist:
return self.handoff_to(
self.get_specialist(result.domain),
context={"original_task": input, "progress": result}
)
return result
class Router:
def __init__(self, agents: dict[str, Agent]):
self.agents = agents
self.routing_llm = LLM()
def route(self, input: str) -> Agent:
decision = self.routing_llm.generate(f"""
Given this input: {input}
Which agent should handle it?
Options: {list(self.agents.keys())}
""")
return self.agents[decision.agent_name]
class StateBasedCoordinator:
def run(self, input):
state = {"input": input, "stage": "planning"}
while state["stage"] != "done":
# Agent selection based on state
agent = self.get_agent_for_stage(state["stage"])
result = agent.run(state)
state = self.update_state(state, result)
return state["output"]
class Blackboard:
"""Shared state all agents can read/write"""
def __init__(self):
self.state = {}
self.lock = threading.Lock()
def read(self, key: str):
return self.state.get(key)
def write(self, key: str, value):
with self.lock:
self.state[key] = value
# Agents share the blackboard
blackboard = Blackboard()
agent_a = Agent(blackboard)
agent_b = Agent(blackboard)
Pros: Simple, full visibility Cons: Race conditions, tight coupling, hard to scale
class Agent:
def __init__(self):
self.inbox = Queue()
self.state = {} # Private state
def send(self, target: "Agent", message: dict):
target.inbox.put(message)
def receive(self) -> dict:
return self.inbox.get()
def run(self):
while True:
message = self.receive()
result = self.process(message)
if message.get("reply_to"):
self.send(message["reply_to"], result)
Pros: Isolation, clear boundaries, scalable Cons: More complex, async handling
class HybridCoordinator:
def __init__(self, agents):
# Shared read-only context
self.shared_context = {"tools": [...], "config": {...}}
# Per-agent mutable state
self.agent_states = {a.id: {} for a in agents}
# Message queues for communication
self.queues = {a.id: Queue() for a in agents}
result = agent_b.run(input)
Latency: Lowest Coupling: Highest Async: No
task_queue.put(task)
# ... later ...
result = result_queue.get()
Latency: Medium Coupling: Low Async: Yes
event_bus.emit("task:created", task)
@event_bus.on("task:created")
def handle_task(task):
result = process(task)
event_bus.emit("task:completed", result)
Latency: Variable Coupling: Lowest Async: Yes
## Multi-Agent Analysis: [Framework Name]
### Coordination Model
- **Type**: [Supervisor/Peer-to-Peer/Pipeline/Market]
- **Central Control**: [Yes/No]
- **Location**: `path/to/orchestrator.py`
### Agent Inventory
| Agent | Role | Can Delegate To |
|-------|------|-----------------|
| Supervisor | Routing | All workers |
| SearchAgent | Web search | None |
| CodeAgent | Code execution | Reviewer |
### Handoff Mechanism
- **Type**: [Explicit/Router/Implicit]
- **Bidirectional**: [Yes/No]
- **Context Preserved**: [Full/Partial/Minimal]
### State Sharing
- **Pattern**: [Blackboard/Message/Hybrid]
- **Shared State**: [List what's shared]
- **Isolation Level**: [None/Partial/Full]
### Communication Protocol
- **Method**: [Direct/Queue/Event]
- **Async**: [Yes/No]
- **Location**: `path/to/comms.py`
### Loop Prevention
- **Mechanism**: [Depth limit/Visited set/None]
- **Max Handoffs**: [N or Unlimited]
codebase-mapping to identify agent filescomparative-matrix for coordination decisionscontrol-loop-extraction for individual agent loopsdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.