Agent skill

Working With Nix

by xmtp in xmtp/libxmtp

A skill your agent uses when working with Nix flakes, selecting devShells, debugging environment issues, or understanding Nix infrastructure - covers shell selection, environment detection, common…

MITAuto-check passedDevelopment

Install Working With Nix

skills CLI
$ npx skills add xmtp/libxmtp --skill working-with-nix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xmtp/libxmtp working-with-nix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xmtp/libxmtp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/working-with-nix .claude/skills/working-with-nix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
working-with-nix
GitHub stars
121
Token cost
~1.4k tokens
SKILL.md length
382 words
Files
9
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working with Nix flakes, selecting devShells, debugging environment issues, or understanding Nix infrastructure - covers shell selection, environment detection, common…

  • Working with Nix flakes
  • SKILL.md covers Quick Shell Selection, Environment Detection, Critical Constraints and Shell Architecture, plus 4 more sections
  • Calls nix and git; reaches xmtp.cachix.org
  • Selecting devShells

What it does

Working With Nix is an agent skill from xmtp/libxmtp. Use when working with Nix flakes, selecting devShells, debugging environment issues, or understanding Nix infrastructure - covers shell selection, environment detection, common commands, and project-specific constraints like pinned Rust versions

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `packages.md`, `shells/android.md` and `shells/default.md`).

It sits in Development. It works with Rust, iOS, Playwright and Android. The repository describes itself as: shared library bindings & reference implementation of XMTP (X-tensible Message Transport Protocol). The licence is MIT.

When your agent uses it

  • Working with Nix flakes
  • Selecting devShells
  • Debugging environment issues
  • Understanding Nix infrastructure - covers shell selection

Example prompts

  • “/working-with-nix”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit cc87802. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • nix
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • xmtp.cachix.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Working With Nix loads about 1.4k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 382 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xmtp/libxmtp at commit cc87802, republished under its MIT licence (© xmtp). 382 words, ~1,424 tokens.

Download SKILL.mdSave it as .claude/skills/working-with-nix/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
working-with-nix
description
Use when working with Nix flakes, selecting devShells, debugging environment issues, or understanding Nix infrastructure - covers shell selection, environment detection, common commands, and project-specific constraints like pinned Rust versions

Working with Nix in libxmtp

Quick Shell Selection

TaskShellCommand
Focused Rust crates/bindings workrustnix develop .#rust
Full local development (default)localnix develop
Android builds/testingandroidnix develop .#android
iOS builds/testingiosnix develop .#ios
JavaScript/Node.jsjsnix develop .#js
WebAssembly buildswasmnix develop .#wasm

Environment Detection

bash
echo $XMTP_NIX_ENV     # "yes" if in any Rust-based Nix shell
echo $XMTP_DEV_SHELL   # "local", "android", "ios", or unset

Critical Constraints

Rust Version is Pinned — Do Not Change

Rust is pinned via flake.nix → rust-manifest (1.97.1 as of 2026-07; check with nix develop .#rust -c rustc --version). All shells use xmtp.mkToolchain. Never modify without project-wide coordination.

Playwright Versions Must Match EXACTLY

The playwright pin in bindings/wasm/package.json (=X.Y.Z) must equal nixpkgs' playwright version. The js shell provides browsers via PLAYWRIGHT_BROWSERS_PATH (nix/js.nix), and npm playwright looks them up by its own per-version browser revisions — any skew fails WASM tests with browserType.launch: Executable doesn't exist at .../chromium_headless_shell-NNNN/....

After every nixpkgs (flake.lock) bump:

bash
nix eval --raw .#devShells.x86_64-linux.js.PLAYWRIGHT_VERSION
# If it differs from the package.json pin: update the pin, then
# (cd bindings/wasm && yarn install)
iOS Shell is macOS Only

The .#ios shell only works on Darwin. Requires Xcode 16+ for Swift 6.1.

Untracked Files are Invisible to Flakes
bash
git add <new-file>  # Then rebuild — flakes only see git-tracked files
Cachix

Verify the binary cache is active: nix config show | grep substituters — should include https://xmtp.cachix.org.

Shell Architecture

Shells are independent — they compose from shared building blocks, not from each other:

shell-common.nix   → shared building blocks (rustBase, wasmEnv, tool groups)
  ├── rust.nix     → focused Rust shell (crates/bindings, lint, test)
  ├── local.nix    → full local dev (default) = all targets + debug + misc
  ├── android.nix  → Android cross-compilation
  └── ios.nix      → iOS cross-compilation (macOS only)
js.nix             → JavaScript/browser testing (no Rust)
package/wasm.nix   → WASM shell + package build

Essential Commands

bash
# Enter shells
nix develop              # Default shell
nix develop .#rust       # Focused Rust shell
nix develop .#android    # Android shell
nix develop .#ios        # iOS shell (macOS only)
nix develop .#js         # JavaScript shell
nix develop .#wasm       # WASM shell

# Build packages
nix build .#wasm-bindings                    # WASM compiled bindings
nix build .#node-bindings-fast               # Host-matching .node binary
nix build .#node-bindings-js                 # Generated JS/TS bindings
nix build .#node-bindings-linux-x64-gnu      # Per-target .node (example)
nix build .#android-libs                     # All Android targets
nix build .#ios-libs                         # All iOS targets (macOS only)

# Explore
nix flake show           # List all outputs
nix flake metadata       # Show inputs and versions

# Debug
nix develop --show-trace  # Verbose error output

Platform Support

PlatformShells Available
macOS (aarch64-darwin)rust, default, android, ios, js, wasm
Linux (x86_64-linux)rust, default, android, js, wasm
Show full SKILL.md (166 more words)Show less

Key Files

FilePurpose
flake.nixDevShell + package definitions, input pinning, cachix
nix/lib/default.nixOverlay wiring — exposes xmtp.* to all Nix files
nix/lib/shell-common.nixShared building blocks (rustBase, wasmEnv, tool groups)
nix/lib/mkToolchain.nixRust version pinning logic
nix/lib/filesets.nixSource file filtering for hermetic builds
nix/lib/mobile-common.nixShared mobile (iOS/Android) build args
nix/lib/android-env.nixAndroid SDK config, targets, emulator script
nix/lib/ios-env.nixiOS targets, dynamic Xcode resolution
nix/lib/node-env.nixNode targets, NAPI name mapping, cross-compilation
nix/shells/rust.nixFocused Rust dev shell
nix/shells/local.nixFull local dev shell (default)
nix/shells/android.nixAndroid dev shell
nix/shells/ios.nixiOS dev shell (macOS only)
nix/js.nixJavaScript shell
nix/package/wasm.nixWASM shell + package build
nix/package/node.nixNode.js per-target builds + JS/TS generation
nix/package/android.nixAndroid release build derivation
nix/package/ios.nixiOS release build derivation
dev/nix-upInstallation script for Nix and direnv

Further Reference

© xmtp, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files in .claude/skills/working-with-nix of xmtp/libxmtp.

  • SKILL.md
  • packages.md
  • shells/android.md
  • shells/default.md
  • shells/ios.md
  • shells/js.md
  • shells/rust.md
  • shells/wasm.md
  • troubleshooting.md

Open the folder on GitHubat commit cc87802

Compare with similar skills

Working With Nix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Working With Nix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Working With Nix this skillxmtp/libxmtp121—~1.4kAutomated safety check: PassMIT
Makepad Deploymentsickn33/agentic-awesome-skills47k2 repos~3kAutomated safety check: NotesMIT
jscpd Code Migration Trackerkucherenko/jscpd6.4k—~5kAutomated safety check: PassMIT
E2Ecallstack/react-native-pager-view3.4k1 repos~2.1kAutomated safety check: PassMIT
UI Testingchampionswimmer/TwoFac130—~215Automated safety check: PassNone
Dep Validateblokadaorg/blokada3.3k—~5.7kAutomated safety check: NotesMPL-2.0

Similar skills

  • Makepad Deployment

    sickn33/agentic-awesome-skills

    CRITICAL: Use for Makepad packaging and deployment. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3k tokens
    DevOps & CloudAuto-check: notes
  • Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.

    6.4k GitHub stars~5k tokensUpdated today
    DevelopmentAuto-check passed
  • E2E

    callstack/react-native-pager-view

    Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.

    3.4k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • UI Testing

    championswimmer/TwoFac

    How to run, write, and debug local UI tests for Android, iOS, and browser builds.

    130 GitHub stars~215 tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Dep Validate

    blokadaorg/blokada

    A skill your agent uses to validate risky dependency bumps end to end as a local or cloud-launched agent.

    3.3k GitHub stars~5.7k tokensUpdated today
    DevelopmentAuto-check: notes
  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    332 GitHub stars~17k tokensUpdated 6 days ago
    MobileAuto-check passed

More from xmtp/libxmtp

  • Writing Rust Tests

    xmtp/libxmtp

    A skill your agent uses when writing, modifying, or reviewing Rust tests in crates/ or bindings/ - covers test macros, fixtures, assertions, WASM compatibility, and how to run tests

    121 GitHub stars~740 tokensUpdated today
    Auto-check passed

Questions about Working With Nix

What does Working With Nix do?

A skill your agent uses when working with Nix flakes, selecting devShells, debugging environment issues, or understanding Nix infrastructure - covers shell selection, environment detection, common…. Working With Nix is an agent skill from xmtp/libxmtp.

When should I use Working With Nix?

Working With Nix fits situations like: working with Nix flakes; selecting devShells; debugging environment issues; understanding Nix infrastructure - covers shell selection.

How do I install Working With Nix in Claude Code?

Run `npx skills add xmtp/libxmtp --skill working-with-nix -a claude-code`. Or copy the skill folder (.claude/skills/working-with-nix in xmtp/libxmtp) into .claude/skills/working-with-nix in your project. Claude Code loads it when a task matches its description.

How do I install Working With Nix in Codex?

Run `npx skills add xmtp/libxmtp --skill working-with-nix -a codex`. Or copy the skill folder (.claude/skills/working-with-nix in xmtp/libxmtp) into .agents/skills/working-with-nix in your project. Codex loads it when a task matches its description.

Can I use Working With Nix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xmtp/libxmtp --skill working-with-nix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/working-with-nix, .gemini/skills/working-with-nix, .github/skills/working-with-nix and .opencode/skills/working-with-nix in your project.

What does Working With Nix need to run?

Going by SKILL.md and its folder, Working With Nix needs the command-line tools its instructions call (nix and git). Our summary lists: Node.js.

Does Working With Nix access the network?

SKILL.md names 1 domain. In commands or code: xmtp.cachix.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Working With Nix safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Working With Nix use?

Working With Nix is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Working With Nix use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Working With Nix?

Skills that share tags, products or a category with Working With Nix: Makepad Deployment (sickn33/agentic-awesome-skills, 47k stars), jscpd Code Migration Tracker (kucherenko/jscpd, 6.4k stars), E2E (callstack/react-native-pager-view, 3.4k stars) and UI Testing (championswimmer/TwoFac, 130 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Working With Nix?

xmtp (a GitHub organization) maintains it in xmtp/libxmtp, which has 121 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 9, 2026.

Source: xmtp/libxmtp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.