prp-loop

Orchestrates a resumable headless pipeline cycling plan, implement, PR, review, and fix stages.

2.2k|608|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/Wirasm/PRPs-agentic-eng --skill prp-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prp-loop
Source: https://github.com/Wirasm/PRPs-agentic-eng/tree/main/plugins/prp-core/skills/prp-loop
Command: npx skills add https://github.com/Wirasm/PRPs-agentic-eng --skill prp-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Running a full AI-driven delivery cycle (planning, implementation, PR creation, code review, and corrections) across multiple context windows requires manual re-prompting and loses progress when sessions end. This Skill automates that entire loop in detached headless CLI sessions with persisted state, so long-running pipelines survive interruptions and resume exactly where they stopped.

Core Features & Use Cases

  • Autonomous cyclic pipeline: Drives plan → implement (commit + PR) → review, then loops review → fix until the review verdict is clean or safety limits are hit.
  • Resumable state tracking: Persists progress to a state file under ~/.prp/<key>/state/, so a halted or interrupted loop can be continued with --resume.
  • Safety bounds: Refuses to open PRs from protected branches, caps review cycles and implementation iterations, and halts with state preserved on failures.
  • Use Case: Ask the agent to run the full PRP loop for a new feature; it plans, implements, opens a PR, gets it reviewed, applies corrections, and stops only when the review is clean — all without further interaction.

Quick Start

Ask the agent to run the full PRP loop for your feature description, optionally with a base branch, a validation command, or --resume to continue a saved loop.

Frequently Asked Questions about prp-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an autonomous plan-implement-review loop with Claude Code?

Invoke the prp-loop skill with a feature description; it runs prp-plan, prp-implement, prp-pr, and prp-review in fresh headless claude -p sessions, cycling review and fix until the review verdict is clean or the cycle limit is reached.

How do I resume an interrupted headless agent pipeline?

Re-run the loop script with the --resume flag. Progress is persisted in ~/.prp/<key>/state/prp-loop.state.json, so the pipeline continues from the exact stage and cycle where it halted.

Can I use Codex CLI instead of Claude for headless agent stages?

Yes, pass --cli codex and each stage runs via codex exec --json instead of claude -p. The CLI choice is persisted in the state file, so a resumed loop keeps its original CLI unless overridden.

What safety limits prevent an autonomous coding loop from running forever?

The loop is bounded by --max-cycles (default 3 review-fix cycles) and --max-implement-iterations (default 10 per stage). It halts with state preserved on repeated validation failures, failed pushes, or no-progress fix passes, and refuses to open PRs from main, master, or development branches.

How do I stop the pipeline after implementation without running a review?

Pass --until implement to halt once the implementation is green, committed, and opened as a PR. Other supported stop points are plan, pr, review, and fix.