ypares/agent-skills/nix-profile-manager
Claude Code and agent skill by ypares/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert guidance for agents to manage local Nix profiles for installing tools and dependencies. Covers flakes, profile management, package searching, and registry configuration.
Install
npx vskill@latest install ypares/agent-skills/nix-profile-managerSKILL.md
Nix Profile Manager for Agents
Overview
This skill enables agents to maintain a local Nix profile in a user-provided directory, allowing dynamic installation of tools without requiring system-wide package management or sudo access.
Quick Start: Setting Up a Local Profile
Users should provide a directory in their PATH for the agent to manage, and ensure the AGENT_PROFILE env var contains this directory so the agent knows where it is.
Then the agent just does:
The --profile flag tells Nix to store the profile metadata in that location. The bin dir created by Nix in the profile must be in the PATH.
NOTE: on older Nix versions, the add sub-command was called install. Keep this in mind if you get errors saying that "add" does not exist.
Core Concepts
Profiles
A profile is a directory containing:
manifest.json- list of installed packages and their flake referencesbin,lib,share, etc. - folders with symlinks to binaries, libs, docs in the Nix store
When you run nix profile add, Nix updates the manifest and recreates symlinks.
Flakes
A flake is a standardized Nix package collection with:
- A
flake.nixfile defining inputs and outputs - Deterministic versioning via
flake.lock - Multiple output schemes (packages, overlays, modules, etc.)
Common flakes:
nixpkgs- Standard package library (the default registry), usually an alias forgithub:NixOS/nixpkgs/nixpkgs-unstable- Custom flakes from GitHub (e.g.,
github:user/repo)
Packages vs. Flakes
- Package: A single tool (e.g.,
git,python311) - Flake: A collection of packages, accessed as
<flake>#<package>
IMPORTANT: In some flakes (like nixpkgs) packages can be nested: <flake>#<scope>.<package>
Essential Commands
Search for Packages
Manage Profile
Registry Management
General Workflow
Important Details
- Profile path `bin` sub-folder should be in PATH: The directory containing the profile must be in
$PATHfor linked binaries to be accessible - Flake references are immutable:
nixpkgs#gitresolves to the current nixpkgs version; usegithub:user/repo/ref#packageto pin to specific refs - Profile locking: Only one agent should modify a profile at a time; locking is not automatic
- Store links don't expire: Nix store paths remain valid even if the flake changes; profiles maintain old package paths if needed
Troubleshooting
Package not found:
- Ensure flake name is correct:
nix registry listshows available aliases - Search with
nix search <flake> <partial-name>to find exact package name
Command not in PATH after install:
- Check profile directory is in
$PATH:echo $PATH - Verify $AGENT_PROFILE was created:
ls -la $AGENT_PROFILE(adjust path as needed)
Permission denied:
- Local profiles DO NOT require sudo. Report to user in case of permission problems
References
references/flakes.md- In-depth flake concepts and GitHub referencesreferences/package-search.md- Advanced package discovery techniquesreferences/profile-internals.md- Profile structure and manifest formatreferences/registry.md- Custom registry configuration and pinning
For Agent Implementation
When implementing profile management in an agent:
- Accept profile path as environment variable or parameter - e.g.,
AGENT_PROFILEor function arg - Always search before installing - verify package exists and name is exact
- Use `--json` output for parsing - more reliable than text output
- Handle errors gracefully - packages may not exist in all flakes
- Notify about profile modifications - help users track what was installed
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingnix-profile-manager/SKILL.md
Popularity
- Repository stars
- 30
- Repository forks
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ypares/agent-skills/nix-profile-manager)