loop-completion

A completion step for a requirements-checking loop. After all REQs pass, it runs a separate verifier through Levels 1–3 before the feature is declared complete.

In plain words
What is it for?
Use it after a loop finishes to verify a feature without allowing the verifier to modify files. It can also offer an optional browser check, called Level 4, after automated verification passes.
Why use it?
It adds an independent verification step after the requirements review. If verification still fails, it records whether automatic fixes are exhausted and clearly reports that manual work remains.

Agent for Claude Code

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 agents/byeongminlee/nextjs-claude-code/loop-completion
Clone the repo
git clone --depth 1 https://github.com/ByeongminLee/nextjs-claude-code

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 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.00000 $0.00619
Opus 5 $0.00000 $0.00309
Sonnet 5 $0.00000 $0.00124
Haiku 4.5 $0.00000 $0.00062

Measured yesterday against content hash 8557e70c0660, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loop-completion 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 yesterday.

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.

template/.claude/agents/loop-completion.md · 69 lines

How it starts

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

Loop — Completion Reference

Read when all REQs pass (step 7) or max iterations reached (step 8).

On success (all REQs pass)

After all REQs pass, run verification (Level 1-3) before declaring completion:

  • Spawn verifier agent:
    [HANDOFF]
    TO: verifier (haiku)
    TASK: Verify feature "[name]" post-loop implementation
    DONE-WHEN:
      - Level 1-3 all pass
    MUST-NOT:
      - Modify any file
    READS:
      - spec/feature/[name]/PLAN.md
      - spec/feature/[name]/spec.md
    [/HANDOFF]
    
  • If verifier fails and auto-fix budget is still available for this iteration: apply fix and re-verify
  • If verifier fails and auto-fix budget is exhausted: exit with partial success — report: All REQs passed review but verification failed with budget exhausted. Failing verification: [details]. Manual fix needed. Update STATE.md to idle with failing verification info.
  • Level 4 (human-verify) is optional in /loop — ask user: "All REQs pass and Level 1-3 verified. Would you like to do a browser check (Level 4)?" (Level 4 is mandatory in /dev flow but optional in /loop since the user has already seen the feature iterating.)
[Loop Complete — All REQs Satisfied]

Feature: [name]
Iterations: N/5
Verification: Level 1-3 passed
Final status:
  REQ-001: PASS
  REQ-002: PASS
  REQ-003: PASS

All requirements in spec.md are implemented and verified.
  • Update spec/STATE.md:
    • Move feature from ## Features to ## Completed with date
  • Write history entry to spec/feature/[name]/history/YYYY-MM-DD-loop-complete.md
  • Delete spec/feature/[name]/LOOP_NOTES.md (no longer needed)

On max iterations reached (some REQs still failing)

[Loop Exhausted — Max Iterations Reached]

Feature: [name]
Iterations: 5/5
Passing: X/Y REQs
Still failing:
  REQ-002: [reason from last review]
  REQ-005: [reason from last review]

Previous attempts summary:
  [condensed history from LOOP_NOTES.md]

These requirements could not be automatically resolved.
Manual intervention required.

Read the full file on GitHub · 69 lines

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. yesterday First seen · 69 lines · 0 tokens per session scan A 8557e70c0660

Subscribe to this mod's changes

loop-completion is an agent published in the GitHub repository ByeongminLee/nextjs-claude-code (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 619 tokens. 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-31.

Related

Other agents, from other repositories

trigger-dev-expert

Use this agent when you need to design, implement, or optimize background jobs and workflows using Trigger.dev framework. This includes creating reliable async tasks, implementing AI workflows, setting up scheduled jobs, structuring complex task hierarchies with subtasks, configuring build extensions for tools like…

hackerai-tech/hackerai · 0 tokens

fe-a11y-auditor

Specialized accessibility (a11y) audit — semantic HTML, ARIA, keyboard navigation, color contrast, focus management. More precise than fe-reviewer's a11y axis. READ-ONLY. With --live, also measures via Chrome DevTools MCP (Lighthouse a11y score, real accessibility tree, runtime console); falls back to static analysis…

sh5623/fe-rail · 85 tokens

site-crawler

Phase 1 main agent. Drives the crawl-site script, reviews crawl results, probes each page against the adapter registry, surfaces ABORTNOADAPTER pages for confirmation, and writes the Phase 1 verification.

Blazity/nextjs-migration-plugin · 46 tokens

state-repairer

Repairs a Zod-invalid state JSON file (crawl.json, probe.json, etc.) so it satisfies its schema. Dispatched by any phase that loads a state file and receives a diagnostic result. Format-only repair, identical contract to adapter-repairer.

Blazity/nextjs-migration-plugin · 57 tokens

migration-planner

Phase 3 recovery sub-agent. Refines the analyzed library and crawl into an ordered build roadmap using cluster summaries and route data only.

Blazity/nextjs-migration-plugin · 31 tokens

page-verifier

Phase 6 visual polish sub-agent. Fixes visual parity for one page section at one viewport using live browser inspection and per-change verification.

Blazity/nextjs-migration-plugin · 32 tokens