montecarlo

montecarlo is a skill for Claude Code, Codex from lemur47/logic. It costs 0 tokens per session (2,375 once invoked), scanned A, original, MIT.

A Monte Carlo schedule simulation that estimates the likelihood of finishing a project by different dates. It uses task estimates and dependencies to produce a range of possible outcomes instead of one expected duration.

In plain words
What is it for?
Use it when setting sprint or project commitments, comparing realistic confidence levels, checking the chance of meeting a target date, and finding schedule-risk drivers.
Why use it?
A single deadline estimate hides uncertainty. Probability results show how likely a commitment is and which tasks most often drive schedule risk.

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/lemur47/logic/montecarlo
Any agent
npx skills add lemur47/logic --skill montecarlo
Clone the repo
git clone --depth 1 https://github.com/lemur47/logic

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 montecarlo

README.md
[![agentmods](https://agentmods.dev/badge/skills/lemur47/logic/montecarlo.svg)](https://agentmods.dev/skills/lemur47/logic/montecarlo)
Your own site
<a href="https://agentmods.dev/skills/lemur47/logic/montecarlo"><img src="https://agentmods.dev/badge/skills/lemur47/logic/montecarlo.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,375 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.1 $0.00000 $0.02375
Opus 5 $0.00000 $0.01188
Sonnet 5 $0.00000 $0.00475
Haiku 4.5 $0.00000 $0.00237

Measured 5d ago against content hash 44136c73e2da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

montecarlo 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.

skills/montecarlo/SKILL.md · 256 lines

How it starts

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

Monte Carlo: Schedule Simulation with Probability Distributions

Source: github.com/lemur47/logic

Purpose

Help users answer one question: "What's the probability we finish by this date?" using Monte Carlo schedule simulation. This skill replaces single-point PERT estimates with full probability distributions over project duration.

Monte Carlo builds on PERT. PERT asks "how long will it take?" and gives a single expected value. Monte Carlo takes the same three-point estimates, runs thousands of simulated schedules, and returns percentiles, critical path frequencies, and target-date probabilities. The expected value becomes a distribution.

When to Use

  • Sprint or project commitment decisions ("should we commit to 40 days?")
  • Comparing PERT expected value against realistic percentile-based commitments
  • Identifying which tasks drive schedule risk via critical path frequency
  • Target-date probability queries ("what's the chance we ship by April 15?")
  • Any situation where a stakeholder needs a confidence level, not a point estimate

When NOT to Use

  • Single-task estimation with no dependencies — use the PERT Skill directly
  • You need reality adjustments via insight tags — use PERT first, then feed the adjusted estimates into Monte Carlo
  • You need Dirichlet drift or time-evolving simulation — out of scope (Sprint 7)

Core Concepts

Beta-PERT Distribution

Each task's duration is sampled from a beta-PERT distribution, parameterised by the same three-point estimates used by textbook PERT:

  • O — Optimistic (best case)
  • M — Most likely (realistic)
  • P — Pessimistic (worst case)

The beta-PERT distribution is a beta distribution rescaled to [O, P] with the mode at M. Unlike PERT's Gaussian approximation, it preserves the skew in asymmetric estimates.

Simulation Process

For each of N simulations (default 10,000):

  1. Sample a random duration for every task from its beta-PERT distribution
  2. Compute task start and finish times respecting dependency constraints (forward pass)
  3. Record the total project duration (max finish time)
  4. Identify which tasks are on the critical path (zero total float)

Read the full file on GitHub · 256 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 · 256 lines · 0 tokens per session scan A 44136c73e2da

Subscribe to this mod's changes

montecarlo is a skill published in the GitHub repository lemur47/logic (2 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,375 tokens. 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.

Related

Other skills, from other repositories

ib-portfolio-action-report

Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 49 tokens

ib-trades-history

Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 59 tokens

report-stock

Generate comprehensive stock analysis report (PDF or markdown) with trend, PMCC, and fundamental analysis.

staskh/trading_skills · 22 tokens

ib-report-delta-adjusted-notional-exposure

Report delta-adjusted notional exposure across all IBKR accounts. Calculates option deltas using Black-Scholes and reports long/short exposure by account and underlying. Use when user asks about delta exposure, portfolio risk, or directional exposure.

staskh/trading_skills · 58 tokens

ib-portfolio

Get portfolio positions from Interactive Brokers. Use when user asks about their portfolio, positions, holdings, or what stocks they own. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 38 tokens

markdown-to-pdf

Convert a markdown file to PDF using mistune + reportlab. Use when the user wants to convert a .md file to PDF, or when another skill needs to produce a PDF from markdown output.

staskh/trading_skills · 45 tokens