Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

PyMC Bayesian Modeling

An end-to-end PyMC skill covering hierarchical model building, NUTS sampling, convergence diagnostics, and LOO/WAIC model comparison.

Data & AnalyticsAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

Makes Claude run Bayesian analyses in PyMC following a disciplined, standard workflow.

  • Eight-step workflow: data prep → model building → prior predictive check → sampling → diagnostics (R-hat, ESS, divergences) → posterior predictive check → analysis → prediction. It explicitly discourages "sample first, check later".
  • Distribution selection guide: recommended priors for scale, positive, probability, and correlation-matrix parameters (LKJ), plus likelihoods for continuous, count (Poisson, NegativeBinomial, ZeroInflated, Hurdle), binary, and categorical outcomes.
  • Troubleshooting playbook: concrete fixes for divergences, low ESS, high R-hat, and slow sampling (non-centered parameterization, ADVI initialization, QR decomposition).
  • Bundled assets: model_diagnostics.py for automated trace/rank/energy report generation, model_comparison.py for PSIS-LOO comparison and model averaging, plus linear-regression and hierarchical model templates.

Who it's for

  • Data scientists and researchers who need calibrated uncertainty, not point estimates
  • Anyone modeling multilevel data (students within schools, sales within regions)
  • PyMC/Stan users who want a repeatable diagnostics and model-comparison routine

Assumes working knowledge of Bayesian statistics to interpret results correctly.

Example uses

  1. Hierarchical regression: "Fit a hierarchical model for regional sales" → builds a non-centered model, runs a prior predictive check, samples 4 chains, and verifies zero divergences.
  2. Model comparison: "Is Poisson or NegativeBinomial better here?" → runs compare_models() for ELPD ranking plus Pareto-k reliability checks.
  3. Diagnostic debugging: "R-hat is 1.05, what now?" → walks through multimodality checks, longer tuning, and ADVI initialization.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/pymc folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pymc/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sci-skills && mkdir -p ~/.claude/skills && cp -r /tmp/sci-skills/skills/pymc ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r scientific-agent-skills/skills/pymc ~/.claude/skills/
  5. Set up Python. The doc suggests uv pip install "pymc[nutpie]==6.0.1", but verify the current release first — pip install "pymc[nutpie]" arviz is the safer route.
  6. Restart Claude Code and try a prompt like "build a hierarchical model in PyMC" to confirm the skill triggers.
  7. Copy the templates from assets/ into your project and run them as a smoke test.