verify-goal-loop

verify-goal-loop is a skill for Claude Code, Codex from dimetron/pi-go. It costs 88 tokens per session (2,060 once invoked), scanned A, original, MIT.

A formal model for checking the automatic /goal loop in a coding tool. It treats the loop as a sequence of states, such as starting, pausing, resuming, and completing a goal.

In plain words
What is it for?
Use it when changing goal-loop code or investigating loops that stop too early, fail to stop, or mark unfinished goals as complete.
Why use it?
It finds ordering bugs that a single test may miss, such as a completion closing the wrong goal or the loop running more cycles than allowed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go run ./hack/formal/lint/main hack/formal/goal.

Good fit Use it when changing goal-loop code or investigating loops that stop too early, fail to stop, or mark unfinished goals as complete.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go
agentmods
npx agentmods add skills/dimetron/pi-go/verify-goal-loop

Made for: Claude Code, Codex.

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-goal-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/verify-goal-loop/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/verify-goal-loop)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/verify-goal-loop"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/verify-goal-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for verify-goal-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/verify-goal-loop"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/verify-goal-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00088 $0.02060
Opus 5.5 $0.00035 $0.00824
Sonnet 5.5 $0.00018 $0.00412
Haiku 4.5 $0.00009 $0.00206

Measured 20d ago against content hash 5007fc63a6d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

verify-goal-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 20d 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.

internal/extension/bundled_skills/verify-goal-loop/SKILL.md · 158 lines

How it starts

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

Verify the /goal loop

The /goal loop is a state machine spread over four files, and its interesting bug is an ordering one: which of two things beginGoalCycle reads first. Nothing in a single-unit test can see a state that only a sequence produces, which is why this model exists.

The property: a completion reported under one objective can never close a different one, and the cycle budget bounds the automatic turns.

Does my change touch the verified code

Run this; empty output means the model still describes the code.

git diff --stat <sync-commit>..HEAD -- \
  internal/tui/goal.go internal/tui/agent_loop.go internal/tools/goal.go \
  internal/session/store.go internal/tui/tui.go

Model covers (each model step names the function it stands for):

Model action Code
SetGoalIdle setGoal + beginGoalCycle first cycle, goal.go:63-93, 270-296
SetGoalBusy setGoal then the early return on m.running, goal.go:392-399
Pause pauseGoal, goal.go:158-180
Stop cancelAgent's goal branch, agent_loop.go:835-842
ResumeClose / ResumeStopped / ResumeRenew resumeGoal, goal.go:190-225
Clear clearGoal, goal.go:144-157
TurnEndQueued / TurnEndRefuse / TurnEndSteer / TurnEndNoCycle handleAgentDone → continueGoalLoop, agent_loop.go:2013-2075, goal.go:445-460
BeginCycle beginGoalCycle's slot read then budget check, goal.go:245-296
ToolComplete GoalController.Complete, internal/tools/goal.go:135-182
Steer steerPrompt, agent_loop.go:963
ManualTurn an ordinary prompt with no cycle behind it

Not modelled, and why: the TUI event loop and its goroutines (the model assumes a step completes before the next starts); persistGoal and session restore; AppendActiveGoal's prompt text; the wall-clock UpdatedAt stamps; plan mode; and the turn_complete/user_input_required lifecycle hooks. A bug in any of those is invisible to this check.

Read the full file on GitHub · 158 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. 20d ago First seen · 158 lines · 88 tokens per session scan A 5007fc63a6d1

Subscribe to this mod's changes

verify-goal-loop is a skill published in the GitHub repository dimetron/pi-go (232 stars, last pushed 6d ago), licensed MIT. It adds 88 tokens to every session and 2,060 once invoked, about $0.0004 per session on Opus 5.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-11-09.

Related

verify-goal-loop compared with skills from other repositories

verify-goal-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
verify-goal-loopdimetron/pi-goSkill2326d agoMITA88Claude Code, Codex
test-fixpatriceckhart/zotSkill372todayMITA17Claude Code
find-tracesaxiomhq/cliSkill606d agoMITA37Claude Code
troubleshoot-tervaterva-sh/tervaSkill5yesterdayMITA83Claude Code, Codex
golang-lintalexastrum/sklSkill115d agoMITA100Claude Code
golang-troubleshootingalexastrum/sklSkill115d agoMITA130Claude Code
golang-samber-oopsalexastrum/sklSkill115d agoMITA74Claude Code