verify-loop

verify-loop is a command for coding agents from sangrokjung/claude-forge. It costs 21 tokens per session (1,071 once invoked), scanned A, original, MIT.

A command that repeatedly checks recent code changes and tries to fix failures, with a configurable retry limit. It can run code review, builds, tests, linting, and type checks according to the project language.

In plain words
What is it for?
For rechecking Node.js, Python, Go, or Rust changes, finding problems in the diff, and applying automatic fixes when verification fails.
Why use it?
It avoids stopping after the first failed check and keeps the intended change, test results, and remaining errors together in one loop.

Command

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents shipped together

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 commands/sangrokjung/claude-forge/verify-loop
Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for verify-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/sangrokjung/claude-forge/verify-loop.svg)](https://agentmods.dev/commands/sangrokjung/claude-forge/verify-loop)
Your own site
<a href="https://agentmods.dev/commands/sangrokjung/claude-forge/verify-loop"><img src="https://agentmods.dev/badge/commands/sangrokjung/claude-forge/verify-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,071 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.00021 $0.01071
Opus 5 $0.00010 $0.00535
Sonnet 5 $0.00004 $0.00214
Haiku 4.5 $0.00002 $0.00107

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

Security

Grade A, and why

verify-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 5d ago.

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.

commands/verify-loop.md · 129 lines

How it starts

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

Task

0단계: 설정 파싱

  • --max-retries N: 최대 재시도 횟수 (기본: 3)
  • --only [type]: 특정 검증만 실행
  • 나머지: 의도 설명

1단계: 초기 환경 수집

  1. git status --short - 변경사항 확인 (없으면 중단)
  2. git diff --name-only - 변경 파일 목록
  3. Read: .claude/handoff.md (있으면)
  4. Read: CLAUDE.md, spec.md, prompt_plan.md (있는 것만)

2단계: 의도 파악

  • handoff.md 있으면 → handoff.md 기반
  • $ARGUMENTS에 의도 있으면 → $ARGUMENTS 기반
  • 둘 다 없으면 → 안내 후 중단:
    ⚠️ 의도를 알 수 없습니다.
    /verify-loop "변경 의도 설명"으로 재시도하세요.
    

3단계: 검증 루프 시작

════════════════════════════════════════════════════════════════
🔄 Verification Loop 시작 (max_retries: [N])
════════════════════════════════════════════════════════════════

각 시도마다:

[Attempt X/N]

  1. 코드 리뷰 (think hard):

    • git diff 실행
    • 의도대로 구현됐는지
    • 로직 오류, 엣지 케이스
    • 불필요한 코드 (console.log, dead code)
    • 보안 취약점
  2. 자동화 검증 (프로젝트 타입별):

    • Node.js: npm run build && npm test && npm run lint
    • Python: python -m pytest && python -m flake8
    • Go: go build ./... && go test ./...
    • Rust: cargo build && cargo test
  3. 결과 출력:

    ├── Build: ✅/❌
    ├── Test: ✅/❌ (N errors)
    ├── Lint: ✅/⚠️ (N fixable)
    └── TypeCheck: ✅/❌
    

4단계: 실패 시 에러 분석

🔍 에러 분석 중...
├── Fixable: N개 (타입)
└── Manual: N개 (타입)

Fixable 에러 (자동 수정):

  • import 누락 → 자동 추가
  • 린트 포맷 → eslint --fix 또는 prettier
  • 미사용 변수 → 삭제 또는 _ prefix
  • 타입 단순 오류 → 타입 추론 수정
🔧 자동 수정 중...
├── [수정 내용]
└── 완료

Manual 에러 (안내만):

⚠️ 수동 수정 필요:
  1. [파일:라인] - [에러 메시지]
  2. ...

💡 힌트: [해결 제안]

5단계: 재검증 또는 종료

재시도 가능하면:

  • Fixable 수정 후 → 다음 Attempt로

max_retries 도달 시:

════════════════════════════════════════════════════════════════
❌ Verification Loop 실패 (N회 시도 모두 실패)
════════════════════════════════════════════════════════════════

반복 실패 에러:
  1. [에러 상세]
  2. ...

권장 조치:
  1. /handoff 실행 - 현재 상태 기록
  2. /clear 후 새 시각으로 접근
  3. /learn --from-error로 교훈 기록

🎓 자동 학습 트리거: CLAUDE.md에 패턴 기록 권장
════════════════════════════════════════════════════════════════

Read the full file on GitHub · 129 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. 5d ago First seen · 129 lines · 21 tokens per session scan A 55c7bfe22090

Subscribe to this mod's changes

verify-loop is a command published in the GitHub repository sangrokjung/claude-forge (822 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 1,071 once invoked, about $0.0001 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.