verify-ask-loop

verify-ask-loop is a skill for Claude Code, Codex from thangchung/agent-engineering-experiment. It costs 89 tokens per session (1,168 once invoked), scanned A, original, MIT.

A formal check for an order’s clarification loop, where the system decides whether to ask the customer for more information. It verifies that the number of questions stays within the configured limit on both supported web transports.

In plain words
What is it for?
Use it when changing intent checks, information extraction, clarification, question limits, or the order workflow on SSE and AG-UI.
Why use it?
It catches loops that keep asking questions indefinitely when extraction or clarification fails.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when changing intent checks, information extraction, clarification, question limits, or the order workflow on SSE and AG-UI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thangchung/agent-engineering-experiment/verify-ask-loop
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.

Any agent
npx skills add thangchung/agent-engineering-experiment --skill verify-ask-loop
Clone the repo
git clone --depth 1 https://github.com/thangchung/agent-engineering-experiment

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/thangchung/agent-engineering-experiment/verify-ask-loop/github.svg)](https://agentmods.dev/skills/thangchung/agent-engineering-experiment/verify-ask-loop)
Your own site
<a href="https://agentmods.dev/skills/thangchung/agent-engineering-experiment/verify-ask-loop"><img src="https://agentmods.dev/badge/skills/thangchung/agent-engineering-experiment/verify-ask-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-ask-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/thangchung/agent-engineering-experiment/verify-ask-loop"><img src="https://agentmods.dev/badge/skills/thangchung/agent-engineering-experiment/verify-ask-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,168 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.00089 $0.01168
Opus 5.5 $0.00036 $0.00467
Sonnet 5.5 $0.00018 $0.00234
Haiku 4.5 $0.00009 $0.00117

Measured today against content hash c1baa2587986, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

verify-ask-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 today.

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.

coffeeshop-jev/.agents/skills/verify-ask-loop/SKILL.md · 43 lines

How it starts

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

Verify the ask loop

Property: in one order, the customer is asked at most IntentPolicy.MaxAsks (2) questions. Harm if broken: the order never ends, and every turn costs a decision-model call and an LLM call.

Tool: TLA+ / TLC 1.7.4. It checks every order of Gate / Extract / customer-answer steps, which tests cannot enumerate. Model: formal/ask-loop/AskLoop.tla. Run: formal/run.sh formal/ask-loop (about 1 s). TLC and Java come from mise; if mise where http:tla2tools is empty, run /statechart once (it installs both) or set TLA2TOOLS and JAVA.

What the check says today (commit 5439b7c)

config transport result meaning
agui.cfg /agui pass cap holds
sse.cfg /orders pass cap holds. Fixed: ExtractExecutor used to send Unclear without counting the ask, so Gate-accepts / Extract-fails looped forever. It now spends an ask, and gives up with Rejected(AskCap) (new Rejected -> reply edge after Extract in OrderWorkflow). Pinned by FormalReplayTests.Sse_ExtractFailureLoop_IsCappedByMaxAsks.
sse-uncounted.cfg /orders fail QuestionsBounded mutant: the old behaviour; proves the property can fail
agui-hostile.cfg /agui fail QuestionsBounded finding, open: asks and history live in the browser; ReadClientState clamps them but cannot tell a reset to 0 from the truth, so the cap is advisory

formal/ask-loop/expected.txt records exactly these results; run.sh exits 1 on any difference. The open finding and the mutant are expected failures. Do not edit the model or weaken the property to make them pass. When someone fixes the open finding, change its line in expected.txt to pass.

Coverage (what each model part means)

model code
GateUnclear, GateAccept, GateOffTopic, GateShow IntentPolicy.Decide / UnclearOrGiveUp; GateExecutor.HandleAsync (newAsks = decision is Unclear ? Asks + 1 : Asks)
ExtractOk, ExtractFails ExtractExecutor.HandleAsync (no usable lines -> IntentPolicy.UnclearOrGiveUp, Asks + 1)
ExtractFails cap on agui ExtractExecutor (first line of defence) and CoffeeShopAgent.Finish, case ClarifyRequest when working.Asks >= MaxAsks (backup)
Answer with Hostile CoffeeShopAgent.ReadClientState (Math.Clamp(n, 0, MaxAsks)), OrderSession.CreateAgent (echoes asks)
Transport = "sse" PlaceOrderCommand.StreamAsync, OrderWorkflow.Build (RequestPort -> Gate edge)

Read the full file on GitHub · 43 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. today First seen · 43 lines · 89 tokens per session scan A c1baa2587986

Subscribe to this mod's changes

verify-ask-loop is a skill published in the GitHub repository thangchung/agent-engineering-experiment (27 stars, last pushed yesterday), licensed MIT. It adds 89 tokens to every session and 1,168 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-12-03.

Related

verify-ask-loop compared with skills from other repositories

verify-ask-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
verify-ask-loopthangchung/agent-engineering-experimentSkill27yesterdayMITA89Claude Code, Codex
phoenix-cliArize-ai/phoenixSkill13ktodaynoneA93Cursor
phoenix-error-analysisArize-ai/phoenixSkill13ktodaynoneA176Cursor
maf-dev-loopJinLee794/agent-framework-skillsSkill24mo agoMITA70Cursor
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9kyesterdayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill343todayApache-2.0A112Claude Code