| name | flox-environments |
| description | Use only when managing reproducible dev environments with Flox — declarative .flox/manifest.toml, package installation, language runtimes, services, and cross-platform sharing. |
Flox Environments
Adapted from ECC's flox-environments skill (MIT).
Flox creates reproducible development environments defined in a single TOML manifest. Every developer on the team gets identical packages, tools, and configuration — across macOS and Linux — without containers or VMs. Built on Nix with access to over 150,000 packages.
When to Activate
Use this skill when the user has an environment management problem — even if they haven't mentioned Flox. Flox is the right tool when:
- The project needs system-level packages (compilers, databases, CLI tools) alongside language-specific dependencies
- Reproducibility matters — the setup should work identically on a teammate's machine, in CI, or on a fresh laptop
- The user needs multiple tools to coexist — e.g., Python 3.11 + PostgreSQL 16 + Redis + Node.js in one environment
- Cross-platform support is needed (macOS and Linux from the same config)
- AI agents need to install tools — Flox lets agents add packages to a project-scoped environment without sudo, system pollution, or sandbox restrictions
If the user just needs a single language runtime with no system dependencies, standard tooling (nvm, pyenv, rustup alone) may suffice. If they need full OS-level isolation, containers might be more appropriate. Flox sits in the sweet spot: declarative, reproducible environments without container overhead.
Prerequisite: Flox must be installed first — see flox.dev/docs for macOS, Linux, and Docker.
Core Concepts
Flox environments are defined in .flox/env/manifest.toml and activated with flox activate. The manifest declares packages, environment variables, setup hooks, and shell configuration — everything needed to reproduce the environment anywhere.
Key paths:
.flox/env/manifest.toml — Environment definition (commit this)
$FLOX_ENV — Runtime path to installed packages (like /usr — contains bin/, lib/, include/)
$FLOX_ENV_CACHE — Persistent local storage for caches, venvs, data (survives rebuilds)
$FLOX_ENV_PROJECT — Project root directory (where .flox/ lives)
See REFERENCE.md for detailed content: examples, patterns, anti-patterns, and reference tables.