nix-dev-shell

Detect Nix flakes and run development commands inside a dev shell.

2|Updated Jun 16, 2024
One-click install
npx skills add https://github.com/efficacy38/nix-dotfile --skill nix-dev-shell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-dev-shell
Source: https://github.com/efficacy38/nix-dotfile/tree/main/dotfiles/claude/skills/nix-dev-shell
Command: npx skills add https://github.com/efficacy38/nix-dotfile --skill nix-dev-shell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automatically detects Nix flakes and ensures that development commands run inside a Nix dev shell, loading all declared dependencies. This reduces setup overhead and ensures consistent builds and tests across projects that use flake.nix.

Core Features & Use Cases

  • Flake Detection: Checks for a flake.nix presence in the project or parent directories.
  • Dev Shell Activation: Wraps build/test/dev commands inside nix develop or nix shell when a flake is detected.
  • Usage Scenarios: Use in Rust, Node.js, or other projects that leverage Nix flakes to guarantee the correct toolchain and dependencies are loaded.

Quick Start

Run your usual development or test command in a Nix-enabled project with a flake.nix, and the skill will automatically run it inside the dev shell. For example: nix develop -c cargo test