# 428 Report 0d6c3de0

> PyMC Skill Benchmark Report

- Skill: `tools-only/428-report-0d6c3de0` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/428-report-0d6c3de0`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/428-report-0d6c3de0/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/tools-only/428-report-0d6c3de0

---

# PyMC Skill Benchmark Report

**Date**: 2026-02-07
**Benchmark version**: post-corruption-fix (rglob model.py bug removed, orphan killer added)

## Executive Summary

The pymc-modeling skill improves Claude's Bayesian modeling output with a **medium overall effect size (d=0.55)**, raising mean scores from 13.6/20 (no skill) to 16.1/20 (with skill). The benefit is consistent across all five tasks, with the largest gains on harder problems (T5 horseshoe, T4 Gaussian process) and on best-practices scoring.

## Method

- **Model**: Claude Sonnet via `claude --print`
- **Conditions**: `no_skill` (baseline) vs `with_skill` (SKILL.md injected via `--append-system-prompt`)
- **Tasks**: 5 tasks of increasing difficulty, each run 3 times per condition (30 total runs)
- **Scoring**: 4 criteria, each 0-5 points (20 max): model produced, convergence, appropriateness, best practices
- **Environment**: PyMC 5.27.1, ArviZ 0.23.4, nutpie 0.16.5, Python 3.13

## Results

### Scores by Task and Condition

| Task | Condition | Produced | Convergence | Appropriateness | Best Practices | **Total** |
|------|-----------|----------|-------------|-----------------|----------------|-----------|
| T1 Hierarchical | no_skill | 4.3 | 4.7 | 5.0 | 1.7 | **15.7** |
| T1 Hierarchical | with_skill | 4.3 | 4.7 | 5.0 | 3.3 | **17.3** |
| T2 Ordinal | no_skill | 5.0 | 5.0 | 4.3 | 2.3 | **16.7** |
| T2 Ordinal | with_skill | 4.3 | 5.0 | 5.0 | 3.7 | **18.0** |
| T3 Model Comparison | no_skill | 5.0 | 5.0 | 5.0 | 3.7 | **18.7** |
| T3 Model Comparison | with_skill | 5.0 | 5.0 | 5.0 | 4.3 | **19.3** |
| T4 Gaussian Process | no_skill | 1.0 | 0.0 | 3.3 | 1.3 | **5.7** |
| T4 Gaussian Process | with_skill | 2.3 | 0.3 | 4.7 | 2.7 | **10.0** |
| T5 Horseshoe | no_skill | 3.3 | 1.3 | 4.0 | 2.7 | **11.3** |
| T5 Horseshoe | with_skill | 4.7 | 2.3 | 5.0 | 3.7 | **15.7** |

N=3 replications per cell. Scores are means across replications.

### Effect Sizes (Cohen's d on total score)

| Task | no_skill | with_skill | d | Interpretation |
|------|----------|------------|---|----------------|
| T1 Hierarchical | 15.7 | 17.3 | **1.83** | Large |
| T2 Ordinal | 16.7 | 18.0 | **1.03** | Large |
| T3 Model Comparison | 18.7 | 19.3 | **0.73** | Medium |
| T4 Gaussian Process | 5.7 | 10.0 | **1.27** | Large |
| T5 Horseshoe | 11.3 | 15.7 | **1.97** | Large |
| **Overall** | **13.6** | **16.1** | **0.55** | **Medium** |

Positive d = skill helps. Thresholds: |d| < 0.2 negligible, 0.2-0.5 small, 0.5-0.8 medium, > 0.8 large.

### Where the Skill Helps Most

**Best practices** is the most consistently improved criterion across all tasks:

| Task | no_skill BP | with_skill BP | d |
|------|-------------|---------------|---|
| T1 Hierarchical | 1.7 | 3.3 | 2.89 |
| T2 Ordinal | 2.3 | 3.7 | 2.31 |
| T3 Model Comparison | 3.7 | 4.3 | 0.73 |
| T4 Gaussian Process | 1.3 | 2.7 | 1.46 |
| T5 Horseshoe | 2.7 | 3.7 | 1.09 |

The skill teaches patterns like non-centered parameterizations, proper diagnostics workflows, nutpie usage, and ArviZ idioms that Claude doesn't know on its own.

On harder tasks (T4, T5), the skill also improves model production and appropriateness scores, suggesting it helps Claude avoid fundamental modeling mistakes when the problem is unfamiliar.

## Task-Level Analysis

### T1 Hierarchical (d=1.83, large)

Both conditions produce working models with good convergence. The skill's benefit is concentrated entirely in best practices (+1.6 points): non-centered parameterization, coords/dims usage, and diagnostic workflow.

### T2 Ordinal (d=1.03, large)

Both conditions achieve convergence. The skill improves appropriateness (+0.7) and best practices (+1.4). The skill likely helps with correct ordered transform specification and ordinal regression patterns.

### T3 Model Comparison (d=0.73, medium)

The easiest task for both conditions (18.7 vs 19.3). Claude already knows model comparison well. The skill adds a modest best practices gain (+0.6), likely from LOO-CV patterns and `az.compare()` API guidance.

### T4 Gaussian Process (d=1.27, large)

The hardest task. All 6 runs timed out at 15 minutes (900s), so no sampling completed. The skill still helped: with_skill runs wrote better model code (appropriateness 4.7 vs 3.3) even though neither condition finished. T4 with_skill rep1 was an outlier (15/20) where the model actually produced results. The HSGP approximation guidance in the skill is likely responsible.

### T5 Horseshoe (d=1.97, largest effect)

The strongest skill benefit. The skill improves every criterion: produced (+1.4), convergence (+1.0), appropriateness (+1.0), best practices (+1.0). The regularized horseshoe prior is a specialized technique that Claude struggles with without guidance. One no_skill rep2 timed out; all with_skill runs completed.

## Run Completion

| Task | no_skill completed | with_skill completed |
|------|-------------------|---------------------|
| T1 Hierarchical | 3/3 | 3/3 |
| T2 Ordinal | 3/3 | 3/3 |
| T3 Model Comparison | 3/3 | 3/3 |
| T4 Gaussian Process | 0/3 (timeout) | 0/3 (timeout) |
| T5 Horseshoe | 2/3 (1 timeout) | 3/3 |

24 of 30 runs completed successfully. All 6 T4 timeouts are due to GP computation cost, not code errors.

## Comparison with Previous (Corrupted) Run

The 2026-02-05 benchmark run had a critical bug: `work_dir.rglob("model.py")` found `pymc/dims/model.py` (a PyMC library file) inside package installations and overwrote 20 of 30 correctly-generated model files. The scorer then evaluated PyMC library code instead of Claude's output, producing unreliable scores.

| Metric | Corrupted run (Feb 5) | Clean run (Feb 7) |
|--------|----------------------|-------------------|
| Overall no_skill mean | 9.4/20 | 13.6/20 |
| Overall with_skill mean | 12.3/20 | 16.1/20 |
| Overall Cohen's d | 0.62 | 0.55 |
| Runs completed | 12/72 (17%) | 24/30 (80%) |

The corruption inflated the apparent skill benefit (d=0.62 vs 0.55) because corrupted model files scored poorly on appropriateness, and the corruption was random across conditions. The clean results show a real but slightly more modest effect.

## Bugs Fixed for This Run

1. **model.py corruption** (critical): Removed `rglob("model.py")` loop that overwrote generated models with PyMC library code. Added corruption detection that rejects files with copyright headers.

2. **Orphan process leak** (critical): Added `_kill_orphans()` that scans `/proc` for processes referencing the working directory after each run. Loops until zero matches. Caught 11 orphans on T4 rep2 timeout across 2 sweeps.

3. **results.nc subdirectory search**: Guarded `rglob("results.nc")` to only search subdirectories when root-level file is missing. Breaks after first match.

## Limitations

- N=3 replications per cell is small; effect sizes have wide confidence intervals
- T4 (Gaussian process) is effectively untestable at the 15-minute timeout
- Scoring uses automated rubrics, not expert human evaluation
- The skill injects ~4,500 tokens of system prompt, which may affect behavior beyond just the PyMC knowledge content

## Conclusion

The pymc-modeling skill provides a consistent, meaningful improvement to Claude's Bayesian modeling output. The benefit is largest on harder, more specialized tasks (horseshoe priors, Gaussian processes) where domain-specific knowledge matters most. On easier tasks, Claude's baseline is already strong and the skill primarily improves adherence to best practices. The skill is worth using for any non-trivial PyMC modeling task.

