Skip to content
Agentmart
Submit a tool

code-loop

Drive the Code stage one plan step at a time with persistent progress, enforce the fix-loop limit, and guard agent branches.

Skill by ALTEN-group

IndexedMIT★ 5
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/alten-group-code-loop

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Drive the Code stage one plan step at a time with persistent progress, enforce the fix-loop limit, and guard agent branches. Use when a Code agent implements a validated plan.md, when it records a step result or failure, or before committing to check the branch is short-lived and correctly named.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/code-loop

What's inside

Skill name
code-loop
Description
Drive the Code stage one plan step at a time with persistent progress, enforce the fix-loop limit, and guard agent branches. Use when a Code agent implements a validated plan.md, when it records a step result or failure, or before committing to check the branch is short-lived and correctly named.
License
MIT
Instructions
47 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (7)

  • SKILL.md
  • code-loop-contract.md · references/
  • branch-guard.mjs · scripts/
  • branch-guard.test.mjs · scripts/
  • code-fixture.mjs · scripts/
  • code-loop.mjs · scripts/
  • code-loop.test.mjs · scripts/

SKILL.md (first lines)

# Code Loop

Make the Code stage deterministic: one plan step per turn, recorded in `progress.json`, bounded by a fix-loop limit the agent cannot reset, on a short-lived branch. AI implements; the Developer steps in only when the limit is reached.

## When to Use This Skill

- A Code agent implements a validated `plan.md` and must record each step's result.
- A step fails its checks and the failed attempt must be counted against the fix-loop limit.
- Before committing, the agent must prove it is on a short-lived, correctly named branch.

## Path resolution

Resolve `references/` and `scripts/` relative to **this skill's install directory** (the folder that contains this `SKILL.md`), not the consumer repository root or the current shell cwd. If the skill was installed under `.agents/skills/code-loop/` or `.claude/skills/code-loop/`, use that base path. Run the scripts from the repository root (so `specs/` paths resolve) and write `<skill-dir>` as that install path.

## Workflow

1. **Read `references/code-loop-contract.md` now.** It is the authoritative source for the loop, the `progress.json` state, the fix-loop limit, and the branch rules.
2. Check the branch before the first commit (use `--base develop` for a branch created from `develop`):

```bash
node <skill-dir>/scripts/branch-guard.mjs --git --base main --max-age-days 5
```

3. Drive the loop, one step per turn:

```bash
node <skill-dir>/scripts/code-loop.mjs next   --dir specs/issue-42
node <skill-dir>/scripts/code-loop.mjs start 1 --dir specs/issue-42
# apply the step's New Code, run its Verification and Bootable Check, then the controls
node <skill-dir>/scripts/code-loop.mjs pass 1  --dir specs/issue-42
# or, when anything fails:
node <skill-dir>/scripts/code-loop.mjs fail 1  --dir specs/issue-42 --reason "AC-2 test returns 200, expected 403"
node <skill-dir>/scripts/code-loop.mjs status --dir specs/issue-42
node <skill-dir>/scripts/code-loop.mjs check-history --dir specs/issue-42   # git: the counters were never lowered (CI runs it too)
```

4. Treat a nonzero exit as a stop. After `fix-loop limit reached: the Developer steps in`, make no further attempts and hand over to the Developer. After `plan changed after Code started`, stop: the Developer must re-approve the plan. After `plan is not approved by a Developer`, stop: `start` and `next` need `## Approval` -> `Approved By` filled in by a person.
5. When every step is `done`, open the pull request with the `pr-record` skill and validate it with `--stage code`.

## Done When

- `code-loop.mjs status` shows every plan step `done` and fix-loop attempts within the limit.
- `code-loop.mjs check-history` exits with code 0.
- `branch-guard.mjs` exits with code 0 for the working branch.
- Nobody edited `progress.json` or `plan.md` by hand.

From ALTEN-group/coding-pal, MIT.

More from ALTEN-group/coding-pal

Signals

Stars
5
Forks
0
Open issues
0
Last commit (this folder)
Oct 13, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ALTEN-group

Cite this page

code-loop skill. Agent Mart. https://agentmart.dev/skills/alten-group-code-loop (last updated 2026-10-24)