nix-install

nix-install is a skill for Claude Code, Codex from fredrikaverpil/dotfiles. It costs 117 tokens per session (1,111 once invoked), scanned A, original, MIT.

A guide for installing Nix, a package manager that can install software and its dependencies, in the Claude Code web sandbox. It uses Nix's binary package cache to obtain tools that are not already available.

In plain words
What is it for?
Use it to install tools such as Neovim or ripgrep in a Claude Code web session, after checking that the required Nix network endpoints are reachable.
Why use it?
It provides a way to add general-purpose command-line tools when the sandbox does not include them and they are unavailable through the usual language package registries.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to install tools such as Neovim or ripgrep in a Claude Code web session, after checking that the required Nix network endpoints are reachable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fredrikaverpil/dotfiles/nix-install
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fredrikaverpil/dotfiles --skill nix-install
Clone the repo
git clone --depth 1 https://github.com/fredrikaverpil/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nix-install

README.md
[![agentmods](https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/nix-install.svg)](https://agentmods.dev/skills/fredrikaverpil/dotfiles/nix-install)
Your own site
<a href="https://agentmods.dev/skills/fredrikaverpil/dotfiles/nix-install"><img src="https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/nix-install.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.01111
Opus 5 $0.00059 $0.00556
Sonnet 5 $0.00023 $0.00222
Haiku 4.5 $0.00012 $0.00111

Measured 8d ago against content hash 51e497eb1161, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

nix-install scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sSI -o /dev/null -w "cache: %{http_code}\n" https://cache.nixos.org
stow/shared/.claude-web/skills/nix-install/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Install Nix in the web sandbox

Nix is the most general way to install tools in the Claude Code web sandbox. The sandbox network is locked to package registries plus this session's GitHub repos, but two facts make Nix work anyway:

  • apt reaches the main Ubuntu archive, and nix-bin is in it.
  • cache.nixos.org and channels.nixos.org are reachable through the proxy, so Nix substitutes prebuilt binaries and pulls the nixpkgs expression without any GitHub access.

Scope: web sandbox only (CLAUDE_CODE_REMOTE=true). On a real machine Nix is already the system package manager — do not run this there.

Step 0 — Verify the network path (usually already open)

curl -sSI -o /dev/null -w "cache:    %{http_code}\n" https://cache.nixos.org
curl -sSI -o /dev/null -w "channels: %{http_code}\n" https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz

200/302 on both → proceed. If either is blocked, the environment's network policy is stricter than default; widen it (claude.ai environment editor → network / allowed hosts) to include cache.nixos.org and channels.nixos.org.

Step 1 — Install Nix (via apt)

Refresh the apt index, then install nix-bin:

apt-get update
apt-get install -y --no-install-recommends nix-bin
# Single-user (rootless-build) mode: the sandbox has no 'nixbld' build-users
# group, so disable multi-user builds or nix-env operations fail.
mkdir -p /etc/nix
grep -q '^build-users-group' /etc/nix/nix.conf 2>/dev/null \
  || echo 'build-users-group =' >> /etc/nix/nix.conf
nix --version

Step 2 — Install packages

Use classic nix-env against the channel tarball. Do not use flakes / nix run nixpkgs#pkg here: the nixpkgs flake reference resolves to github.com/NixOS/nixpkgs, which the proxy blocks. The channel tarball is served from the reachable channels.nixos.org, so this needs no GitHub:

TARBALL=https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz
nix-env -f "$TARBALL" -iA ripgrep     # attribute name = nixpkgs attr path
export PATH="$HOME/.nix-profile/bin:$PATH"
rg --version

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 97 lines · 117 tokens per session scan A 51e497eb1161

Subscribe to this mod's changes

nix-install is a skill published in the GitHub repository fredrikaverpil/dotfiles (257 stars, last pushed today), licensed MIT. It adds 117 tokens to every session and 1,111 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.