Agent skill

worker-protocol

Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.

majiayu000534★ · 1 repos on radarProfile →
claude-codecan modify filesMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Allowed tools: -Bash-Read-Edit-Write-Grep-Glob
Path: skills/agent/worker-protocol-troykelly-claude-skills/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.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 ```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

What's inside
Steps it walks through
  1. Worker Identity
  2. Worktree Isolation (FIRST)
  3. Verify Worktree Before ANY Work
  4. Startup Checklist
  5. Progress Reporting
  6. Exit Conditions
  7. 1. COMPLETED (Success)
  8. 2. BLOCKED (External Dependency)
  9. 3. HANDOVER (Turn Limit)
  10. 4. FAILED (Needs Research)
  11. Review Gate (MANDATORY)
  12. Security-Sensitive Files
  13. Behavioral Rules
  14. Commit Format
Ships with 1 file
  • metadata.json
Commands it runs
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
More from claude-skill-registry
All skills →
About this skill
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.

Keep going