generate-calculations

generate-calculations is a skill for Claude Code, Codex from PlanExeOrg/PlanExe. It costs 39 tokens per session (1,277 once invoked), scanned A, original, MIT.

A skill that turns validated planning parameters and their formula hints into a Python module. The module contains small, importable functions for deterministic calculations, meaning the same inputs produce the same outputs.

In plain words
What is it for?
Generating Python functions for the recommended calculations and derived questions listed in a validated parameter JSON.
Why use it?
It converts documented formulas into runnable code for later scenario analysis or Monte Carlo simulation. It keeps calculation generation separate from parameter extraction, validation, and range estimation.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/planexeorg/planexe/generate-calculations.svg)](https://agentmods.dev/skills/planexeorg/planexe/generate-calculations)
Your own site
<a href="https://agentmods.dev/skills/planexeorg/planexe/generate-calculations"><img src="https://agentmods.dev/badge/skills/planexeorg/planexe/generate-calculations.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,277 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.00039 $0.01277
Opus 5 $0.00019 $0.00639
Sonnet 5 $0.00008 $0.00255
Haiku 4.5 $0.00004 $0.00128

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

Security

Grade A, and why

generate-calculations 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/generate-calculations/SKILL.md · 105 lines

How it starts

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

Generate Deterministic Calculations from Extracted Parameters

Overview

Wraps the calculation-generator system prompt at system-prompt.txt (next to this file) and applies it to a parameter JSON produced by extract-parameters-from-full (validated by validate-parameters). Output is a single Python module of small, pure functions — one per formula_hint declared in recommended_first_calculations and derived_questions.

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

When to Use

  • User asks to "generate calculations", "emit Python", "materialise the formulas", or "build the deterministic functions" given a validated parameter JSON
  • Pipeline step between validate-parameters (passes clean) / generate-bounds and run-scenarios
  • User wants importable Python functions ready for scenario tables

Not for: regenerating the parameter JSON (use extract-parameters-from-full), validating it (use validate-parameters), producing low/base/high ranges (use generate-bounds), or running scenarios (use run-scenarios).

Workflow

  1. Get the input JSON path. If the user did not provide one, ask. Do not guess.
  2. Read system-prompt.txt (sibling of this SKILL.md). Its function-shape, division-guard, and module-structure rules are authoritative.
  3. Read the parameter JSON. Assume it has already passed validate-parameters; if it visibly hasn't, tell the user and offer to validate first.
  4. Produce the Python module per the system prompt.
  5. Output destination. Default: write to a file. Suggested default path: <input-basename>.calculations.py next to the input. Print the file path back, plus a one-line summary (function count, any # skipped lines, any TODO stubs for P(...) notation).

What gets a function

Input list Action
recommended_first_calculations one function each
derived_questions one function each
key_values not converted — these are caller-supplied inputs
missing_values_to_estimate not converted — supplied via bounds at scenario time

Read the full file on GitHub · 105 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. 5d ago First seen · 105 lines · 39 tokens per session scan A 4a8a403504da

Subscribe to this mod's changes

generate-calculations is a skill published in the GitHub repository PlanExeOrg/PlanExe (398 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 1,277 once invoked, about $0.0002 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.