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.zipInstalls 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.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
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
$HOMEis over quota andpip installaborts withOSError: [Errno 122] Disk quota exceeded, or git pullinsetup.cshfails withPermission deniedon.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(notcmd 2>&1 | tail). Plain>&works,2>&1does not. rehashis required in tcsh after creating or activating a venv, orwhich pytestwill reportCommand not found.even though it exists in$PATH.- Do not edit
setup.cshto 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 installstill fails on/tmp(rare), checkdf -h /tmpand try/tmp/$USER/chopper_venvon 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 andsetup.cshcouldn't create.venvin-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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fallback-venv (this skill) | 0 | 1mo | Review | Intermediate |
| ml-pipeline-workflow | 9 | 4mo | No flags | Advanced |
| mlops-automation | 3 | 6mo | No flags | Intermediate |
| pipeline-plugin-development | 1 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ml-pipeline-workflow
wshobson
Build end-to-end MLOps pipelines from data preparation through model training, validation, and production deployment. Use when creating ML pipelines, implementing MLOps practices, or automating model training and deployment workflows.
mlops-automation
fmind
Guide to refine MLOps projects with task automation, containerization, CI/CD pipelines, and robust experiment tracking.
pipeline-plugin-development
TencentBlueKing
流水线插件开发完整指南,涵盖插件创建、task.json 配置规范、多语言开发示例(Python/Java/NodeJS/Golang)、输入输出规范、错误码规范、发布流程、调试方法。当用户需要开发蓝盾流水线插件、配置 task.json、处理插件输入输出或排查插件错误时使用。
fixing-pipeline-errors
gitwalter
Systematic error detection and fixing strategy for CI/CD pipeline failures
lead-devops
AbhiGTM19
Assists the user with infrastructure, Docker containerization, and deployment pipelines for the MedVision API.
production-dockerfile
phenobarbital
Generate production-ready Dockerfiles with multi-stage builds, security best practices, and optimization. Use when containerizing Python applications for production deployment.