loop-worker
Skill54 starsChanged 3 months agoApache-2.0View on GitHub
Autonomously work a `.pm` workstream to completion — pick the next pending milestone, implement every task end to end, /ship it, then move to the next until none remain. Use when the user asks to "loop", drain, or work through a whole workstream's backlog (e.g. `/loop-worker w1`). Sequential, not interval-based; for a timed poll use /loop.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- jpoindexter/theft-kittheir own version, first seen May 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jpoindexter/theft-kit★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .pm/AGENTS.mdAGENTS.md
- .pm/CLAUDE.mdCLAUDE.md
- merge-upstream-mainSkill
- pm-brainstormSkill
- pmSkill
- releaseSkill
- shipSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 26
If there are no pending milestones, go to Exit.
- Distinctive: line 36
Do the actual engineering, task by task, in the order the milestone implies:
- Very specific: line 38
Follow all AGENTS.md rules (root AGENTS.md and sdk/typescript/AGENTS.md — keep it simple, no speculative defenses, public CLI surface …
- Very specific: line 39
Run the relevant test suites and make them pass before considering a task done — from sdk/typescript/: pnpm run test, pnpm run types, pnpm …
- Very specific: line 47
If /ship surfaces a failure it cannot fix (rebase conflict it can't resolve, rejected push), treat it as a block (see below).
- Distinctive: line 55
Stop the loop and give a final summary when any of these holds:
- Very specific: line 57
Done: no pending milestones remain in <wN>.
- Distinctive: line 63
One milestone per ship: Never batch two milestones into one commit.
- Very specific: line 65
Stay in
<wN>: Only pick milestones from the requested workstream. - Distinctive: line 66
Report honestly: If you skipped a task, mocked something, or a suite was flaky, say so in the per-milestone summary — don't present partial …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Task: Drain a .pm workstream milestone by milestone
/loop-worker <wN> — repeatedly pick the next pending milestone in workstream <wN>, implement it fully, /ship it, and continue to the next, until the workstream has no pending milestones left (or a milestone genuinely blocks). This is a long-running autonomous loop over the .pm board; it composes /pm (board reads/writes), your own implementation work, and /ship.
Parse the target workstream from $ARGUMENTS (e.g. w1). If $ARGUMENTS is empty, STOP and ask which workstream to drain — never guess.
Preconditions (verify once, up front)
git branch --show-currentismain. If not, STOP and ask (same rule as/ship).git status— note pre-existing uncommitted changes. Do not sweep unrelated changes into a milestone's ship; if the tree is dirty with work you didn't do, surface it and ask before starting.- The workstream
.pm/<wN>/README.mdexists. If not, STOP and report.
The loop
Repeat until the exit condition below:
1. Pick the next pending milestone
Read .pm/<wN>/README.md. In the ## Milestones list, pending milestones are the unchecked ones (- [ ] **mN**). Pick the lowest-numbered pending milestone that still has a live directory (.pm/<wN>/mN/, not under done/). Cross-check by listing .pm/<wN>/m*/ and its done/ folder — the checkbox and the on-disk state must agree; if they disagree, trust the task files and flag the drift.
If there are no pending milestones, go to Exit.
Announce which milestone you picked and give a one-line plan before doing work.
2. Understand the milestone
Read .pm/<wN>/mN/README.md and every task file .pm/<wN>/mN/tNNN.md (skip any already in done/). These define the scope, order, and acceptance. Milestones ship features end to end — include the SDK, docs, and container tasks alongside the CLI ones; do not stop at the code. Respect .pm/DO_NOT_DO.md and the milestone's own acceptance criteria.
3. Implement it
Do the actual engineering, task by task, in the order the milestone implies:
- Follow all
AGENTS.mdrules (rootAGENTS.mdandsdk/typescript/AGENTS.md— keep it simple, no speculative defenses, public CLI surface discipline, public-repository hygiene; prettier on.pmmarkdown, skill layout, etc.). - Run the relevant test suites and make them pass before considering a task done — from
sdk/typescript/:pnpm run test,pnpm run types,pnpm run format(seesdk/typescript/TESTING.md), plus a container build whenDockerfile/docker/change — whichever the change touches. Never mark a task complete on unverified code. - You may delegate independent sub-tasks to subagents (Agent tool) to parallelize, but you own correctness.
- Keep the milestone's
.pmstatus in sync as you finish tasks (task frontmatter, milestone README**Status:**+ the— DONErow, workstream checkbox) — these are/pm-governed writes, so follow the conventions in.claude/skills/pm/SKILL.mdexactly. When the milestone is fully done, move it per the.pmrule: a done milestone with no open tasks moves whole to.pm/<wN>/done/mN/(mvthe directory, thenrmdirthe empty original — leave no tombstone), and its workstream checkbox flips to[x].
4. Ship it
Invoke /ship (the ship skill) for this milestone's changes. Because you made the changes this session, /ship runs session-aware: it stages exactly what you touched and writes the commit message from your knowledge. /ship ends at a successful push — it does not watch CI or the deploy. Do not proceed to the next milestone until /ship reports the shipped HEAD.
If /ship surfaces a failure it cannot fix (rebase conflict it can't resolve, rejected push), treat it as a block (see below).
5. Continue
Loop back to step 1 to pick the next pending milestone.
Exit
Stop the loop and give a final summary when any of these holds:
- Done: no pending milestones remain in
<wN>. Report which milestones you shipped this run. - Blocked: a milestone needs a decision only the user can make (ambiguous scope, a
DO_NOT_DOconflict, an external credential/access you lack, or a ship failure you can't resolve). Stop before shipping half-work — report the exact blocker and what you'd need to proceed. Do not skip a blocked milestone to grab a later one unless the user says so. - Budget/interrupt: the user interrupts, or you've been running long enough that a checkpoint is warranted — report progress (shipped, in-flight, remaining) so the run can be resumed cleanly.
Guardrails
- One milestone per ship. Never batch two milestones into one commit; each milestone lands as its own shipped unit so history and rollback stay clean.
- Never ship red. A failing test suite is a block, not a footnote — don't route around it.
- Stay in
<wN>. Only pick milestones from the requested workstream. Workers are general-purpose, but this run is scoped to the queue the user named. - Report honestly. If you skipped a task, mocked something, or a suite was flaky, say so in the per-milestone summary — don't present partial work as complete.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

