simulation-study

simulation-study is a skill for Claude Code from pedrohcgs/claude-code-my-workflow. It costs 148 tokens per session (2,840 once invoked), scanned A, original, MIT.

A reproducible Monte Carlo simulation workflow in R. Monte Carlo simulation repeatedly generates data under stated assumptions to study how an estimator behaves, including bias, uncertainty, coverage, and statistical power.

In plain words
What is it for?
Use it to compare estimators, test finite-sample behavior, run seeded replications, and summarize simulation results with tables and figures.
Why use it?
It organizes the assumptions, data-generating process, repeated runs, and uncertainty in the simulation results so the evidence can be checked and reproduced.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to compare estimators, test finite-sample behavior, run seeded replications, and summarize simulation results with tables and figures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/simulation-study
About the project

claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.

pedrohcgs/claude-code-my-workflow · 1,566 stars · on GitHub · psantanna.com

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.

Any agent
npx skills add pedrohcgs/claude-code-my-workflow --skill simulation-study
Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow

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 simulation-study

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/simulation-study.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/simulation-study)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/simulation-study"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/simulation-study.svg" alt="Measured on agentmods" height="20"></a>
Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,840 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00148 $0.02840
Opus 5 $0.00074 $0.01420
Sonnet 5 $0.00030 $0.00568
Haiku 4.5 $0.00015 $0.00284

Measured 3d ago against content hash e8795258b334, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

simulation-study 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/skills/simulation-study/SKILL.md · 196 lines

How it starts

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

/simulation-study — Monte Carlo Simulation Study

Design and run a Monte Carlo experiment that characterizes an estimator's finite-sample behavior, then review it for the bugs that quietly invalidate simulation evidence.

Input: $ARGUMENTS — a description of the estimator(s) and DGP to study (e.g., "compare 2SLS vs LIML under weak instruments with heteroskedasticity"), or a pointer to an existing script/paper whose simulation you want to reproduce or extend.


Constraints

  • Follow .claude/rules/simulation-conventions.md — the simulation contract (DGP, truth, estimand, MCSE, assumption regime) is non-negotiable.
  • Declare the assumption regime in the script header and respect the firewall — an out-of-assumption run never supports a within-assumption claim (simulation-conventions.md §2).
  • Follow .claude/rules/r-code-conventions.md for general R standards (header, library() at top, relative paths, numerical discipline).
  • Save the script to scripts/R/ with a numbered, descriptive name (e.g., scripts/R/sim_2sls_vs_liml.R).
  • Save outputs (per-rep raw tibble, summary table, figures) to scripts/R/_outputs/.
  • saveRDS() the per-replication raw results, not just the summary — re-aggregation and the review pass need them.
  • Run the sim-reviewer agent on the generated script before presenting results, then address Critical/High findings.

Workflow Phases

Phase 0: Pre-Flight Report

Before writing any code, produce a Pre-Flight Report showing you have pinned down the experiment. This prevents the most common failure mode — a beautiful results table built on a mismatched estimand or a coverage-against-the-estimate bug.

## Pre-Flight Report — Simulation Design

**Research question:** [what finite-sample property is being demonstrated]
**Target estimand:** [ATT / ATE / coefficient θ — and how its TRUE value is computed from the DGP params]
**Maintained assumptions:** [the FULL list the estimator(s) under study require — A1 … An, every one]
**Regime:** [IN-ASSUMPTION — all hold | OUT-OF-ASSUMPTION — relaxes A[k] only, severity grid {…}, targeting pseudo-estimand …]
**Verification:** [per assumption, the checkable property of the DGP that establishes it — by construction or by an assertion]
**DGP:** [structure + the parameters that define it; what is held fixed vs. varied]
**Estimator grid:** [list each estimator + which estimand it targets + how it returns est/se/CI]
**Design grid:** [sample sizes, parameter values, scenarios to sweep]
**Replications R:** [value] → implied MCSE on coverage ≈ sqrt(0.95·0.05/R) = [value]
**Metrics:** bias, empirical SE, RMSE, coverage, size/power — each with MCSE
**Conventions read:** simulation-conventions.md, r-code-conventions.md

Read the full file on GitHub · 196 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 · 196 lines · 148 tokens per session scan A e8795258b334

Subscribe to this mod's changes

simulation-study is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,566 stars, last pushed 13d ago), licensed MIT. It adds 148 tokens to every session and 2,840 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories