Agent skill

Python Environment

by pymc-labs in pymc-labs/CausalPy

Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback).

Apache-2.0Auto-check passed

Install Python Environment

skills CLI
$ npx skills add pymc-labs/CausalPy --skill python-environment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pymc-labs/CausalPy python-environment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pymc-labs/CausalPy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/python-environment .claude/skills/python-environment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-environment
GitHub stars
1.2k
Token cost
~1.1k tokens
SKILL.md length
499 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback).

  • Works in 2 steps: Reuse an existing .venv (created by uv… → Only run uv sync again when dependencies…
  • SKILL.md covers Decide whether the env is…, Default: uv and Fallback: conda-compatible tool
  • Calls uv, make and conda

What it does

Python Environment is an agent skill from pymc-labs/CausalPy. 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.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Python. The repository describes itself as: A Python package for causal inference in quasi-experimental settings. The licence is Apache-2.0.

Example prompts

  • “/python-environment”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Reuse an existing .venv (created by uv sync) if the checkout already has one.
  2. Only run uv sync again when dependencies changed, the editable install is stale, or the current checkout has not been synced yet.

What it can do on your machine

Read from SKILL.md and the folder at commit f17b30f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • make
    • conda

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Environment loads about 1.1k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 499 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pymc-labs/CausalPy at commit f17b30f, republished under its Apache-2.0 licence (© pymc-labs). 499 words, ~1,104 tokens.

Download SKILL.mdSave it as .claude/skills/python-environment/SKILL.md (or your agent's skills folder).
name
python-environment
description
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.

Python Environment

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.

Decide whether the env is required

Use the project environment when the command:

  • imports project code (for example import causalpy or project modules)
  • runs tests
  • builds docs
  • invokes repo tooling such as make, prek, or notebook execution

For simple inspection helpers that only read local text/JSON or use the Python standard library, any Python on PATH is acceptable.

Default: uv

Reuse before creating

Do the least work that will get the task done:

  1. Reuse an existing .venv (created by uv sync) if the checkout already has one.
  2. Only run uv sync again when dependencies changed, the editable install is stale, or the current checkout has not been synced yet.
Set up the environment
bash
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.

Run commands

There is no environment to activate — prefix every command with uv run:

bash
uv run pytest
uv run make test
uv run prek run --all-files
Update the environment

Re-run uv sync --locked ... with the same extras after pulling changes that touch pyproject.toml or uv.lock.

Git worktrees and remote machines

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.

  • For ordinary local work on one checkout, reuse the existing .venv.
  • For long-lived parallel worktrees, one .venv per worktree is the safest option (uv sync inside each), but do not create one unless needed.
  • On a fresh remote machine or ephemeral container, run uv sync once. On a persistent remote machine with an existing .venv, reuse it.

Fallback: conda-compatible tool

Use this path only when uv is not available, or when the task specifically requires the conda/micromamba alternative (e.g. validating environment.yml).

Show full SKILL.md (196 more words)Show less
Detect the conda tool

Use whichever of mamba, micromamba, or conda is available (checked in that order):

bash
# 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:

bash
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)

After installation, set CONDA_EXE=micromamba.

Create the environment only if needed

If no suitable existing env can be reused, create it:

bash
$CONDA_EXE env create -f environment.yml
Install the package only when needed

Run 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.

bash
$CONDA_EXE run -n CausalPy make setup-conda
Run commands

Never use $CONDA_EXE activate, instead use $CONDA_EXE run -n CausalPy <command>.

bash
$CONDA_EXE run -n CausalPy <command>

For example: $CONDA_EXE run -n CausalPy pytest, $CONDA_EXE run -n CausalPy prek run --all-files.

Update an existing environment
bash
$CONDA_EXE env update --file environment.yml --prune
Troubleshooting
Named env cannot be resolved

If $CONDA_EXE run -n CausalPy ... fails with errors such as The given prefix does not exist:

bash
$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.

Updating an outdated conda tool

If you hit issues with an outdated tool, update it:

  • mamba / micromamba: $CONDA_EXE self-update
  • conda: conda update -n base conda

As of 2026-02-13, current versions are conda 26.1.0, mamba/micromamba 2.5.0.

© pymc-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/python-environment of pymc-labs/CausalPy.

Open the folder on GitHubat commit f17b30f

Compare with similar skills

Python Environment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Environment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Environment this skillpymc-labs/CausalPy1.2k—~1.1kAutomated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k48 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k13 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use28k6 repos~3kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 48 repos~2k tokens
    Documents & OfficeAuto-check passed
  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 13 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    28k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • PPT Master

    hugohe3/ppt-master

    Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.

    58k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-check passed

More from pymc-labs/CausalPy

All 12 skills in this repo
  • Example Datasets

    pymc-labs/CausalPy

    Load built-in CausalPy example datasets for demos, tutorials, tests, and quick causal-analysis prototypes.

    1.2k GitHub stars~587 tokensUpdated yesterday
    Auto-check passed
  • Review PR

    pymc-labs/CausalPy

    Review CausalPy pull requests end-to-end by classifying PR type, checking branch freshness, mergeability, remote CI, correctness, security, tests, docs, and maintainer concerns.

    1.2k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Causal Detective

    pymc-labs/CausalPy

    Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks.

    1.2k GitHub stars~809 tokensUpdated yesterday
    Auto-check passed
  • Running Placebo Analysis

    pymc-labs/CausalPy

    Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance.

    1.2k GitHub starsUsed in 1 repo~442 tokens
    Auto-check passed
  • Feature Exploration

    pymc-labs/CausalPy

    Explore unfamiliar APIs, libraries, or implementation behavior with minimal reproducible examples and documented findings.

    1.2k GitHub stars~442 tokensUpdated yesterday
    Auto-check passed
  • GitHub Issues

    pymc-labs/CausalPy

    Create, evaluate, and triage GitHub issues for CausalPy. An agent skill from pymc-labs/CausalPy.

    1.2k GitHub stars~254 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Python Environment

What does Python Environment do?

Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback). Python Environment is an agent skill from pymc-labs/CausalPy. Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback).

How do I install Python Environment in Claude Code?

Run `npx skills add pymc-labs/CausalPy --skill python-environment -a claude-code`. Or copy the skill folder (.agents/skills/python-environment in pymc-labs/CausalPy) into .claude/skills/python-environment in your project. Claude Code loads it when a task matches its description.

How do I install Python Environment in Codex?

Run `npx skills add pymc-labs/CausalPy --skill python-environment -a codex`. Or copy the skill folder (.agents/skills/python-environment in pymc-labs/CausalPy) into .agents/skills/python-environment in your project. Codex loads it when a task matches its description.

Can I use Python Environment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pymc-labs/CausalPy --skill python-environment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-environment, .gemini/skills/python-environment, .github/skills/python-environment and .opencode/skills/python-environment in your project.

What does Python Environment need to run?

Going by SKILL.md and its folder, Python Environment needs the command-line tools its instructions call (uv, make and conda). Our summary lists: Python 3.

Does Python Environment access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Python Environment safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Environment use?

Python Environment is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Environment use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Python Environment?

Skills that share tags, products or a category with Python Environment: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Environment?

pymc-labs (a GitHub organization) maintains it in pymc-labs/CausalPy, which has 1,200 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

Source: pymc-labs/CausalPy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.