prp-loop

An automated development workflow that moves a coding task through planning, implementation, pull-request creation, review, and corrections. It runs stages in separate command-line sessions and saves its progress so work can continue later.

In plain words
What is it for?
It helps run a complete plan-to-review cycle, repeat fixes after review, and stop after a chosen stage. You can also set cycle, iteration, and validation limits.
Why use it?
It reduces the need to manually restart and coordinate each stage of a long coding task. Persisted state also helps resume work across sessions or context windows.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/wirasm/prp/prp-loop
Any agent
npx skills add Wirasm/prp --skill prp-loop
Clone the repo
git clone --depth 1 https://github.com/Wirasm/prp

Made for: Claude Code, Codex.

Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00095 $0.00889
Opus 5 $0.00048 $0.00445
Sonnet 5 $0.00019 $0.00178
Haiku 4.5 $0.00010 $0.00089

Measured 2d ago against content hash 818a91408bf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prp-loop 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/prp_loop.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/prp-loop/SKILL.md · 57 lines

How it starts

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

Arguments: $ARGUMENTS (and $1, $2, ...) refer to the arguments given when this skill was invoked. Take them from the user's request; if absent, infer them from the conversation.

PRP Loop — autonomous cyclic pipeline

Launch the orchestrator that drives plan → implement (commit + PR) → review and loops review → fix until the PR review is clean (or limits are hit). It runs headless codex exec once per stage and tracks progress in ~/.prp/<key>/state/prp-loop.state.json.

Run it

Start a new loop with the user's request as the feature argument:

uv run .agents/skills/prp-loop/scripts/prp_loop.py "$ARGUMENTS" --cli codex

Resume a halted or in-progress loop:

uv run .agents/skills/prp-loop/scripts/prp_loop.py --resume --cli codex

Defaults: --max-cycles 3, --max-implement-iterations 10, base branch auto-detected. Pass --validate "<cmd>" to give the loop an authoritative green check (exit 0 = pass).

Stop after a stage (--until)

Pass --until <stage> (plan | implement | pr | review | fix) to halt once that stage completes:

uv run .agents/skills/prp-loop/scripts/prp_loop.py "$ARGUMENTS" --cli codex --until implement

--until implement runs plan → implement and stops once validations are green and the implementation skill has committed and opened its PR — no review.

UX note: the retired Ralph loop was single-session and interactive (a Stop-hook fed the prompt back in the same session). prp-loop --until implement is headless instead — it drives fresh codex exec sessions per iteration and you resume/inspect via the state file rather than watching it live.

What it does

  1. planprp-plan writes the plan under the project's PRP store at $PRP_DIR/plans/<feature>.plan.md.
  2. implementprp-implement executes and validates the plan, commits the work, and opens the PR (bounded by --max-implement-iterations).
  3. pr compatibility — if an older implementation run did not open a PR, prp-pr does so once.
  4. reviewprp-review runs its current default review, writes the canonical report, and publishes that complete report to GitHub.
  5. cycle — if the verdict needs fixes, the complete report, plan, and live PR feed into a fresh prp-implement correction pass → push → re-review, up to --max-cycles. Ready to merge → done; review incomplete → halt.

Read the full file on GitHub · 57 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 57 lines · 95 tokens per session scan A 818a91408bf6

Subscribe to this mod's changes

prp-loop is a skill published in the GitHub repository Wirasm/prp (2,240 stars, last pushed 4d ago), licensed MIT. It adds 95 tokens to every session and 889 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens