/pymc-core:pytensor-workflowsfrom pymc-core
Build, differentiate, compile, and debug PyTensor symbolic computations for models. Handles shape/dtype errors, indexing, broadcasting, vectorization, scan, RNG state, graph profiling, and custom Ops.
Ships in pymc-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Express the intended calculation, then verify its values, shapes, derivatives, and state transitions.
Read only the references needed for the calculation. This skill is independently installable; no other skill, host adapter, or service is required. If the graph belongs to a probabilistic model, numerical correctness does not replace its formulation, prior checks, inference diagnostics, or predictive criticism.
This float64 vector example compiles a squared norm and its gradient, checks both against independent references, and exercises the rank contract.
import numpy as np
import pytensor
import pytensor.tensor as pt
from pytensor.gradient import grad
x = pt.vector("x", dtype="float64")
energy = pt.sqr(x).sum()
evaluate = pytensor.function([x], [energy, grad(energy, x)])
values = np.array([1.0, -2.0, 3.0], dtype="float64")
value, derivative = evaluate(values)
np.testing.assert_allclose(value, np.square(values).sum(), rtol=1e-12)
np.testing.assert_allclose(derivative, 2 * values, rtol=1e-12)
print("Squared norm:", float(value)) # 14.0
print("Gradient:", derivative) # [ 2. -4. 6.]
try:
evaluate(values.reshape(1, -1))
except TypeError as error:
print("Rank-two input rejected:", error)
else:
raise AssertionError("A vector input accepted a rank-two array")
Prefer built-in operations for ordinary models. The reusable
BinomialLogpOp illustrates a pointwise likelihood
with explicit shape, support, and derivative contracts; it requires PyTensor,
NumPy, and SciPy. Keep the modules in this skill's scripts/ directory together
on the Python import path when using an example.
Import only the lowering needed before compiling for that backend:
These dependencies are optional and needed only for the corresponding examples. Importing the base Op does not register optional lowerings. Check values, derivatives, state, and unsupported inputs on the actual backend before using an extension in a model; a working forward calculation does not establish support for every shape-only, derivative, or accelerator graph.
LICENSE (opens in a new tab)references/compilation.md (opens in a new tab)references/custom-backends.md (opens in a new tab)references/custom-ops.md (opens in a new tab)references/numerics.md (opens in a new tab)references/random.md (opens in a new tab)references/shapes.md (opens in a new tab)scripts/binomial_logp_jax.py (opens in a new tab)scripts/binomial_logp_mlx.py (opens in a new tab)scripts/binomial_logp_numba.py (opens in a new tab)scripts/binomial_logp_op.py (opens in a new tab)scripts/binomial_logp_pytorch.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pymc-labs/pymc-modeling --plugin pymc-core7 skills in this plugin
/arviz-diagnosticsDiagnose existing Bayesian inference output and evaluate fitted predictions with modern ArviZ DataTree summaries, divergences, rank R-hat, ESS and Monte Carlo precision. Use for posterior predictive checks, calibration, LOO/ELPD, Pareto k, stacking, grouped or temporal validation, survival diagnostics and Bayes-factor interpretation./bambi-modelingBuild, inspect, and interpret formula-based Bayesian GLMs, hierarchical models, and distributional regressions with Bambi (bmb.Model). Use for Wilkinson/formulae syntax, group-specific effects, bmb.Prior, custom families, bmb.predict, bmb.interpret (predictions, comparisons, slopes), and deciding when to graduate from Bambi to raw PyMC./nutpie-samplingCompile and sample PyMC models with nutpie (Rust NUTS sampler with Numba or JAX logp backends). Use when speeding up MCMC, configuring low-rank or gradient-based mass-matrix adaptation, diagnosing nutpie compilation or sampling failures, or inspecting nutpie-specific sample_stats in ArviZ DataTrees./prior-elicitationElicit and check Bayesian prior assumptions in meaningful units. Use for expert quantiles, PreliZ, constrained priors, prior-predictive plausibility and prior sensitivity, including power scaling, regularized horseshoe and R2D2 assumptions./pymc-extrasUse pymc-extras extensions for PyMC 6+ models: exact discrete/conjugate and Laplace marginalization, Pathfinder/Laplace/DADVI/INLA approximate inference, Bayesian state-space and ETS models, specialized distributions (DiscreteMarkovChain, JointCategorical, extreme values, histogram approximation), Prior/Censored/Scaled factories, ModelBuilder, VIP reparameterization, and prior_from_idata posterior transfer./pymc-modelingBuild, revise, and debug Bayesian models with PyMC. Use when choosing likelihoods and priors, specifying model/data dimensions, fitting hierarchical models, GPs, time series, mixtures, BART or splines, selecting inference methods, resolving failed initial evaluation or model/data shape errors, generating predictions, or testing model code with simulated data and simulation-based calibration (SBC). Covers PyMC 6+, PyTensor 3+ and ArviZ 1.0 DataTree workflows. For pymc-extras extensions, use pymc-extras.3 plugins in 2 repositories ship this exact skill · first indexed Sep 13, 2026
Other plugins' skills for the same job