worker-protocol
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
Profile →npx skills add majiayu000/claude-skill-registry --skill worker-protocol-troykelly-claude-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ```bash # FIRST thing every worker does - verify isolation verify_worktree() { # Check we're in a worktree, not main repo WORKTREE_ROOT=$(git worktree list --porcelain | grep "^worktree" | head -1 | cut -d' ' -f2) CURRENT_DIR=$(pwd) if [ "$WORKTREE_ROOT" = "$CURRENT_DIR" ] && git worktree list | grep -q "$(pwd).*\["; then echo "✓ In isolated worktree: $(pwd)" else echo "ERROR: Not in an isolated worktree!" echo "Current: $(pwd)" echo "Worktrees: $(git worktree list)" exit 1 fi # Verify on feature branch, not main BRANCH=$(git branch --show-current) if [[ "$BRANCH" == "main" || "$BRANCH" == "master" ]]; then echo "ERROR: On $BRANCH branc
- Worker Identity
- Worktree Isolation (FIRST)
- Verify Worktree Before ANY Work
- Startup Checklist
- Progress Reporting
- Exit Conditions
- 1. COMPLETED (Success)
- 2. BLOCKED (External Dependency)
- 3. HANDOVER (Turn Limit)
- 4. FAILED (Needs Research)
- Review Gate (MANDATORY)
- Security-Sensitive Files
- Behavioral Rules
- Commit Format
FIRST thing every worker does - verify isolation if [ "$WORKTREE_ROOT" = "$CURRENT_DIR" ] && git worktree list | grep -q "$(pwd).*\["; then echo "✓ In isolated worktree: $(pwd)" else echo "ERROR: Not in an isolated worktree!" echo "Current: $(pwd)" echo "Worktrees: $(git worktree list)" exit 1 fi if [[ "$BRANCH" == "main" || "$BRANCH" == "master" ]]; then
What does the worker-protocol skill do?
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill worker-protocol-troykelly-claude-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.