verify-cascade

verify-cascade is a skill for Claude Code from alinaqi/maggy. It costs 45 tokens per session (1,316 once invoked), scanned B, original, MIT.

A model-routing workflow that asks a less expensive model for an answer, checks each part independently, and sends only flagged results to a stronger model.

In plain words
What is it for?
Use it when an agent needs to extract, answer, or summarise information with per-field verification and conditional escalation.
Why use it?
It reduces unnecessary use of the stronger model while still checking for likely mistakes that a cheap model may make.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it when an agent needs to extract, answer, or summarise information with per-field verification and conditional escalation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/verify-cascade
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 alinaqi/maggy --skill verify-cascade
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

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-cascade

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/verify-cascade/github.svg)](https://agentmods.dev/skills/alinaqi/maggy/verify-cascade)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/verify-cascade"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/verify-cascade/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-cascade

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/verify-cascade"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/verify-cascade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,316 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00045 $0.01316
Opus 5.5 $0.00018 $0.00526
Sonnet 5.5 $0.00009 $0.00263
Haiku 4.5 $0.00005 $0.00132

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

Security

Grade B, and why

verify-cascade scanned grade B with 1 finding 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 21d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (verify_cascade.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

VC="$(cat ~/.claude/.bootstrap-dir)/skills/verify-cascade/verify_cascade.py"
skills/verify-cascade/SKILL.md · 102 lines

How it starts

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

Verify-Cascade — extract cheap, verify, escalate only on a flag

maggy already routes by task complexity. This makes routing output-aware: a cheap model does the work, a decomposed verifier checks it, and you escalate to a strong model (Claude) only when the verifier flags a real problem. The cheap rung handles the easy items for near-free; only flagged items pay for the strong model — most of the quality of the big model at a fraction of the cost.

It's the same discipline as the security-audit finder ≠ validator gate, applied to routing: an independent verifier catches the cheap model's blind spots.

The loop

1. EXTRACT   cheap model produces an output (extraction / answer / summary)
2. VERIFY    a decomposed verifier asks narrow per-field yes/no questions,
             framed so "bad = true", and returns P(wrong) per question
3. GATE      escalate if ANY question's P(wrong) > fire threshold (max, not mean)
4. ESCALATE  only the flagged items pay for the strong model; the rest keep the cheap answer

Schema-validation is necessary but not sufficient: a cheap model produces confident, schema-valid fabrications (a blank field filled with a plausible invented value). A structural check can't see that — a semantic verifier can.

Verifiers (pluggable) — verify_cascade.py

VC="$(cat ~/.claude/.bootstrap-dir)/skills/verify-cascade/verify_cascade.py"
python3 "$VC"          # self-test (stubbed judge, no network, no model)

LocalVerifier — the default, nothing leaves your machine

Runs the whole decomposed question battery through a cheap CLI model in one call and returns {field::metric: P(wrong)}. No external service.

import sys
sys.path.insert(0, f"{__import__('subprocess').check_output(['cat', __import__('os').path.expanduser('~/.claude/.bootstrap-dir')]).decode().strip()}/skills/verify-cascade")
# (or simply: sys.path.insert(0, "<bootstrap-dir>/skills/verify-cascade"))
from verify_cascade import get_verifier, build_questions, cascade
v = get_verifier("local")                     # uses $MAGGY_JUDGE_CMD (default: deepseek --flash)
result = cascade(
    extract  = lambda: cheap_extract(...),     # your cheap-model call -> dict
    verify   = lambda rec: v.verify({"source_text": source}, build_questions(rec, schema)),
    escalate = lambda: strong_extract(...),    # your strong-model call -> dict
    fire_t   = 0.7,
)
# result: {record, escalated: bool, fired: [qid...], scores: {qid: p}}

Set the judge model with MAGGY_JUDGE_CMD (e.g. qwen3, deepseek --flash) or pass your own judge=callable(prompt)->text. The default passes the prompt on stdin (no shell, so prompt content is never interpreted as a command), so MAGGY_JUDGE_CMD must read from stdin. Questions are scored in complete batches and an over-long source warns on stderr rather than being silently truncated.

Read the full file on GitHub · 102 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 21d ago First seen · 102 lines · 45 tokens per session scan B 491658837155

Subscribe to this mod's changes

verify-cascade is a skill published in the GitHub repository alinaqi/maggy (708 stars, last pushed 3d ago), licensed MIT. It adds 45 tokens to every session and 1,316 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.

Related

Other skills, from other repositories

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

hashgraph-online/awesome-codex-plugins · 53 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

modal

Use when running Python or GPU workloads serverlessly on Modal — modal.App, inline container Images, gpu= on @app.function, Volumes for weight caching, Cron schedules, ASGI endpoints, modal run vs serve vs deploy. NOT managed prediction APIs with no container of your own (that is replicate); NOT SSH-able GPU boxes…

ericrisco/rsc-harness · 78 tokens

python

Use when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms, src/ layout + pyproject.toml with uv, ruff+mypy+pytest gate. NOT a FastAPI/ASGI service (that is fastapi), NOT a deep pytest suite (that is…

ericrisco/rsc-harness · 94 tokens

django

Use when building, reviewing, securing, testing or shipping a Django app — models, migrations, QuerySets/managers, FBV/CBV views, forms, the admin, settings split, and Django REST Framework (serializers, ModelViewSet, permissions). NOT async FastAPI/Pydantic services (that is fastapi), NOT Postgres schema/index work…

ericrisco/rsc-harness · 84 tokens

beautifulsoup-parsing

Expert guidance for HTML/XML parsing using BeautifulSoup in Python with best practices for DOM navigation, data extraction, and efficient scraping workflows.

Mindrally/skills · 32 tokens