FA

fallback-venv

Create a fallback Python venv in /tmp when standard in-tree setups fail due to disk quotas or permissions.

Install

mkdir -p .claude/skills/fallback-venv && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18456" && unzip -o skill.zip -d .claude/skills/fallback-venv && rm skill.zip

Installs to .claude/skills/fallback-venv

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create a working Python venv in /tmp when the repo checkout is owned by another user or your home directory is over quota, so make check/ci can still run.
154 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Create a Python venv in `/tmp`
  • Activate the created venv
  • Install development extras from the repository
  • Verify `pytest`, `ruff`, `mypy` resolve under the venv
  • Run `make ci` or `make check` within the fallback venv
  • Re-activate the venv in later sessions

How it works

The skill creates a Python virtual environment in `/tmp` to bypass permission or disk quota issues in the repository or home directory, then activates it and installs dependencies.

Inputs & outputs

You give it
A situation where `setup.csh` fails due to permissions or disk quota
You get back
A working Python virtual environment in `/tmp` with installed dependencies, allowing `make check/ci` to run

When to use fallback-venv

  • Fixing permission errors during dependency installation
  • Bypassing home directory disk quotas
  • Setting up a venv in a read-only repository

About this skill

Fallback Venv (Shared Disk / Foreign-Owned Checkout)

Use this when source setup.csh (or setup.sh) fails because:

  • The repo directory is owned by another user (drwxr-s---), so .venv/ cannot be created in-tree, or
  • Your $HOME is over quota and pip install aborts with OSError: [Errno 122] Disk quota exceeded, or
  • git pull in setup.csh fails with Permission denied on .git/FETCH_HEAD.

make check / make ci still need pytest, ruff, mypy, etc. The fix is a venv on a writable, roomy filesystem (/tmp on the build host) — not in $HOME and not in the repo.

Detection (tcsh — PRIMARY)

# 1. Repo writable by me?
ls -ld $cwd                          # look for group/other write perms
# 2. Home quota OK?
df -h ~                              # check Avail
# 3. /tmp roomy?
df -h /tmp                           # need ~1 GB free

If repo is foreign-owned OR home is tight, skip setup.csh and use the steps below.

Procedure (tcsh)

# Pick the project's required interpreter. For Chopper:
set PY = /usr/intel/bin/python3.13.2
set VENV = /tmp/chopper_venv_${USER}

# Wipe any half-built venv from a previous failed run
rm -rf $VENV

# Create + activate
$PY -m venv $VENV
source $VENV/bin/activate.csh
rehash                               # tcsh: refresh command hash so pytest/ruff resolve

# Install dev extras from the repo (editable)
cd /path/to/chopper
pip install -e ".[dev]"

# Verify
which pytest ruff mypy               # all three must resolve under $VENV/bin

Procedure (bash/zsh fallback)

PY=/usr/intel/bin/python3.13.2
VENV=/tmp/chopper_venv_$USER
rm -rf "$VENV"
"$PY" -m venv "$VENV"
source "$VENV/bin/activate"
cd /path/to/chopper
pip install -e ".[dev]"
which pytest ruff mypy

Run the Gate

cd /path/to/chopper
make ci |& tail -200                 # tcsh uses |& not 2>&1 |
echo "exit=$status"

A clean run ends with ============================ N passed in Xs ============================ and exit=0.

Re-Activation in Later Sessions

The venv persists at /tmp/chopper_venv_${USER} until the host reboots or /tmp is reaped. On a new shell:

source /tmp/chopper_venv_${USER}/bin/activate.csh
rehash

If activate.csh is missing, the venv was reaped — recreate it with the procedure above.

Gotchas

  • tcsh redirection: use cmd |& tail (not cmd 2>&1 | tail). Plain >& works, 2>&1 does not.
  • rehash is required in tcsh after creating or activating a venv, or which pytest will report Command not found. even though it exists in $PATH.
  • Do not edit setup.csh to point at /tmp — the script is shared infrastructure for the repo owner. The fallback venv is a per-user workaround that lives outside the repo.
  • Do not commit anything from this procedure. It produces no repo changes; it only enables the gate to run.
  • If pip install still fails on /tmp (rare), check df -h /tmp and try /tmp/$USER/chopper_venv on a different shared scratch disk.

When to Tell the User

Mention it once, briefly, when reporting test results — so they know why the standard source setup.csh path was skipped. Example:

Used a fallback venv at /tmp/chopper_venv_${USER} because the checkout is owned by another user and setup.csh couldn't create .venv in-tree.

When not to use it

  • When the repo directory is writable by the user
  • When the home directory is not over quota
  • When `setup.csh` (or `setup.sh`) runs successfully

Limitations

  • The venv persists only until the host reboots or `/tmp` is reaped
  • The skill is a per-user workaround, not a change to shared infrastructure
  • The skill does not allow committing anything from its procedure

How it compares

This skill provides a specific workaround for environment setup failures by relocating the venv, enabling CI processes to run where standard setup would fail.

Compared to similar skills

fallback-venv side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
fallback-venv (this skill)01moReviewIntermediate
ml-pipeline-workflow94moNo flagsAdvanced
mlops-automation36moNo flagsIntermediate
pipeline-plugin-development12moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry