worker-protocol — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited worker-protocol (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Behavioral contract for spawned worker agents. Embedded in worker prompts by worker-dispatch.
Core principle: Single-purpose, self-documenting, graceful exit.
| Property | Example | Purpose |
|---|---|---|
| worker_id | worker-1701523200-123 | Unique identifier |
| issue | 123 | Assigned issue |
| attempt | 1 | Which attempt |
CRITICAL: Workers MUST operate in isolated worktrees. Never work in the main repository.
# 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 branch - must be on feature branch!"
exit 1
fi
echo "✓ On branch: $BRANCH"
}If NOT in a worktree: STOP. Post error to issue. Exit immediately.
Workers must NEVER:
Workers MUST execute this checklist before starting work:
git branch --show-current)git status)pnpm test or equivalent)Startup comment template:
**Worker Started**
| Property | Value |
|----------|-------|
| Worker ID | `[WORKER_ID]` |
| Attempt | [N] |
| Branch | `[BRANCH]` |
**Understanding:** [1-2 sentence summary of what issue requires]
**Approach:** [Brief planned approach]
---
*Orchestration: [ORCHESTRATION_ID]*Post to issue on: start, milestone, blocker, completion
**Status:** [Implementing|Testing|Blocked|Complete] | Turns: [N]/100
- [x] Completed item
- [ ] Current itemExit when ANY occurs. Return structured JSON and post appropriate comment.
**Worker Complete** ✅
**PR Created:** #[PR_NUMBER]
**Issue:** #[ISSUE]
**Branch:** `[BRANCH]`
**Summary:** [1-2 sentences describing what was implemented]
**Tests:** [N] passing | Coverage: [X]%
---
*Worker: [WORKER_ID] | Turns: [N]/100*Return: {"status": "COMPLETED", "pr": [PR_NUMBER], "summary": "..."}
Only after exhausting all options:
**Worker Blocked** 🚫
**Reason:** [Clear description of blocker]
**What I tried:**
1. [Approach 1] - [Why it didn't work]
2. [Approach 2] - [Why it didn't work]
**Required to unblock:**
- [ ] [Specific action needed from human/external]
**Cannot proceed because:** [Why this is a true blocker, not just hard]
---
*Worker: [WORKER_ID] | Attempt: [N]*Return: {"status": "BLOCKED", "pr": null, "summary": "Blocked: [reason]"}
At 85-90 turns, prepare handover:
**Handover Required** 🔄
**Turns Used:** [N]/100
**Reason:** Approaching turn limit
Handover context posted below. Replacement worker will continue.
---
*Worker: [WORKER_ID]*Then post full handover with <!-- HANDOVER:START --> markers per worker-handover skill.
Return: {"status": "HANDOVER", "pr": null, "summary": "Handover at [N] turns"}
When implementation fails after good-faith effort:
**Worker Failed - Research Needed** 🔬
**Failure:** [What failed]
**Attempt:** [N]
**What I tried:**
1. [Approach 1] - [Result]
2. [Approach 2] - [Result]
**Error:**[Error output]
**Hypothesis:** [What might be wrong]
**Research needed:**
- [ ] [Specific question to research]
---
*Worker: [WORKER_ID] | Triggering research cycle*Return: {"status": "FAILED", "pr": null, "summary": "Failed: [reason]"}
Before creating ANY PR:
comprehensive-review (7 criteria)<!-- REVIEW:START --> ... <!-- REVIEW:END -->PreToolUse hook BLOCKS `gh pr create` without valid review artifact.
If modifying: **/auth/**, **/api/**, **/*password*, **/*token*, **/*secret*
→ Complete security-review and include in artifact.
DO:
DO NOT:
[type]: [description] (#[ISSUE])
Worker: [WORKER_ID]Types: feat, fix, test, refactor, docs
Prerequisite: Review artifact in issue comments with status COMPLETE.
# Verify review exists
gh api "/repos/$OWNER/$REPO/issues/$ISSUE/comments" \
--jq '[.[] | select(.body | contains("<!-- REVIEW:START -->"))] | length'PR body:
## Summary
[1-2 sentences]
Closes #[ISSUE]
## Changes
- [Change 1]
- [Change 2]
## Review
Review artifact: See issue #[ISSUE]
---
Worker: `[WORKER_ID]`| Turns | Action |
|---|---|
| 0-80 | Normal work |
| 80-90 | Monitor, prepare handover if needed |
| 90+ | Finalize and handover |
At 90+ turns or when context valuable for next attempt:
<!-- HANDOVER:START --> markers{"status": "HANDOVER", ...}See worker-handover for full format.
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
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.