agentleFS
NguyenHuy190303NguyenHuy190303/EEP/skills/toolchain/SKILL.md

toolchain

Skill2 starsChanged 20 days agoMITView on GitHub

Use before adding, upgrading or removing a dependency, creating or repairing a venv or node_modules, writing a Dockerfile/CI install step, or running project tooling. Always the lockfile-backed manager (uv for Python, the repo's JS lockfile); never bare pip or the system interpreter.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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
  1. Very specific:

    Never pip install into the system interpreter, never sudo pip, never pip install --user, never conda activate in a repo that has a uv.lock.

    line 29

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Toolchain — the env is the lockfile, everywhere

The failure this stops: it works on this Mac, fails in CI, and fails differently in the container, because three environments were built three ways. One lockfile per project, committed, and every environment — local, CI, image, GPU cluster — is built from it.

Adding a dependency at all is the last rung: stdlib → platform feature → something already installed → only then a new package, and the commit message says why.

Python — uv, always

IntentCommand
Add a dependencyuv add <pkg> (--dev for dev-only, --optional dev where dev is an extra) — never hand-edit pyproject.toml
Install what CI installsuv sync --locked --extra dev
Run anything in the project envuv run <cmd>
One-off tool, not a project dependencyuvx <tool>
Check the lock matches pyproject.tomluv lock --check
  • A bare uv sync uninstalls pytest in these repos — dev deps here are an extra, not a dependency-group, so --group dev is also wrong. uv sync --locked --extra dev is what CI runs.
  • uv.lock is committed and must agree with pyproject.toml; uv lock --check fails when it drifted. Never edit a lockfile by hand.
  • Never pip install into the system interpreter, never sudo pip, never pip install --user, never conda activate in a repo that has a uv.lock. .venv/ is gitignored, never committed.
  • Repos with GPU weights pull gigabytes on sync — for a check that needs no GPU, run the single smoke test rather than syncing everything.

JavaScript — the repo's lockfile names the manager

Detect, do not choose: pnpm-lock.yaml → pnpm · package-lock.json → npm · yarn.lock → yarn. One lockfile per repo; two lockfiles means two machines resolve two different trees, so delete the stray one rather than letting both live.

Intentnpmpnpmyarn
Install exactly the lock (CI, Docker)npm cipnpm install --frozen-lockfileyarn install --immutable
Add a dependencynpm install <pkg>pnpm add <pkg>yarn add <pkg>
One-off toolnpx <tool>pnpm dlx <tool>yarn dlx <tool>

Lockfile is committed with the change that caused it. node_modules/ is never committed. No global installs (npm i -g) for anything a project needs — that is an undeclared dependency.

Keep the installable surface small

A library used by many callers should default to few, light dependencies. Push anything heavy or niche (a specific embedding backend, an optional storage driver) behind an extra so installing the core does not pull it in. A script meant to run out-of-process (a git hook, a background job) that duplicates logic from the main package should stay stdlib-only and never import the package back -- and carry one test asserting the duplicated function still matches the original, so the two cannot silently drift apart.

Container and GPU cluster — the container is the env, the lock still rules

  • Base image pinned by digest (python:3.12-slim@sha256:…), not a moving tag, and never :latest.
  • Inside the image: copy pyproject.toml + uv.lock, then uv sync --locked. No loose pip install X lines in a Dockerfile — that is a dependency nobody can reproduce.
  • SkyPilot / SLURM tasks install the same way in setup:; a task that pip installs a list of packages inline is how "runs on the cluster, broken locally" happens. See the cluster-job skill, if installed.
  • The image tag that ran a job goes in that run's README.md (skill layout), so the run can be rebuilt.

Repos that predate this rule

Some legacy repos in your org still carry requirements.txt or an environment.yml from before this convention. Do not convert them as a side effect of an unrelated change. Record the debt once — ./ops problem where the repo has it, otherwise a line in docs/problems/ — and migrate to pyproject.toml + uv.lock the next time work lands in that repo on purpose.

Check that closes a toolchain change

ChangeCheck
Added / removed a dependencyuv lock --check (or the JS frozen install) + the repo's own test entry point
Dockerfile or CI install stepthe build runs, and the installed version matches the lock
Anything touching a GPU repo's envsay which environment you verified on — local venv is not the cluster

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.