test-napkin-math

test-napkin-math is a skill for Claude Code, Codex from PlanExeOrg/PlanExe. It costs 81 tokens per session (1,230 once invoked), scanned A, original, MIT.

A smoke-test suite for the napkin-math experiment and its connected input-processing stages.

In plain words
What is it for?
Use it after modifying the Monte Carlo runner, preparation code, fixtures, compression code, or related napkin-math instructions.
Why use it?
It catches broken calculations, schema errors, import problems, and changes that make the pipeline behave inconsistently.

Skill for Claude CodeCodex

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 skills/planexeorg/planexe/test-napkin-math
Any agent
npx skills add PlanExeOrg/PlanExe --skill test-napkin-math
Clone the repo
git clone --depth 1 https://github.com/PlanExeOrg/PlanExe

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 test-napkin-math

README.md
[![agentmods](https://agentmods.dev/badge/skills/planexeorg/planexe/test-napkin-math.svg)](https://agentmods.dev/skills/planexeorg/planexe/test-napkin-math)
Your own site
<a href="https://agentmods.dev/skills/planexeorg/planexe/test-napkin-math"><img src="https://agentmods.dev/badge/skills/planexeorg/planexe/test-napkin-math.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,230 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.00081 $0.01230
Opus 5 $0.00041 $0.00615
Sonnet 5 $0.00016 $0.00246
Haiku 4.5 $0.00008 $0.00123

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

Security

Grade A, and why

test-napkin-math 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.

experiments/napkin_math/.claude/skills/test-napkin-math/SKILL.md · 76 lines

How it starts

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

Test the napkin_math experiment

Overview

A single-shot smoke check for the napkin_math experiment. The test logic lives in experiments/napkin_math/tests/run_smoke.py; this skill is a thin wrapper that invokes the script, parses its output, and reports a one-line summary.

Covers the Monte Carlo runner (end-to-end, determinism, Bernoulli arithmetic, sensitivity ranking), the strict-schema fail-fast paths (each required field individually), prepare_extract_input.py import sanity, and the compress_report_section pytest suite.

When to Use

  • After any edit to:
    • experiments/napkin_math/run_monte_carlo.py
    • experiments/napkin_math/prepare_extract_input.py
    • experiments/napkin_math/tests/fixtures/smoke/*
    • worker_plan/worker_plan_internal/parameter_extraction/compress_report_section.py
    • any system-prompt.txt / SKILL.md under experiments/napkin_math/.claude/skills/{extract-parameters-from-full,extract-parameters-from-digest,generate-bounds,generate-calculations,run-scenarios,monte-carlo}/ that touches the artifact schema
  • Before declaring any napkin_math change "done" — even if the change looks self-contained, the schema is tightly coupled across stages
  • When the user asks "did I break anything?" or "run the napkin_math tests"

Not for: end-to-end LLM-driven runs of the extract-parameters-from-full skills against real reports (those require an LLM in the loop and are out of scope here).

Workflow

  1. Invoke the runner. Requires Python 3.11+ with NumPy and pytest installed:

    /opt/homebrew/bin/python3.11 experiments/napkin_math/tests/run_smoke.py
    

    Override the interpreter with NAPKIN_TEST_PYTHON=<path> if the default isn't available.

  2. Read the script's stdout. It prints one section per check with individual ok / FAIL lines, then a final summary:

    SUMMARY: 7/7 checks passed
    ALL GREEN
    

    Exit code is 0 on full pass, 1 on any failure.

  3. Report back to the user. On success: one line ("All 7 napkin_math smoke checks passed."). On failure: list the failing checks with the detail printed by the runner, and point at the specific file or schema field implicated.

Read the full file on GitHub · 76 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 · 76 lines · 81 tokens per session scan A 754145feac98

Subscribe to this mod's changes

test-napkin-math is a skill published in the GitHub repository PlanExeOrg/PlanExe (398 stars, last pushed 5d ago), licensed MIT. It adds 81 tokens to every session and 1,230 once invoked, about $0.0004 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.