Agent skill
python-environment
Python environment setup with uv, shared utilities, and script structure guidelines.
Install this agent skill to your Project
npx add-skill https://github.com/sunxd3/bayesian-statistician-plugin/tree/main/skills/python-environment
SKILL.md
Python Environment
Always use uv run. Never search for Python or use venv directly.
uv run uses the venv from the nearest pyproject.toml up the directory tree. Run scripts from the project root:
cd /path/to/project # directory with pyproject.toml
uv run python experiments/experiment_X/fit/run_fit.py
Shared Utilities
shared-utils is a project dependency. Import directly:
from shared_utils import compile_model, fit_model, check_convergence, ...
Read the package source in this skill's shared_utils/src/shared_utils/ directory for API details.
Script Structure
Write small, focused scripts - not monolithic files. Separate concerns:
experiment_X/
fit/
run_fit.py # Main entry point
diagnostics.py # Convergence checks
plots.py # Visualization
Each script should:
- Do one thing well
- Be runnable independently via
uv run python script.py - Import shared logic from
shared_utils
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
artifact-guidelines
Guidelines for writing reports, organizing files, and generating code artifacts
stan-coding
Best practices for writing efficient, clean Stan programs
bayesian-workflow
Use when performing Bayesian statistical analysis, building probabilistic models, or when the task involves prior specification, posterior inference, or predictive checks.
visual-predictive-checks
Guidelines for visual predictive checks following Säilynoja et al. recommendations using ArviZ
convergence-diagnostics
MCMC convergence diagnostics using CmdStanPy and ArviZ
stan-ode-modeler
Guidelines for Stan models with ODE-based dynamics using modern interfaces
Didn't find tool you were looking for?