MCPInstall

nix-profile-manager

Expert guidance for agents to manage local Nix profiles for installing tools and dependencies. Covers flakes, profile management, package searching, and registry configuration.

Installs
44
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/ypares/agent-skills --skill nix-profile-manager
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads nix-profile-manager automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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:

nix profile add --profile "$AGENT_PROFILE" "nixpkgs#git"

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 references
  • bin, 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.nix file 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 for github: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

# Search in nixpkgs flake:
nix search nixpkgs git

# Search in specific (fully qualified) flake
nix search "github:user/repo[/branch]" <package-name>

# Or get a more detailed JSON output
nix search nixpkgs python3 --json | jq '.[].pname'

Manage Profile

# Add package
nix profile add --profile <profile_path> "<flake>#<package>"

# List installed packages
nix profile list --profile <profile_path>

# Remove by index or element number
nix profile remove --profile <path>/profile 0

# Upgrade packages
nix profile upgrade --profile <profile_path> <package_name>
nix profile upgrade --profile <profile_path> --all  # All packages installed in this profile

Registry Management

# List available flake aliases
nix registry list

# Add custom registry entry (user-level)
nix registry add myflake github:user/repo/branch

General Workflow

# Determine profile path:
echo $AGENT_PROFILE  # If not defined, ask the user which profile to use!!

# Search for the package
nix search nixpkgs git

# Add it
nix profile add --profile "$AGENT_PROFILE" "nixpkgs#git"

# Just use it!
tool-cmd ...

Important Details

  • Profile path bin sub-folder should be in PATH: The directory containing the profile must be in $PATH for linked binaries to be accessible
  • Flake references are immutable: nixpkgs#git resolves to the current nixpkgs version; use github:user/repo/ref#package to 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 list shows 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 references
  • references/package-search.md - Advanced package discovery techniques
  • references/profile-internals.md - Profile structure and manifest format
  • references/registry.md - Custom registry configuration and pinning

For Agent Implementation

When implementing profile management in an agent:

  1. Accept profile path as environment variable or parameter - e.g., AGENT_PROFILE or function arg
  2. Always search before installing - verify package exists and name is exact
  3. Use --json output for parsing - more reliable than text output
  4. Handle errors gracefully - packages may not exist in all flakes
  5. Notify about profile modifications - help users track what was installed

FAQ

What does the nix-profile-manager skill do?

Expert guidance for agents to manage local Nix profiles for installing tools and dependencies. Covers flakes, profile management, package searching, and registry configuration.

How do I install nix-profile-manager?

Run npx skills add https://github.com/ypares/agent-skills --skill nix-profile-manager in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/nix-profile-manager/ (personal) or .claude/skills/nix-profile-manager/ (project).

Which AI agents can use nix-profile-manager?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is nix-profile-manager safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains nix-profile-manager?

It is published by ypares in ypares/agent-skills. It has 44 recorded installs.

More from ypares/agent-skills

View all →

searxng-search

ypares/agent-skills

Enhanced web and package repository search using local SearXNG instance

AI & Agents829 installs

textual-builder

ypares/agent-skills

Build Text User Interface (TUI) applications using the Textual Python framework (v0.86.0+). Use when creating terminal-based applications, prototyping card games or interactive CLIs, or when the user mentions Textual, TUI, or terminal UI. Includes comprehensive reference documentation, card game starter template, and styling guides.

Frontend & Design139 installs

typst-writer

ypares/agent-skills

Write correct and idiomatic Typst code for document typesetting. Use when creating or editing Typst (.typ) files, working with Typst markup, or answering questions about Typst syntax and features. Focuses on avoiding common syntax confusion (arrays vs content blocks, proper function definitions, state management).

Docs & Writing123 installs

github-pr-workflow

ypares/agent-skills

Open the skill to read its SKILL.md instructions.

working-with-jj

ypares/agent-skills

Expert guidance for using JJ (Jujutsu) version control system. Use when working with JJ, whatever the subject. Operations, revsets, templates, debugging change evolution, etc. Covers JJ commands, template system, evolog, operations log, and interoperability with git remotes.

cursor-agent-supervisor

ypares/agent-skills

Offloading tasks with a well-defined scope to sub-agents, for instance to use a sub-agent to implement a set of specs. Use this skill whenever a task should not need a broad knowledge of the whole project

AI & Agents68 installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs