env-isolation
Skill0 starsChanged 3 months agoMITView on GitHub
Install into the project, never into a shared environment. Use before any pip, conda, npm or apt install while doing research work. Prevents the failure where one install breaks every other user of a machine, silently, for days.
- Installs packages
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-cost-controlSkill
- citation-disciplineSkill
- delivery-contractSkill
- experiment-disciplineSkill
- figure-integritySkill
- latex-compileSkill
- literature-surveySkill
- numbers-traceableSkill
- page-fittingSkill
- paper-machineSkill
- paper-structureSkill
- research-integritySkill
- reviewer-mindsetSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Never conda activate some-shared-env && pip install ....
- Distinctive: line 19
Never install into the interpreter that runs your tooling.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Environment Isolation
The rule
Everything installs into an environment that belongs to this project.
python -m venv .venv && .venv/bin/pip install numpy
# or
conda create --prefix ./.conda_env python=3.11 && ./.conda_env/bin/pip install numpyNever conda activate some-shared-env && pip install .... Never sudo pip.
Never install into the interpreter that runs your tooling.
Why this is stricter than it sounds
A research agent working on an econometrics paper needed two libraries. It ran, reasonably enough:
conda activate ark-base && pip install pyblp otreeark-base was the shared environment that the whole platform ran on. One
of those packages pins sqlalchemy==1.3, so pip downgraded it. That broke
the database layer for every user of that machine. Nothing crashed
loudly. Status reporting simply stopped working, and it took five days and
an unrelated investigation to find.
Three minutes later the same agent, unprompted, created a project-local environment and installed the packages again, correctly. The mistake was the first reflex, not the plan.
Consequences worth knowing
Version pins are contagious. Installing a package that pins an old dependency silently downgrades it for everything else in that environment.
Failures are silent. The broken thing is usually not the thing you installed. It is some other component that imported the downgraded library and now takes a different code path, or fails in a try/except that was written for a different reason.
Shared machines have other people on them. In a lab or on a cluster, the environment you are about to modify is someone's running job.
Practical setup
At the start of a project:
python -m venv .venv
.venv/bin/pip install -r requirements.txtThen use the explicit interpreter path in every command, rather than relying on activation state that a subshell may not inherit:
.venv/bin/python experiment.pyRecord what you installed so the paper's environment section is a fact rather than a memory:
.venv/bin/pip freeze > results/environment.txtIf you cannot create a project environment
Say so and stop. Do not fall back to a shared environment because it is available. "I could not create an isolated environment, here is the error" is a fine outcome. Quietly polluting a shared one is not.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

