troykelly/claude-skills/worker-protocol
Claude Code and agent skill by troykelly/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
Install
npx vskill@latest install troykelly/claude-skills/worker-protocolSKILL.md
Worker Protocol
Behavioral contract for spawned worker agents. Embedded in worker prompts by worker-dispatch.
Core principle: Single-purpose, self-documenting, graceful exit.
Worker Identity
| Property | Example | Purpose | |
|---|---|---|---|
| worker_id | worker-1701523200-123 | Unique identifier | |
| issue | 123 | Assigned issue | |
| attempt | 1 | Which attempt |
Worktree Isolation (FIRST)
CRITICAL: Workers MUST operate in isolated worktrees. Never work in the main repository.
Verify Worktree Before ANY Work
If NOT in a worktree: STOP. Post error to issue. Exit immediately.
Workers must NEVER:
- Work directly in the main repository
- Create branches in main repo
- Modify files that other workers might touch
Startup Checklist
Workers MUST execute this checklist before starting work:
- [ ] Verify worktree isolation (see above - MUST be first)
- [ ] Read assigned issue completely
- [ ] Check issue comments for context/history
- [ ] Verify on correct feature branch (
git branch --show-current) - [ ] Check worktree is clean (
git status) - [ ] Run existing tests to verify baseline (
pnpm testor equivalent) - [ ] Post startup comment to issue
Startup comment template:
Progress Reporting
Post to issue on: start, milestone, blocker, completion
Exit Conditions
Exit when ANY occurs. Return structured JSON and post appropriate comment.
1. COMPLETED (Success)
Return: {"status": "COMPLETED", "pr": [PR_NUMBER], "summary": "..."}
2. BLOCKED (External Dependency)
Only after exhausting all options:
Return: {"status": "BLOCKED", "pr": null, "summary": "Blocked: [reason]"}
3. HANDOVER (Turn Limit)
At 85-90 turns, prepare handover:
Then post full handover with <!-- HANDOVER:START --> markers per worker-handover skill.
Return: {"status": "HANDOVER", "pr": null, "summary": "Handover at [N] turns"}
4. FAILED (Needs Research)
When implementation fails after good-faith effort:
[Error output]
Return: {"status": "FAILED", "pr": null, "summary": "Failed: [reason]"}
Review Gate (MANDATORY)
Before creating ANY PR:
- Complete
comprehensive-review(7 criteria) - Post review artifact to issue:
<!-- REVIEW:START --> ... <!-- REVIEW:END --> - Address ALL findings (Unaddressed: 0)
- Status: COMPLETE
PreToolUse hook BLOCKS `gh pr create` without valid review artifact.
Security-Sensitive Files
If modifying: **/auth/**, **/api/**, **/*password*, **/*token*, **/*secret*
→ Complete security-review and include in artifact.
Behavioral Rules
DO:
- Work ONLY on assigned issue
- TDD: tests first
- Commit frequently with descriptive messages
- Post progress to issue
- Complete review before PR
- Handover at 90+ turns
DO NOT:
- Start other issues
- Modify unrelated code
- Skip tests
- Create PR without review artifact
- Continue past 100 turns
Commit Format
Types: feat, fix, test, refactor, docs
PR Creation
Prerequisite: Review artifact in issue comments with status COMPLETE.
PR body:
Turn Awareness
| Turns | Action | |
|---|---|---|
| 0-80 | Normal work | |
| 80-90 | Monitor, prepare handover if needed | |
| 90+ | Finalize and handover |
Handover Trigger
At 90+ turns or when context valuable for next attempt:
- Post handover to issue with
<!-- HANDOVER:START -->markers - Commit all work
- Exit with
{"status": "HANDOVER", ...}
See worker-handover for full format.
Integration
Workers MUST follow these skills:
| Skill | Purpose | |
|---|---|---|
issue-driven-development | Core workflow | |
strict-typing | Type requirements (no any) | |
ipv6-first | Network requirements | |
tdd-full-coverage | Testing approach | |
clean-commits | Commit standards | |
worker-handover | Handover format | |
comprehensive-review | Code review (MANDATORY before PR) | |
apply-all-findings | Address all review findings | |
security-review | For security-sensitive files | |
deferred-finding | For tracking deferred findings | |
review-gate | PR creation gate |
Enforced by: PreToolUse hook on gh pr create, Stop hook for review verification
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/worker-protocol/SKILL.md
Popularity
- Repository stars
- 6
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Apr 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/troykelly/claude-skills/worker-protocol)