Skip to content
Back to skills

Mcmc Diagnostics

ASecurity

"Run and troubleshoot NumPyro MCMC workflows with diagnostics,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
documentationpythonbashbackend

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill mcmc-diagnostics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mcmc Diagnostics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mcmc Diagnostics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-mcmc-diagnostics/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-mcmc-diagnostics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mcmc-diagnostics
description: "Run and troubleshoot NumPyro MCMC workflows with diagnostics,
  predictive sampling, reparameterization, and JAX chain configuration."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# mcmc-diagnostics

Use this sub-skill when the task is to run, configure, inspect, or repair a NumPyro MCMC workflow: NUTS/HMC, alternative kernels, multiple chains, diagnostics, posterior predictive sampling, pointwise log likelihood, bad-geometry fixes, or JAX backend selection.

## Quick workflow

1. Choose a kernel and MCMC layout from [references/mcmc-workflows.md](references/mcmc-workflows.md).
2. Configure the backend and chains before the first JAX computation using [references/backend-and-chain-configuration.md](references/backend-and-chain-configuration.md).
3. Run `MCMC.run(...)` with useful `extra_fields`, then inspect `get_samples(...)`, `get_extra_fields(...)`, and `print_summary(...)`.
4. Diagnose `diverging`, `potential_energy`, low `n_eff`, high `r_hat`, and weak ESS using [references/diagnostics-and-reparameterization.md](references/diagnostics-and-reparameterization.md).
5. Generate posterior predictive samples or log likelihood arrays with [references/predictive-loglikelihood.md](references/predictive-loglikelihood.md).
6. If execution or diagnostics fail, use [references/troubleshooting.md](references/troubleshooting.md).

## Bundled smoke script

Run the CPU-safe 8-schools smoke test when you need a deterministic sanity check of NUTS, diagnostics fields, and optional posterior predictive sampling:

```bash
python scripts/eight_schools_smoke.py --help
python scripts/eight_schools_smoke.py --num-warmup 20 --num-samples 30 --predict-new-school
```

The script uses tiny defaults for fast validation only; do not treat its diagnostics as convergence evidence for a real analysis.

## Routing and boundaries

- Model primitives, plates, handlers, and observation-site basics belong in [../modeling-primitives/](../modeling-primitives/).
- Distribution shape/support details and transform catalogs belong in [../distributions-transforms/](../distributions-transforms/).
- SVI, autoguides, and the prefit phase needed before `NeuTraReparam` belong in [../svi-autoguides/](../svi-autoguides/); return here for NeuTra-backed MCMC after a guide is trained.
- Optional nested sampling, SteinVI, and other contrib inference routes belong in [../advanced-contrib/](../advanced-contrib/).

## Prefer this sub-skill for

- Selecting between `NUTS`, `HMC`, `BarkerMH`, `MixedHMC`, `HMCGibbs`, `DiscreteHMCGibbs`, `HMCECS`, `SA`, `AIES`, and `ESS`.
- Using `MCMC.run`, `warmup`, `post_warmup_state`, `get_samples`, `get_extra_fields`, and `print_summary`.
- Collecting `potential_energy`, `diverging`, `num_steps`, `accept_prob`, or `adapt_state.step_size`.
- Applying `TransformReparam`, `LocScaleReparam`, or `NeuTraReparam` to reduce bad posterior geometry.
- Explaining `num_chains`, `chain_method`, CPU host devices, GPU/TPU backend selection, and x64 precision.

Files in this skill

  • SKILL.md3 KB
  • references/backend-and-chain-configuration.md4.8 KB
  • references/diagnostics-and-reparameterization.md5.2 KB
  • references/mcmc-workflows.md8.2 KB
  • references/predictive-loglikelihood.md3.8 KB
  • references/troubleshooting.md3.9 KB
  • scripts/eight_schools_smoke.py4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.