mcmc-sampling-stan
Guide for performing Markov Chain Monte Carlo (MCMC) sampling using RStan or PyStan. This skill should be used when implementing Bayesian statistical models, fitting hierarchical models, working with Stan modeling language, or running MCMC diagnostics. Applies to tasks involving posterior sampling, Bayesian inference, and probabilistic programming with Stan.
npx skills add majiayu000/claude-skill-registry --skill mcmc-sampling-stan --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# MCMC Sampling with Stan ## Overview This skill provides guidance for implementing Bayesian models and running MCMC sampling using Stan (via RStan or PyStan). It covers model specification, prior implementation, sampling configuration, and critical diagnostic checks that must be performed to validate results. ## Workflow ### Phase 1: Environment Setup Before writing any Stan code: 1. **Verify Stan installation and version** - Check that the required version of RStan/PyStan is installed - RStan requires a C++ toolchain; verify compilation works before proceeding - For RStan: Check with `packageVersion("rstan")` and test compilation with a simple model 2. **Check system dependencies first** - Stan requires compilation; missing system libraries cause cryptic errors - On Linux: Ensure `g++`, `make`, and development libraries are installed - On macOS: Xcode command line tools required - Verify the toolchain before attempting package installation 3. **Common installation pitfalls** - R's `install.packages()` does not accept a `version` parameter for CRAN packages - To install a specific version, use `remotes::install_version()` or install from source - RStan compilation can fail silentl
- Overview
- Workflow
- Phase 1: Environment Setup
- Phase 2: Data Exploration
- Phase 3: Model Implementation
- Phase 4: Sampling Configuration
- Phase 5: Diagnostic Checks (CRITICAL)
- Phase 6: Results Extraction
- Common Pitfalls
- Installation Issues
- Model Specification Errors
- Sampling Problems
- Diagnostic Omissions
- Output Errors
What does the mcmc-sampling-stan skill do?
Guide for performing Markov Chain Monte Carlo (MCMC) sampling using RStan or PyStan. This skill should be used when implementing Bayesian statistical models, fitting hierarchical models, working with Stan modeling language, or running MCMC diagnostics. Applies to tasks involving posterior sampling, Bayesian inference, and probabilistic programming with Stan.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill mcmc-sampling-stan --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
