Loop it agent workflow PoC

Set a safe coding loop in Codex, Claude Code, or Cursor.

Loop it turns "keep fixing it" into a bounded agent workflow: install the skill, choose the coding agent, define proof, cap the passes, then copy a prompt that tells the agent exactly when to continue or stop.

1Install the skill
2Pick the agent
3Copy the loop

Choose the agent first

The prompt and install path update for each tool.

Install from GitHub

Start with one repo command.

Clone the public repo, install the skill into the current project, then invoke it from your coding agent chat.

Repo
git clone https://github.com/fhajjej-ship-it/loop-it.git
cd loop-it
node ./bin/loop-it.mjs install --agent all --scope project

Codex

.agents/skills/loop-it/

Use $loop-it

Claude Code

.claude/skills/loop-it/

/loop-it

Cursor

.cursor/skills/loop-it/

/loop-it

Step-by-step guide

Use this page in four decisions.

The goal is not to automate everything. The goal is to give the agent a bounded loop that is easy to review.

01

Choose your coding agent

Start with Codex, Claude Code, or Cursor so the prompt can tell the agent how to behave.

02

Pick the loop type

Choose the recurring job: fix a bug, repair a review, improve quality, or update docs.

03

Set proof and limits

Write the objective, the verification command, and the maximum number of passes.

04

Copy, run, and stop

Paste the prompt into the agent. It keeps going only while the next pass is useful.

Concrete Codex example

A good loop has a job, proof, and stop rule.

This is the pattern the generated prompt follows. It keeps Codex focused on one repair cycle instead of drifting into broad cleanup.

Ask

Use $loop-it to fix the failing checkout test. Keep the patch small and stop after three passes.

Proof

Run npm test -- checkout and record the failing output, changed files, and final pass evidence.

Stop

Stop when the regression is covered, the same failure repeats twice, or approval is needed.

02

Pick the loop type

Choose the repeated job you want the agent to perform.

03

Set proof and limits

The loop needs a success check and a hard stop.

Approval gates stay outside the loop: deploys, credentials, destructive git operations, production writes, and external messages.
If the next pass is not likely to improve the result, the loop should stop and report why.
04

Copy and run the prompt

Paste this into Codex. It tells the agent what to do, how to prove it, and when to stop.

Generated prompt for Codex
3 pass limit
Use $loop-it in Codex for a bounded ticket to verified fix.

Objective:
Fix the failing checkout test and prove the regression is covered.

How to run the loop:
1. Inspect only the smallest relevant repository context.
2. Make one focused change or decision.
3. Verify with: npm test -- checkout
4. Record evidence, changed files, residual risk, and the next decision.
5. Continue only if the next pass has a clear expected improvement.

Iteration budget:
3 passes maximum.

Stop conditions:
Stop after success, two failed reproductions, or blocked access.

Approval gates:
Ask before production writes, external messages, credentials, destructive git operations, or deploys.

Final report:
Summarize outcome, verification evidence, changed files, remaining risks, and the recommended next action.

What to do next in Codex

Open Codex in the repository, paste the prompt, and let it run one bounded pass.

Paste

Add the generated prompt to the agent chat.

Review

Check each pass before allowing bigger changes.

Stop

Accept the result or use the final report to decide the next loop.

Want the skill files and install notes?

Read the public repo for Codex skill setup and portable usage.

Open repo