[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M737PQE24GPJ1PXWXM38DG71":3,"skill-same:01M737PQE24GPJ1PXWXM38DG71":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M737PQE24GPJ1PXWXM38DG71","skill-073",null,"Worker pool architecture with ActorSupervisor spawning agents. Use proactively when implementing worker agent behavior or understanding exit patterns.","legendtkl\u002Fagentic-skill-router","legendtkl","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2370761?v=4","01M71RR3WRQC40G964Q2GVDMND","01M737GJZQ9TF1VE3VM255EDAK",8,"MIT","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-073\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: skill-073\ndescription: \"Worker pool architecture with ActorSupervisor spawning agents. Use proactively when implementing worker agent behavior or understanding exit patterns.\"\n---\n\n# Worker Protocol\n\n> \"Complete work, send message via pipe, exit. Supervisor restarts if needed.\"\n\n## When to Use This Skill\n\nUse **when**:\n- Implementing worker agent behavior\n- Understanding when\u002Fhow to exit\n- Understanding supervisor auto-restart\n\nUse **proactively**:\n- Reference before implementing agent message loops\n- After completing work, before exiting\n\n---\n\n## Quick Start\n\n\u003Cexamples>\nExample 1: Agent connection and message loop\n```powershell\n# Source runtime library\n. \"$PSScriptRoot\\..\\..\\scripts\\agent-runtime.ps1\"\n\n# Connect to watchdog\nConnect-ToWatchdog -AgentName \"developer\" -SessionDir \".\\.claude\\session\"\n\n# Enter message loop\nEnter-AgentLoop -MessageHandler {\n    param($Message)\n    switch ($Message.type) {\n        \"WorkAssign\" {\n            Send-WorkComplete -TaskId $Message.payload.taskId -Result \"success\"\n        }\n    }\n}\n```\n\nExample 2: Send work complete\n```powershell\nSend-WorkComplete -TaskId \"feat-001\" -Result \"success\" -Notes \"Complete\"\n```\n\nExample 3: Exit conditions\n- Work complete → `WorkComplete` → Exit (code 0)\n- Need clarification → `Query` → Exit (code 0)\n- Shutdown received → Exit (code 42)\n```\n\u003C\u002Fexamples>\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│              ACTOR SUPERVISOR (Watchdog)                      │\n│  1. StartActor(agentName) - creates bidirectional pipe       │\n│  2. Wait for agent connection via agent-runtime.ps1          │\n│  3. Supervise() - check for crashes, restart with backoff    │\n│  4. Route messages between agents via pipes                  │\n│  5. StopAll() - graceful shutdown                            │\n└───────────────────────────┬───────────────────────────────────┘\n                            │\n                ┌───────────▼─────────────┐\n                │  PM ↔ Workers (pipes)   │\n                │  Event Log (source)     │\n                └──────────────────────────┘\n```\n\n---\n\n## Agent Lifecycle\n\n```\n┌─────────────┐     ┌──────────────┐     ┌─────────────┐\n│   CONNECT   │ ──▶ │  DO WORK     │ ──▶ │   EXIT      │\n│ (agent-     │     │ (receive via │     │ (supervisor  │\n│  runtime)   │     │  pipe,       │     │  may restart)│\n└─────────────┘     │  process)    │     └─────────────┘\n                    └──────────────┘\n```\n\n**Key Principle**: Each agent run processes messages, completes work, exits. Supervisor restarts when needed.\n\n---\n\n## Event-Driven vs Sequential Mode\n\n| Aspect | Event-Driven | Sequential |\n|--------|-------------|------------|\n| Agent spawning | On demand | One at a time |\n| Message delivery | Named pipes | Handoff file |\n| Parallel work | Yes | No |\n| Startup | `\u002Fralph-coordinator-event` | `\u002Fralph-coordinator-single` |\n| Connection | `agent-runtime.ps1` | Handoff files |\n\n---\n\n## Exit Conditions\n\n| Condition | Action | Exit Code | Restarted |\n|-----------|--------|-----------|-----------|\n| Work complete | Send `WorkComplete` | 0 | No (new task will spawn) |\n| Need clarification | Send `Query` | 0 | No |\n| Blocking issue | Send `WorkBlocked` | 0 | No |\n| Shutdown received | - | 42 | No |\n| Crash | - | Non-zero | Yes (with backoff) |\n\n**Supervisor restart strategy**:\n- Exponential backoff: 5s, 10s, 20s, 40s, 60s (max)\n- Max 3 restarts per agent\n- Graceful exits (0 or 42) are not restarted\n\n---\n\n## V2 vs V1\n\n| Aspect | V1 (Legacy) | V2 (Current) |\n|--------|-------------|--------------|\n| Agent lifecycle | File queue monitoring | Pipe-based event loop |\n| Delivery latency | 2-5 seconds | \u003C10 milliseconds |\n| Crash recovery | Manual health checks | Automatic (ActorSupervisor) |\n| State persistence | Multiple files | Single event log |\n| Message types | 47+ types | 12 core types |\n| Restart strategy | None | Exponential backoff |\n\n---\n\n## Complete Worker Example\n\n```powershell\n# Source runtime library\n. \"$PSScriptRoot\\..\\..\\scripts\\agent-runtime.ps1\"\n\n# Connect to watchdog\n$connected = Connect-ToWatchdog -AgentName \"developer\" -SessionDir \".\\.claude\\session\"\nif (-not $connected) { exit 1 }\n\n# Enter message loop\nEnter-AgentLoop -MessageHandler {\n    param($Message)\n\n    switch ($Message.type) {\n        \"WorkAssign\" {\n            $taskId = $Message.payload.taskId\n            # Do work...\n            Send-WorkComplete -TaskId $taskId -Result \"success\"\n        }\n        \"Query\" {\n            Send-Message -To \"pm\" -Type \"Response\" -Payload @{\n                answer = \"Here's the answer...\"\n            } -InReplyTo $Message.id\n        }\n        \"System\" {\n            if ($Message.payload.systemEvent -eq \"shutdown\") {\n                # Loop exits automatically\n            }\n        }\n    }\n}\n```\n\n---\n\n## Related Skills\n\n| Skill | Purpose |\n|-------|---------|\n| `shared-ralph-event-protocol` | V2 message protocol |\n| `shared-message-handling` | V2 message delivery |\n| `shared-ralph-core` | Core instructions |","# Worker Protocol\n\n> \"Complete work, send message via pipe, exit. Supervisor restarts if needed.\"\n\n## When to Use This Skill\n\nUse **when**:\n- Implementing worker agent behavior\n- Understanding when\u002Fhow to exit\n- Understanding supervisor auto-restart\n\nUse **proactively**:\n- Reference before implementing agent message loops\n- After completing work, before exiting\n\n---\n\n## Quick Start\n\n\u003Cexamples>\nExample 1: Agent connection and message loop\n```powershell\n# Source runtime library\n. \"$PSScriptRoot\\..\\..\\scripts\\agent-runtime.ps1\"\n\n# Connect to watchdog\nConnect-ToWatchdog -AgentName \"developer\" -SessionDir \".\\.claude\\session\"\n\n# Enter message loop\nEnter-AgentLoop -MessageHandler {\n    param($Message)\n    switch ($Message.type) {\n        \"WorkAssign\" {\n            Send-WorkComplete -TaskId $Message.payload.taskId -Result \"success\"\n        }\n    }\n}\n```\n\nExample 2: Send work complete\n```powershell\nSend-WorkComplete -TaskId \"feat-001\" -Result \"success\" -Notes \"Complete\"\n```\n\nExample 3: Exit conditions\n- Work complete → `WorkComplete` → Exit (code 0)\n- Need clarification → `Query` → Exit (code 0)\n- Shutdown received → Exit (code 42)\n```\n\u003C\u002Fexamples>\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│              ACTOR SUPERVISOR (Watchdog)                      │\n│  1. StartActor(agentName) - creates bidirectional pipe       │\n│  2. Wait for agent connection via agent-runtime.ps1          │\n│  3. Supervise() - check for crashes, restart with backoff    │\n│  4. Route messages between agents via pipes                  │\n│  5. StopAll() - graceful shutdown                            │\n└───────────────────────────┬───────────────────────────────────┘\n                            │\n                ┌───────────▼─────────────┐\n                │  PM ↔ Workers (pipes)   │\n                │  Event Log (source)     │\n                └──────────────────────────┘\n```\n\n---\n\n## Agent Lifecycle\n\n```\n┌─────────────┐     ┌──────────────┐     ┌─────────────┐\n│   CONNECT   │ ──▶ │  DO WORK     │ ──▶ │   EXIT      │\n│ (agent-     │     │ (receive via │     │ (supervisor  │\n│  runtime)   │     │  pipe,       │     │  may restart)│\n└─────────────┘     │  process)    │     └─────────────┘\n                    └──────────────┘\n```\n\n**Key Principle**: Each agent run processes messages, completes work, exits. Supervisor restarts when needed.\n\n---\n\n## Event-Driven vs Sequential Mode\n\n| Aspect | Event-Driven | Sequential |\n|--------|-------------|------------|\n| Agent spawning | On demand | One at a time |\n| Message delivery | Named pipes | Handoff file |\n| Parallel work | Yes | No |\n| Startup | `\u002Fralph-coordinator-event` | `\u002Fralph-coordinator-single` |\n| Connection | `agent-runtime.ps1` | Handoff files |\n\n---\n\n## Exit Conditions\n\n| Condition | Action | Exit Code | Restarted |\n|-----------|--------|-----------|-----------|\n| Work complete | Send `WorkComplete` | 0 | No (new task will spawn) |\n| Need clarification | Send `Query` | 0 | No |\n| Blocking issue | Send `WorkBlocked` | 0 | No |\n| Shutdown received | - | 42 | No |\n| Crash | - | Non-zero | Yes (with backoff) |\n\n**Supervisor restart strategy**:\n- Exponential backoff: 5s, 10s, 20s, 40s, 60s (max)\n- Max 3 restarts per agent\n- Graceful exits (0 or 42) are not restarted\n\n---\n\n## V2 vs V1\n\n| Aspect | V1 (Legacy) | V2 (Current) |\n|--------|-------------|--------------|\n| Agent lifecycle | File queue monitoring | Pipe-based event loop |\n| Delivery latency | 2-5 seconds | \u003C10 milliseconds |\n| Crash recovery | Manual health checks | Automatic (ActorSupervisor) |\n| State persistence | Multiple files | Single event log |\n| Message types | 47+ types | 12 core types |\n| Restart strategy | None | Exponential backoff |\n\n---\n\n## Complete Worker Example\n\n```powershell\n# Source runtime library\n. \"$PSScriptRoot\\..\\..\\scripts\\agent-runtime.ps1\"\n\n# Connect to watchdog\n$connected = Connect-ToWatchdog -AgentName \"developer\" -SessionDir \".\\.claude\\session\"\nif (-not $connected) { exit 1 }\n\n# Enter message loop\nEnter-AgentLoop -MessageHandler {\n    param($Message)\n\n    switch ($Message.type) {\n        \"WorkAssign\" {\n            $taskId = $Message.payload.taskId\n            # Do work...\n            Send-WorkComplete -TaskId $taskId -Result \"success\"\n        }\n        \"Query\" {\n            Send-Message -To \"pm\" -Type \"Response\" -Payload @{\n                answer = \"Here's the answer...\"\n            } -InReplyTo $Message.id\n        }\n        \"System\" {\n            if ($Message.payload.systemEvent -eq \"shutdown\") {\n                # Loop exits automatically\n            }\n        }\n    }\n}\n```\n\n---\n\n## Related Skills\n\n| Skill | Purpose |\n|-------|---------|\n| `shared-ralph-event-protocol` | V2 message protocol |\n| `shared-message-handling` | V2 message delivery |\n| `shared-ralph-core` | Core instructions |",{"name":5,"description":7},"main","160b30f0b67c923077f886376fdfae1016a70702","experiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-073",2,"https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router","https:\u002F\u002Flegendtkl.github.io\u002Fagentic-skill-router\u002F","https:\u002F\u002Fgithub.com\u002Flegendtkl","http:\u002F\u002Fwww.legendtkl.com","No secret before debugging.\r\n","2026-06-04 14:02:56",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add legendtkl\u002Fagentic-skill-router --skill skill-073",{"tool":39,"command":40},"bunx","bunx skills add legendtkl\u002Fagentic-skill-router --skill skill-073",{"tool":42,"command":43},"pnpm","pnpm dlx skills add legendtkl\u002Fagentic-skill-router --skill skill-073","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-073\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M7384EP28XVSR2R0YGRS0GK9","foo","A test skill named foo","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ffoo\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7384DECF306RRRC16PZJTQ5","bar","飞书 — bar with quoted Chinese","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fbar\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M738491441AQ85E7GD7VVDTA","agentic-skill-router","First use any clearly matching enabled local\u002Fuser Agent Skill. If none matches, prefer this router for skill-shaped requests involving a named tool, API, service, CLI, platform, file format, dataset, or domain workflow, including when a generic built-in skill such as browser, Chrome, or web search also seems applicable; use built-ins directly only when explicitly requested or when the task is primarily live browsing, logged-in page operation, clicking, screenshotting, or current webpage inspection. Also use directly to audit, slim, disable, restore, or route locally installed Agent Skills across supported hosts. Examples include Vercel, Netlify, Cloudflare, Render, Playwright, Sentry, Linear, GitHub, OpenAI APIs, PDF, DOCX, PPTX, and spreadsheets.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fskills\u002Fagentic-skill-router\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M738475HF7SXTP4HCPZJVZ8E","syn-video-trim","Skill for trimming and cutting clips in the context of video files. Use when the user's task is specifically about trimming and cutting clips.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-trim\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M73845F4RD2AA6YHS1E3VQRB","syn-video-transcode","Skill for transcoding codecs and resolutions in the context of video files. Use when the user's task is specifically about transcoding codecs and resolutions.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-transcode\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M73842YN17QSJETPZX6Z9DAG","syn-video-thumbnail","Skill for extracting thumbnails and frames in the context of video files. Use when the user's task is specifically about extracting thumbnails and frames.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-thumbnail\u002FSKILL.md",[],[]]