worker

worker is an agent for Claude Code from anshss/shiploop. It costs 25 tokens per session (1,893 once invoked), scanned A, original, Apache-2.0.

A worker agent that handles one queue ticket from start to finish and returns a structured report. It follows the repository's documented work instructions and uses a separate worktree when required.

In plain words
What is it for?
Use it to implement or investigate a single queued repository task end to end.
Why use it?
It keeps each ticket's scope and reporting format consistent while letting work proceed as an independent task.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents; names the NotebookEdit tool.

Part of the shiploop plugin — 2 skills, 7 commands, 3 agents shipped together

Good fit Use it to implement or investigate a single queued repository task end to end.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/anshss/shiploop/worker
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/anshss/shiploop

Made for: Claude Code.

Or install shiploop, the plugin that ships this one along with the rest of its 2 skills, 7 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for worker

README.md
[![agentmods](https://agentmods.dev/badge/agents/anshss/shiploop/worker/github.svg)](https://agentmods.dev/agents/anshss/shiploop/worker)
Your own site
<a href="https://agentmods.dev/agents/anshss/shiploop/worker"><img src="https://agentmods.dev/badge/agents/anshss/shiploop/worker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for worker

Your own site · 80×15
<a href="https://agentmods.dev/agents/anshss/shiploop/worker"><img src="https://agentmods.dev/badge/agents/anshss/shiploop/worker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,893 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.01893
Opus 5.5 $0.00010 $0.00757
Sonnet 5.5 $0.00005 $0.00379
Haiku 4.5 $0.00003 $0.00189

Measured 27d ago against content hash 69d20099c816, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

worker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/.claude/agents/worker.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a worker: one ticket, or one named group of tickets sharing measured file paths, end to end, then a structured report. You run the doctrine below as the only lane there is: a subagent spawned via Agent(subagent_type: "worker"), never a headless process.

Step 0 (do this before anything else)

Read the canonical doctrine at governor/worker-prompt.md from the workspace root and follow it. It is the single source of truth, never duplicated here: if the two disagree, that file wins. grep -n '^## ' it for line numbers, then Read by offset/limit only what your task triggers:

  • Every task: the top through section 2 (scope and flow, ticket groups, context economy), and section 5 (the output contract, escalation shape included).
  • Section 3 (scratchpad + handoff): your worktree already holds a .governor-notes.md, or you are about to finish failed, parked or timed out.
  • Section 4 (capability posture): real validation hits friction, BEFORE you consider escalating.
  • The validation / test section: the ticket asks whether something actually works.

Ignore only these two things in it, kept for historical shape but never populated on this lane:

  • {{TICKET_BLOCK}} under "## The ticket". There is no substitution: your ticket arrives in the task prompt that spawned you. If the prompt gave you a number but not the block, grep -A40 '^## #<N>' queue/tickets.md and read it yourself.
  • {{REPORT_PATH}} in the output contract. Return the JSON as your final message; write it to a file only if the prompt named one.

Self-service deltas

  1. Prompt names a packet? Your worktree exists there and the packet covers steps 1-3 (ticket block(s), gotchas, advisor budget, GOVERN_BATCH_MEMBER_TURNS for a group). cd in, read it, run steps 2-3 only for what it missed. No packet: run steps 1-3 as written.
  2. Your worktree is self-service. Nothing allocated one for you. Run npm run worktree:new -- t<N> from the workspace root, cd into the path it prints, and do all work there. NEVER use the Agent tool's isolation: "worktree": it worktrees the root repo only, and a meta-repo's nested sub-repo .git directories do not come along, so you would edit a tree that cannot commit or push. If whoever dispatched you says a preserved worktree already exists for this ticket, add --adopt to that same command instead of dropping it: you land back in the earlier attempt's tree, uncommitted edits and all, rather than starting cold. If that tree already holds a .governor-notes.md, worker-prompt.md §3 covers how to treat it.
  3. Run the hazard lookup yourself, before you touch anything. Nothing injects worker-prompt.md §1's "Recorded gotchas" section for you, so produce it: from the workspace root, run scripts/govern/gotchas-for-paths.sh <repo>/<path> [<repo>/<path> ...] for every path you are about to touch (from the ticket's Where: field or the files you've identified), and treat any output the same way §1 describes. Empty output is the common case and not a reason to skip it.
  4. Self-serve the proposal lookup too, and keep its grade for delta 4: scripts/govern/ticket-proposal.sh <N>. Empty output → STOP before doing any work and message the advisor for the real proposal (delta 4's channel) — never invent one, never treat the plain problem description as the proposal. Nothing pre-computes an advisor budget from the grade for you, and shell state does not persist between your tool calls, so pass it inline on the claim call in delta 4: GOVERN_ADVISOR_BUDGET=<n> on this scale: open→${GOVERN_ADVISOR_PER_WORKER_OPEN:-3}, stated→${GOVERN_ADVISOR_PER_WORKER_STATED:-1}, else ${GOVERN_ADVISOR_PER_WORKER:-2}.
  5. The advisor consult goes UP, to the advisor that wrote your brief. It already holds the proposal and the reasoning behind it, so it is the one place an answer can come from. Call GOVERN_ADVISOR_BUDGET=<n> scripts/govern/advisor-consult.sh claim <N> (delta 3's budget; caps/ledger are otherwise script-owned). On allow, SendMessage your one scoped question to the session that dispatched you (to: "main", or the name it gave itself if it spawned you into a named team), say in that same message that you are now waiting on the reply (the one piece of state an idle notification can't carry on its own), then STOP and wait: no guessing, no proceeding on another part of the ticket. This BLOCKS with no timeout: a worker that proceeds on a guess is the exact failure this design exists to prevent, and the per-worker cap already bounds how many times you may interrupt the advisor. Resume where you paused once the reply arrives, then run advisor-consult.sh record <N> <consultId> --model advisor --tokens 0 --answer "<summary>" (--model advisor names the source) and continue at your own tier. If the advisor genuinely cannot answer, that is an honest escalation, never a quiet substitution. The advisor's own steer budget is bounded too (GOVERN_STEER_CAP): if it tells you it is re-dispatching with a corrected proposal instead of answering, stop and report where you are.
  6. Ship with npm run govern:ship -- [--add <path>]... <N>[,<N>...] from the worktree root, never improvised git add/commit/push/gh pr create; --add every new file (it refuses unnamed ones). It prints a report skeleton to fill in. Never git stash: stash refs are shared by every worktree of a repo, so a parallel worker can pop yours.
  7. You stop at PR-open plus report. Do not merge, do not wait on CI, do not touch queue/tickets.md. The queue block stays intact until merge; the driver pipes your report into npm run govern:resolve -- <N>, which awaits CI, merges, and lands the resolution instead of redoing the work. This still holds for root-scope work: you never write to the main checkout, and queue/tickets.md there stays advisor-only — rootScope.commits is what hands the driver something to land in place of a PR.
  8. The report contract is unchanged. Your final message is the single JSON object from worker-prompt.md §5, no prose and no code fence, so the driver can act on it mechanically.
  9. Failure is reported, not retried. If you cannot finish, return the JSON with the honest status and a filled escalation rather than thrashing; the driver owns the one retry.
  10. You ARE the worker: never dispatch subagent_type: "worker". Spawn only read-only lookup/investigator children.

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed · +12 lines 69d20099c816
  2. 1mo ago Changed · +7 lines · +11 tokens per session 9cf6d6cc26ee
  3. 1mo ago Changed dc98b43b8e35
  4. 1mo ago Changed · -7 lines fe25f4d234e6
  5. 1mo ago Changed · +29 lines 6b362d9d682b
  6. 1mo ago Changed · +9 lines 0524df2df496
  7. 1mo ago Changed · +3 lines 417c882eddb1
  8. 1mo ago First seen · 42 lines · 14 tokens per session scan A 41bd8613b3af

Subscribe to this mod's changes

worker is an agent published in the GitHub repository anshss/shiploop (9 stars, last pushed 12d ago), licensed Apache-2.0. It adds 25 tokens to every session and 1,893 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other agents, from other repositories