code-manage-nix

Identify nixpkgs package attributes and update Nix configuration files in alphabetical order.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sirn/dotfiles --skill code-manage-nix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-manage-nix
Source: https://github.com/sirn/dotfiles/tree/main/var/agents/skills/code-manage-nix
Command: npx skills add https://github.com/sirn/dotfiles --skill code-manage-nix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams programmatically locate and add Nix packages to a project's configuration, avoiding manual edits and ensuring consistency.

Core Features & Use Cases

  • Identify the exact package attribute in nixpkgs for the requested package.
  • Update the buildInputs or packages list in flake.nix, shell.nix, or default.nix, preserving alphabetical order.
  • Validate the changes with nix flake check or nix-shell to ensure the package is correctly integrated.

Quick Start

Identify the requested Nix package and add its attribute to the appropriate nix configuration file, then validate the build.

Frequently Asked Questions about code-manage-nix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate adding Nix packages to a project's flake.nix?

To automate adding Nix packages, this skill identifies the exact nixpkgs attribute for your requested package and updates the buildInputs or packages list in flake.nix. It ensures alphabetical order is preserved during the insertion process.

How do I find the correct package attribute name in nixpkgs for my dependencies?

Finding the correct package attribute in nixpkgs is handled by matching your requested package name against the nixpkgs repository. The skill locates the exact attribute and injects it directly into your project configuration files.

Does this approach work with both Nix flakes and legacy nix-shell configurations?

Yes, this approach works with both Nix flakes and legacy nix-shell configurations. It automatically detects and updates the appropriate file, whether that is flake.nix, shell.nix, or default.nix, to integrate your package.

How can I validate my Nix configuration after adding new packages?

To validate your Nix configuration after adding new packages, the skill runs nix flake check or nix-shell. It executes these commands to verify the change and reports success or any integration issues.

What is the best way to keep buildInputs alphabetically ordered in Nix files?

The best way to keep buildInputs alphabetically ordered in Nix files is through programmatic insertion. This skill automatically preserves alphabetical order when updating the packages list in your default.nix or flake.nix files.