flox-environments
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager. Use when setting up project toolchains for any language, installing system-level dependencies (compilers, databases, native libs like openssl/BLAS), pinning exact package versions for a team, running local services (PostgreSQL, Redis, Kafka), onboarding developers with one command, or solving 'works on my machine' problems — including agent/vibe-coding setups that ne
Security Assessment
Detected risks:
About flox-environments
flox-environments helps create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager. It solves "works on my machine" problems by defining an environment in a single TOML manifest so every developer, CI job, and fresh laptop gets identical packages, tools, and configuration — without containers or VMs, and with access to over 150,000 packages. It is the right tool when a project needs system-level packages (compilers, databases, native libs like openssl/BLAS) alongside language dependencies, when multiple tools must coexist, when reproducibility matters, or when AI agents need to install project-scoped tools without sudo or system pollution.
Environments are defined in .flox/env/manifest.toml and entered with flox activate. The skill documents essential commands (flox init, flox search, flox show, flox install, flox list, flox activate, flox activate -- <cmd>, flox edit) and the manifest sections [install], [vars], [hook] (on-activate scripts that run every activation), [profile] (interactive shell functions/aliases), and [options] (supported systems). It explains version pinning (nodejs.version = "^20.0", exact versions), platform-specific packages via .systems, conflict resolution with priority (lower wins), and grouping with pkg-group. Key Flox environment variables are covered: $FLOX_ENV (runtime path to installed packages), $FLOX_ENV_CACHE (persistent local storage that survives rebuilds), and $FLOX_ENV_PROJECT (project root). Language recipes are provided for Python with uv, Node.js, Rust, Go, and C/C++, along with hook/profile guidance and anti-patterns (avoid absolute paths, avoid exit in hooks).
It targets teams standardizing toolchains, developers onboarding with one command, and agent/vibe-coding setups needing sudo-free tools. The stated prerequisite is that Flox must be installed first (see flox.dev/docs for macOS, Linux, and Docker). The skill notes when Flox is not the best fit: a single language runtime with no system dependencies may only need standard tooling (nvm, pyenv, rustup), and full OS-level isolation may call for containers — Flox sits between them as declarative, reproducible environments without container overhead.
FAQ
What do I need installed before using this skill?
Flox must be installed first. The skill points to flox.dev/docs for installation instructions covering macOS, Linux, and Docker.
Where is the environment defined and how do I enter it?
The environment is defined in .flox/env/manifest.toml (which you commit) and entered with flox activate. You can also run a single command without a subshell using flox activate -- <cmd>.
How do I pin package versions or handle platform-specific packages?
Use a version field like nodejs.version = "^20.0" for a semver range or an exact version like "16.2". For platform-specific packages, set the .systems array (e.g. valgrind only on x86_64-linux/aarch64-linux).
What are FLOX_ENV_CACHE and FLOX_ENV_PROJECT for?
$FLOX_ENV_CACHE is persistent local storage for caches, venvs, and data that survives rebuilds; $FLOX_ENV_PROJECT is the project root where .flox/ lives. $FLOX_ENV is the runtime path to installed packages. Use these instead of absolute paths so configs work on other machines.
When should I not use Flox?
If you only need a single language runtime with no system dependencies, standard tooling like nvm, pyenv, or rustup may suffice. If you need full OS-level isolation, containers may be more appropriate. Flox targets reproducible environments without container overhead.
Install flox-environments
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
affaan-m/everything-claude-code