Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback). Use before tasks that need the project environment, such as importing project code, running tests, building docs, or invoking repo tooling.
84%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Set up and run commands inside the CausalPy dev environment. uv is the default; a conda-compatible tool is the fallback when uv is not available.
Use the project environment when the command:
import causalpy or project modules)make, prek, or notebook executionFor simple inspection helpers that only read local text/JSON or use the Python standard library, any Python on PATH is acceptable.
Do the least work that will get the task done:
.venv (created by uv sync) if the checkout already has one.uv sync again when dependencies changed, the editable install is stale, or the current checkout has not been synced yet.uv sync --locked --extra dev --extra docs --extra test --extra lint
uv run prek install -f--locked fails fast if uv.lock has drifted from pyproject.toml instead of silently re-resolving.
There is no environment to activate — prefix every command with uv run:
uv run pytest
uv run make test
uv run prek run --all-filesRe-run uv sync --locked ... with the same extras after pulling changes that touch pyproject.toml or uv.lock.
uv does not require a fresh .venv per agent session, but because this repo uses editable installs, one shared .venv points at whichever checkout most recently ran uv sync.
.venv..venv per worktree is the safest option (uv sync inside each), but do not create one unless needed.uv sync once. On a persistent remote machine with an existing .venv, reuse it.Use this path only when uv is not available, or when the task specifically requires the conda/micromamba alternative (e.g. validating environment.yml).
Use whichever of mamba, micromamba, or conda is available (checked in that order):
# Check for mamba, micromamba, or conda (in preference order) on $PATH
CONDA_EXE=$(for c in mamba micromamba conda; do command -v "$c" &>/dev/null && echo "$c" && break; done)If CONDA_EXE is empty, no conda-compatible tool was found. Propose installing micromamba to the user:
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)After installation, set CONDA_EXE=micromamba.
If no suitable existing env can be reused, create it:
$CONDA_EXE env create -f environment.ymlRun make setup-conda after creating or updating the env, from inside an active/running conda env. Also rerun it when using a different git worktree if that env has not been installed against the current checkout yet.
$CONDA_EXE run -n CausalPy make setup-condaNever use $CONDA_EXE activate, instead use $CONDA_EXE run -n CausalPy <command>.
$CONDA_EXE run -n CausalPy <command>For example: $CONDA_EXE run -n CausalPy pytest, $CONDA_EXE run -n CausalPy prek run --all-files.
$CONDA_EXE env update --file environment.yml --pruneIf $CONDA_EXE run -n CausalPy ... fails with errors such as The given prefix does not exist:
$CONDA_EXE env list
$CONDA_EXE run -p "/full/path/to/CausalPy" <command>Keep using run -p with that full prefix for the rest of the session.
If you hit issues with an outdated tool, update it:
$CONDA_EXE self-updateconda update -n base condaAs of 2026-02-13, current versions are conda 26.1.0, mamba/micromamba 2.5.0.
pymc-labs/CausalPy
59450d3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.