agent/skills/nix/SKILL.md
Runs packages temporarily, creates isolated shell environments, and evaluates Nix expressions. Use when executing tools without installing, debugging derivations, or working with nixpkgs.
npx skillsauth add knoopx/pi nixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Package manager and functional language for reproducible environments. Run any tool once without installing it permanently.
Execute a package from nixpkgs directly:
nix run nixpkgs#cowsay -- "Hello!" # Run with arguments
nix run nixpkgs#hello # Simple command
For long-running services, wrap in tmux: tmux new -d 'nix run nixpkgs#some-server'.
Create a temporary shell with specific tools:
nix shell nixpkgs#git nixpkgs#vim --command git --version
Debug and inspect Nix expressions in headless environments:
nix eval --expr '1 + 2' # Simple expression
nix eval nixpkgs#hello.name # Inspect an attribute
nix eval --file ./default.nix # Evaluate a local file
nix eval --expr 'builtins.attrNames (import <nixpkgs> {})' # List keys
nix search nixpkgs python3 # Search by name or description
nix fmt # Format current directory
nix fmt -- --check # Check formatting without changes
Convert between hash formats:
# Convert SRI to nix32 format
nix hash convert --hash-algo sha256 --to nix32 sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=
# Convert nix32 to SRI
nix hash convert --hash-algo sha256 --from nix32 --to sri 1b8m03r63zqhnjf7l5wnldhh7c134ap5vpj0850ymkq1iyzicy5s
Prefetch a URL and get its hash:
nix-prefetch-url --unpack https://example.com/source.tar.gz
Use Nix as a script interpreter:
#!/usr/bin/env nix
#! nix shell nixpkgs#bash nixpkgs#curl --command bash
curl -s https://example.com
nix log <derivation> to see build outputnix why-depends nixpkgs#hello nixpkgs#glibc--no-substitute to force local buildnix-store -q --references $(which program)tools
Inform the user what is happening — skip passive lookups
development
Renders markdown to self-contained HTML with a custom dark stylesheet and opens in browser. Use when previewing markdown documents, generating styled HTML from README or report files.
testing
Programmatic hunk selection for Jujutsu — split, commit, or squash specific hunks without interactive prompts. Use when making partial commits or selective squashes.
content-media
Manage version control with Jujutsu (jj) — no staging area, immediate changes, smart rebasing. Use when navigating history, squashing, or pushing to Git remotes.