verify-e2e

verify-e2e is a command for Claude Code from knowledgestack/ks-cookbook. It costs 62 tokens per session (1,369 once invoked), scanned A, original, MIT.

An end-to-end verification command for the ks-cookbook project. End-to-end testing checks complete user workflows across the whole system, rather than only individual functions.

In plain words
What is it for?
Use it to run the full suite or selected cases, such as only flagship examples or named recipes, then inspect the generated report and actionable summary.
Why use it?
It checks many recipes and flagship examples together, verifies their claimed result identifiers, and sends failures for triage. This helps reveal integration problems that smaller tests may miss.

Command 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 commands/knowledgestack/ks-cookbook/verify-e2e
Clone the repo
git clone --depth 1 https://github.com/knowledgestack/ks-cookbook

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/knowledgestack/ks-cookbook/verify-e2e.svg)](https://agentmods.dev/commands/knowledgestack/ks-cookbook/verify-e2e)
Your own site
<a href="https://agentmods.dev/commands/knowledgestack/ks-cookbook/verify-e2e"><img src="https://agentmods.dev/badge/commands/knowledgestack/ks-cookbook/verify-e2e.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 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,369 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.00062 $0.01369
Opus 5 $0.00031 $0.00685
Sonnet 5 $0.00012 $0.00274
Haiku 4.5 $0.00006 $0.00137

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

Security

Grade A, and why

verify-e2e 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 3d 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.

.claude/commands/verify-e2e.md · 122 lines

How it starts

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

You are orchestrating an end-to-end verification of ks-cookbook. Your job is to (1) run the verifier, (2) delegate triage of the report to the cookbook-junior-dev agent, and (3) surface a short, actionable summary to the user.

Step 1 — Preflight

Run these checks in parallel:

make check-env
test -f scripts/e2e_verify.py && test -f scripts/e2e_recipe_inputs.json

If check-env fails (missing KS_API_KEY or LLM key), stop and tell the user which key to set. If either script is missing, stop and tell the user to git pull.

Step 2 — Run the verifier

Invoke the e2e runner. Forward any arguments the user passed to this command; otherwise run the full suite.

uv run python scripts/e2e_verify.py $ARGUMENTS 2>&1 | tee /tmp/ks-cookbook-e2e.log

The script:

  • Runs every flagship via make demo-<slug> and every recipe with default args from scripts/e2e_recipe_inputs.json.
  • Parses [chunk:<uuid>] markers from each output.
  • Opens a KS MCP session and calls read(path_part_id=<chunk>) on every claimed chunk_id; flags fabricated / mismatched ones.
  • Writes e2e-report.json at repo root.

Per-case verdicts you'll see: PASS | EMPTY_OUTPUT | MISSING_CITATIONS | FABRICATED_CHUNKS | SNIPPET_MISMATCH | SCHEMA_ERROR | TIMEOUT | NEEDS_INPUTS | SKIPPED

Note the run takes real wall time — the full 141-case suite with citation verification is ~30–90 minutes depending on tenant latency and model choice. If the user didn't pass --limit and the run will be long, tell them before you start.

Step 3 — Delegate triage

Spawn the cookbook-junior-dev agent with this exact prompt:

You are triaging an e2e verification run of ks-cookbook. The full verdict report is at e2e-report.json (an array of result objects — each has kind, name, verdict, seconds, stdout_tail, stderr_tail, artifact, citations_found, chunks_resolved, chunks_fabricated, snippet_mismatches).

Your job:

  1. Read e2e-report.json. Summarize the pass/fail counts by verdict.
  2. For every non-SKIPPED, non-PASS, non-NEEDS_INPUTS case, diagnose:
    • SCHEMA_ERROR → grep the recipe/flagship source for the field that failed validation; was it a required field with min_length=1 that the LLM returned empty? Is *_FOLDER_ID pointing at an empty folder?
    • EMPTY_OUTPUT → retrieval returned zero citations. Almost always means the configured corpus folder has no matching documents for the recipe's domain. Tell the user which *_FOLDER_ID env var governs this case (grep the recipe for os.environ.get).
    • FABRICATED_CHUNKS → the LLM invented chunk UUIDs. This is a prompt-hardening bug. Name the recipe/flagship and quote the offending chunk_ids.
    • SNIPPET_MISMATCH → chunk exists but the paraphrased snippet isn't a substring of its body. Usually a prompt issue where the LLM is paraphrasing rather than copying. Less severe than FABRICATED.
    • TIMEOUT → note the recipe/flagship and suggest bumping --timeout or picking a smaller model.
  3. Produce a docs/e2e-report.md artifact with:
    • Pass/fail totals.
    • The triage findings grouped by category.
    • A prioritized fix list (FABRICATED_CHUNKS > SCHEMA_ERROR > others).
    • For each NEEDS_INPUTS recipe, the exact one-line JSON to add to scripts/e2e_recipe_inputs.json (look at the recipe's argparse required args and propose a sane default).
  4. Do NOT attempt any fixes yourself. Your output is a report. The user will decide what to fix.

End your reply with: the path of the report you wrote and a one-line TL;DR like "3 FABRICATED_CHUNKS, 2 SCHEMA_ERROR, rest PASS — see docs/e2e-report.md".

Read the full file on GitHub · 122 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. 3d ago First seen · 122 lines · 62 tokens per session scan A 5764142e1d93

Subscribe to this mod's changes

verify-e2e is a command published in the GitHub repository knowledgestack/ks-cookbook (9 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 1,369 once invoked, about $0.0003 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-31.