Chooses the right ad-hoc execution path in this Nix environment. Use when a command is missing, when you need to run a tool without installing it, when you need a one-off CLI, or when Python/Node work needs temporary dependencies without mutating the host.
Use this skill to choose the narrowest temporary execution path without polluting the host.
Project environment first
flake.nix, prefer nix develop for project work.Choose the narrowest tool
nix developnix runnix shelluv run --with ...; otherwise use nix shell with a Python environmentnpx ...; if Node.js is missing, use nix shell nixpkgs#nodejs --command npx ...nix develop
nix run nixpkgs#hello
nix shell nixpkgs#jq nixpkgs#yq --command sh -c 'jq ... | yq ...'
uv run --with requests python3 script.py
npx tsx script.ts
pip install, pip install --user, npm install -g, sudo npm install -g, and similar global mutable installs as the default answer.nix - broader Nix command and evaluation patternsnix-flakes - flake-based environments and workflowsnh - NixOS / Home Manager switching and maintenancepython - Python project structure, typing, and testinguv - uv project and dependency workflowspnpm / bun - project-specific Node.js package manager workflows