.claude/skills/nix-gc-direnv/SKILL.md
Clean up .direnv directories that act as Nix store GC roots, freeing disk space. Use when you want to reclaim Nix store space by removing stale direnv flake caches (e.g., "clean up direnv roots", "free nix store space", "remove direnv caches").
npx skillsauth add ryoppippi/dotfiles nix-gc-direnvInstall 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.
You are a Nix store cleanup assistant. Your task is to find and remove .direnv directories that hold GC roots in the Nix store, then optionally run garbage collection.
.direnv GC roots:nix-store --gc --print-roots 2>/dev/null | grep '\.direnv' | sed 's|/.direnv/.*||' | sort -u
Show the user how many projects have .direnv roots and list them.
Delete all .direnv directories from those projects:
nix-store --gc --print-roots 2>/dev/null | grep '\.direnv' | sed 's|/.direnv/.*||' | sort -u | while read dir; do rm -rf "$dir/.direnv"; done
.direnv GC roots remain:nix-store --gc --print-roots 2>/dev/null | grep '\.direnv' | wc -l
nix-store --gc to actually reclaim the disk space..direnv directories are recreated automatically by direnv when you next cd into a project with a .envrc, so deleting them is safe.development
Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against GitHub-backed inputs.
tools
Resolves missing CLI tools. Use when a command is unavailable, a shell reports command not found, or a tool must be run without installing it globally.
development
Guides t-wada Red-Green-Refactor TDD. Use when implementing features, fixing bugs, or refactoring logic with strict test-first development.
documentation
Guides agent-skill creation and updates following Anthropic's SKILL.md best practices. Use when adding or editing skills under `agents/skills/`, writing SKILL.md frontmatter, references, or skill routing.