From ds-crew
Use when setting up or repairing the Python env for analysis — detects uv/venv/conda/poetry/pipenv, installs core packages
How this skill is triggered — by the user, by Claude, or both
Slash command
/ds-crew:ds-env-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill before running any ds-crew analysis for the first time in a project, when an analysis skill fails with `ModuleNotFoundError`, or when you change env managers and need to reinstall. Also triggered automatically by the optional SessionStart hook (see Stage 5).
Use this skill before running any ds-crew analysis for the first time in a project, when an analysis skill fails with ModuleNotFoundError, or when you change env managers and need to reinstall. Also triggered automatically by the optional SessionStart hook (see Stage 5).
Never install into a global Python. Every install command targets the active environment detected in Stage 2. If no env exists at all, create one with uv before installing.
Target interpreter: Python 3.11 or 3.12. This is the band with full DS-stack wheel coverage and the only one the feasibility gate's dependence-forecastability supports (requires-python >=3.11,<3.13). Older (3.9/3.10) risks missing wheels; newer (3.13/3.14) silently disables that tool (gate drops to the fallback). On macOS especially, bare python3 is often Apple's stock 3.9, so don't just accept the default — see the Stage 2.5 checkpoint.
python3 --version # or: python --version
If neither command works: stop here. Install Python first:
brew install python or https://www.python.org/downloads/sudo apt install python3 / sudo dnf install python3Note the version — you'll need it in Stage 2.5. Classify it:
[3.11, 3.13) (3.11 or 3.12) → ideal, no checkpoint needed.Check whether ds-crew is installed globally or per-project:
grep -l "ds-env-setup" ~/.claude/settings.json 2>/dev/null && echo "global" || echo "not global"
grep -l "ds-env-setup" .claude/settings.json 2>/dev/null && echo "project" || echo "not project"
Print the result for the user's awareness. This does not change the env logic.
Run check_env.py (from this skill's scripts/ dir) to detect the manager:
python3 <skill_scripts_dir>/check_env.py
Reads the returned manager field. Priority order: uv > venv > conda > poetry > pipenv > none.
Skip this stage if the Stage 0 version is already in [3.11, 3.13) and a project env already exists (manager ≠ none). Otherwise:
If uv is the manager (or manager is none and uv is on PATH):
uv can fetch and pin any interpreter without touching the system Python — so don't silently inherit an off-target default. Ask the user (a real checkpoint — do not auto-pick):
Your default Python is {version from Stage 0}. ds-crew targets 3.11–3.12 (full DS-stack wheels, and the only band the forecastability gate supports). Since this project uses uv, I can provision any of these without touching your system Python. Which do you want?
- 3.12 — recommended. Newest supported; broadest wheel coverage.
- 3.11. Slightly more conservative.
- Keep default ({version}). Note: <3.11 may miss wheels; ≥3.13 disables
dependence-forecastability(gate falls back).
Apply the choice before installing (Stage 3):
uv python install 3.12 # fetches it if not already present (use 3.11 if chosen)
uv venv --python 3.12 # existing-project path; creates .venv on the chosen interpreter
# — or, on the `none` path —
uv init --python 3.12 && uv venv --python 3.12
If the user keeps the default, proceed with no --python flag.
If the manager is venv / conda / poetry / pipenv and the default is off-target: these can't fetch interpreters on their own. Don't block — but surface it:
ls /opt/homebrew/bin/python3.1[12] /usr/local/bin/python3.1[12] 2>/dev/null (or pyenv versions).python3.12 -m venv .venv) or switch to uv.Run the env-specific command:
| Manager | Command |
|---|---|
uv | uv add pandas openpyxl matplotlib |
venv | python -m pip install pandas openpyxl matplotlib |
conda | conda install -y pandas openpyxl matplotlib |
poetry | poetry add pandas openpyxl matplotlib |
pipenv | pipenv install pandas openpyxl matplotlib |
none | See below |
If none detected: check for uv on PATH first:
which uv || echo "uv not found"
uv present: run the Stage 2.5 checkpoint first, then uv init --python <chosen> && uv add pandas openpyxl matplotlib (omit --python only if the user kept the default).uv absent: stop and print install instructions:
Install uv first: curl -LsSf https://astral.sh/uv/install.sh | sh
Then re-run /ds-env-setup
Do NOT fall back to a global pip install.python3 -c "import pandas; import openpyxl; import matplotlib; print('ready')"
If this fails, report which package is missing (the error message names it) and suggest re-running Stage 3. Print the Python path being used:
python3 -c "import sys; print(sys.executable)"
After a successful verify, ask the user:
"Want me to add a session-start check so you get a warning if the env breaks in future? I'll add a one-liner to
.claude/settings.json."
If yes, append to .claude/settings.json (create the file + hooks key if absent):
"SessionStart": [{
"hooks": [{
"type": "command",
"command": "python3 -c 'import pandas,openpyxl,matplotlib' 2>/dev/null || echo '⚠️ ds-crew: core packages missing — run /ds-env-setup'"
}]
}]
Silent on success. One-liner warning on failure. Non-blocking.
ready from the verification stepcheck_env.py # print JSON env info for cwd
check_env.py --check # exit 0 if packages ok, exit 1 + message if not (for hooks)
Packages installed: pandas, openpyxl, matplotlib
For kernel mode (ds-star-plus): also install ipykernel jupyter_client — see ../ds-star-plus/references/execution.md
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
npx claudepluginhub adamkrysztopa/ds-crew --plugin ds-crew