/koopa:koopa-pythonfrom koopa
Guides Python virtual environment setup with direnv, explains why moving a project breaks .venv activate scripts, and provides relocation-proof PATH_add patterns.
Ships in koopa. 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.
None: SKILL.md is the whole skill.
pyproject.toml and configured formatter and linter.X | None for
optional values. Do not add from __future__ import annotations.typing.TypeAlias for complex type aliases..venv breaks activate scripts: use PATH_add in .envrc insteadSymptom. After moving a project directory, mycli (or any console-script
entry point) is command not found in a fresh shell, and the shell prompt shows
the wrong Python version (e.g. koopa's system Python instead of the venv's).
Root cause. Python venv activate scripts hardcode the absolute path of
the venv at creation time:
# .venv/bin/activate (generated by `python -m venv` or `uv venv`)
VIRTUAL_ENV='/old/absolute/path/to/.venv' # ← NEVER updated on move
When the project directory is moved (e.g. ~/git/foo → ~/git/work/foo), uv sync regenerates entry-point scripts and .pth files at the new path, but does
not rewrite the activate scripts. If .envrc does source .venv/bin/activate, the old (now dead) path is prepended to PATH. The real
.venv/bin never appears on PATH → entry points are not found.
Fix: use direnv-native PATH_add instead of source activate. PATH_add
resolves relative to $PWD, so it is relocation-proof by design.
# .envrc: CORRECT (relocation-proof)
if [[ -d '.venv/bin' ]]
then
export VIRTUAL_ENV="$(expand_path .venv)"
export VIRTUAL_ENV_PROMPT='.venv'
PATH_add '.venv/bin'
fi
# .envrc: BROKEN on directory move
if [[ -f '.venv/bin/activate' ]]
then
source '.venv/bin/activate' # hardcodes absolute path from creation time
fi
expand_path .venv is a direnv built-in that turns a relative path into an
absolute one anchored at $PWD, it does NOT bake in a hardcoded path.
Note on strict_env. source .venv/bin/activate also interacts poorly
with strict_env = true in direnv.toml (set -euo pipefail). PATH_add
is safe under strict mode.
If you need to fix a stale venv's activate scripts (for manual source
outside direnv), recreate the venv:
rm -rf .venv && uv sync --extra cli
Run this yourself, the agent should NOT run it (no-install rule).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub acidgenomics/koopa --plugin koopa14 skills in this plugin
/koopa-agent-guardsWhat the koopa plugin's agent guard hooks block or ask about, why, and the correct alternative for each. Use when a koopa hook blocked or asked about a command or a file write, when a deny message names a script such as block_uv.py or guard_rm.py, or when the user asks what the koopa plugin guards do and how to configure them./koopa-claude-permissionsClaude Code permission system internals, protected paths, permission modes, allow/ask/deny rule precedence, and the PreToolUse permissionDecision hook contract. Use when debugging unexpected permission prompts, understanding why Edit(.claude/**) or Bash(*) allow rules have no effect on .claude/ writes, reasoning about acceptEdits vs plan vs bypassPermissions mode tradeoffs, a headless claude -p call that hangs with no output, interpreter allow entries (bash, python, sh, xargs) that bypass deny rules, a deny rule that blocks a harmless test command, or a settings.json change that did not deploy on a work host./koopa-cliCommand syntax for koopa, a shell bootloader that installs apps into its own prefix instead of the system package manager. Use when changing koopa's CLI architecture, installing a CLI tool, updating apps, switching koopa branches, recovering from a stale checkout, or listing what koopa manages./koopa-envWhy a tool resolves inside the koopa prefix instead of Homebrew or the system, how to check that, and how koopa activation behaves in non-interactive and agentic sessions. Use when a command resolves to an unexpected binary, when PATH order looks wrong, or when working inside an SSH/CI/agent harness session that needs koopa's tools on PATH, when asking which shell an agent runs, what KOOPA_BUCKET is, when BSD `sed -i` fails on macOS and `gsed` is the fix, or when `timeout` is a missing command on macOS and `gtimeout` is the fix./koopa-ghosttyTroubleshoot Ghostty directory-access failures caused by macOS privacy permissions. Use when Ghostty reports Permission denied, code 13, or cannot list a Documents or cloud-synced directory that other apps can access./koopa-git-history-surgeryRewrite git history safely with git filter-repo. Use when removing secrets or sensitive files from commits, rewriting author/committer emails across history, de-duplicating doubled commits, or any commit-level surgery.Other plugins' skills for the same job