.agent/skills/agent-orchestration-patterns/SKILL.md
Loop patterns, delegation strategies, retry logic, and multi-agent coordination. Use when designing or debugging Julia's orchestrator loop, sub-agent delegation, or inter-agent communication via bridge/MCP.
npx skillsauth add abzhaw/juliaz_agents agent-orchestration-patternsInstall 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.
while (true) {
try {
// 1. Poll for new input
const messages = await bridge.getPendingMessages();
if (!messages.length) { await sleep(3000); continue; }
// 2. Think (LLM call with tools)
const response = await llm.chat({ messages: buildContext(messages), tools });
// 3. Execute tool calls
if (response.tool_calls) {
for (const call of response.tool_calls) {
await executeTool(call);
}
continue; // loop again with tool results
}
// 4. Send reply
if (response.content) await bridge.sendReply(response.content);
} catch (err) {
log.error(err);
await sleep(5000); // backoff on error, never crash
}
}
// The orchestrator delegates heavy tasks to Claude
{
name: 'claude_task',
description: 'Delegate complex writing/analysis to Claude sub-agent'
}
// Usage in tool execution:
const result = await mcpClient.callTool('claude_task', {
task: 'Summarize these 10 research papers in 3 bullets each',
system: 'You are an academic research assistant'
});
async function withRetry<T>(fn: () => Promise<T>, maxAttempts = 3): Promise<T> {
for (let i = 0; i < maxAttempts; i++) {
try { return await fn(); }
catch (err) {
if (i === maxAttempts - 1) throw err;
await sleep(1000 * Math.pow(2, i)); // exponential backoff
}
}
}
| Pattern | Implementation | |---------|---------------| | Polling | Orchestrator polls bridge every 3s | | Fan-out | Orchestrator delegates to cowork-mcp | | Scheduled | ADHD/security agents run on cron | | Event-driven | LaunchAgent triggers on boot |
development
Fortschrittsverfolgung der Masterarbeit. Wortanzahl pro Kapitel, Fertigstellungsgrad, fehlende Elemente, Deadlines. Haelt den Ueberblick.
development
Kapitelarchitektur und Gliederung der Masterarbeit. Verwaltet die Struktur, schlaegt vor wo Inhalte hingehoeren, validiert den logischen Fluss zwischen Kapiteln.
tools
Konvertiert Protokolleinträge und Session-Logs in thesis-fähiges deutsches Narrativ. Transformiert Entwicklungsdokumentation in akademische Prosa.
research
Sucht und analysiert akademische Literatur. Findet relevante Papers, erstellt strukturierte Zusammenfassungen. Zitiert NIEMALS — schlaegt nur vor.