monte-carlo

monte-carlo is a skill for Claude Code, Codex from PlanExeOrg/PlanExe. It costs 71 tokens per session (2,119 once invoked), scanned A, original, MIT.

A method for repeatedly sampling allowed input ranges in a PlanExe model to estimate how its results vary.

In plain words
What is it for?
Use it after deterministic scenarios to estimate outcomes such as the chance that avoided events reach a target and to rank inputs by their correlation with uncertainty.
Why use it?
It shows distributions, percentiles, threshold-pass probabilities, and which inputs are most associated with changing results. It complements fixed scenarios by exploring many possible combinations.

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/monte-carlo
Any agent
npx skills add PlanExeOrg/PlanExe --skill monte-carlo
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 monte-carlo

README.md
[![agentmods](https://agentmods.dev/badge/skills/planexeorg/planexe/monte-carlo.svg)](https://agentmods.dev/skills/planexeorg/planexe/monte-carlo)
Your own site
<a href="https://agentmods.dev/skills/planexeorg/planexe/monte-carlo"><img src="https://agentmods.dev/badge/skills/planexeorg/planexe/monte-carlo.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,119 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.00071 $0.02119
Opus 5 $0.00036 $0.01059
Sonnet 5 $0.00014 $0.00424
Haiku 4.5 $0.00007 $0.00212

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

Security

Grade A, and why

monte-carlo 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/monte-carlo/SKILL.md · 129 lines

How it starts

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

Monte Carlo Simulation

Overview

This stage is stochastic — it samples from bounds many times. Contrast with run-scenarios, which evaluates the model deterministically at three points only.

The simulation itself is performed by a Python script (experiments/napkin_math/run_monte_carlo.py), not by the LLM. The script imports calculations.py, draws samples with a seeded NumPy RNG, runs the loop, and writes montecarlo.json. The script is authoritative; this skill is a thin wrapper that locates inputs, builds an optional settings file, and invokes the runner.

Stage 7 of the pipeline described in planexe_simulator/README.md.

When to Use

  • User asks to "run Monte Carlo", "sample the bounds", "compute distributions", "estimate gate-pass probability", or "find which inputs drive uncertainty"
  • User wants percentile bands (p05/p50/p95) or threshold pass rates (e.g. P(avoided_events ≥ 10))
  • Final stage in the pipeline; only run after run-scenarios already shows a sane deterministic model

Not for: regenerating any prior artifact, replacing the deterministic scenario table (use run-scenarios), or claiming causality from sensitivity correlations.

Workflow

  1. Get the inputs. Three required, one optional:

    • parameters JSON (e.g. output/v12/parameters.json)
    • bounds JSON (e.g. output/v12/bounds.json)
    • calculations Python module (e.g. output/v12/calculations.py)
    • settings JSON (optional — n_runs, seed, distribution_default, outputs_of_interest, thresholds, gate_probabilities, correlation_groups)

    If any required input is missing, ask. If the user wants thresholds or non-default settings, write them to a small JSON file and pass --settings.

  2. Invoke the runner. Requires Python 3.11+ with NumPy:

    /opt/homebrew/bin/python3.11 experiments/napkin_math/run_monte_carlo.py \
      --parameters   <path>/parameters.json \
      --bounds       <path>/bounds.json \
      --calculations <path>/calculations.py \
      [--settings   <path>/settings.json] \
      [--output     <path>/montecarlo.json]
    

Read the full file on GitHub · 129 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 · 129 lines · 71 tokens per session scan A 7109181bc879

Subscribe to this mod's changes

monte-carlo is a skill published in the GitHub repository PlanExeOrg/PlanExe (398 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 2,119 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.

Related

Other skills, from other repositories