Nix Store Lookup

/nix/store 配下の store path・ファイルを特定するときに必ず参照する。`find /nix/store` で名前を総当たりする前に読む。「あのパッケージの store path が知りたい」「nix-unit のバイナリはどこ」「flake input の実体パスを知りたい」「derivation の出力パスを取りたい」「store の中のこのファイルを探したい」「store path が実在するか確かめたい」といった場面が対象。/nix/store は数万エントリあり深さ無制限の find は完了しない(実測: 20秒でも終わらず出力ゼロ)。同梱の collect_store_lookup.sh が入力の種別判定・一意な解決・候補収集・実在確認までを決定論的に行うので、まずそれを実行してから分析する。nix-locate が返す path はローカルに存在しないことがあるという反直感的な挙動も、データとして検出される。

9 starsOther Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add yasunori0418/skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add yasunori0418/skills --skill nix-store-lookup
Manual install
git clone --depth 1 https://github.com/yasunori0418/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/nix/nix-store-lookup ~/.claude/skills/nix-store-lookup

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# nix-store-lookup — /nix/store の探索を決定論的な解決に置き換える

## なぜ find を使ってはいけないか

`/nix/store` はこの種の環境で数万エントリある(実測 35,220)。深さで所要時間が破滅的に変わる:

| コマンド | 実測 |
| --- | --- |
| `find /nix/store -maxdepth 1 -name '*nix-unit*'` | 0.22s |
| `find /nix/store -maxdepth 2 ...` | 5.5s |
| `find /nix/store -name '*nix-unit*'`(深さ無制限) | **20秒経っても完了せず出力ゼロ** |
| 同梱スクリプト(分類・解決・実在確認まで込み) | **0.3s** |

速度以上に問題なのは **結果が一意に決まらない**こと。`find /nix/store -maxdepth 1 -name '*nput*'` は 0.14s で終わるが、`.drv`・`-vendor.drv`・manifest を含む 20 件が返り、どれが目的か判断できない。**探索ではなく、入力から一意に引く**のが正しい。

## 手順

### 1. 収集(必ず最初に実行する)

手段を選ぶ前に、決定論で取れるものを一括で取る。入力の種別を事前に判定する必要はない(スクリプトが分類する)。

```bash
bash <skill-dir>/scripts/collect_store_lookup.sh <query>
```

`<query>` はコマンド名・store path・derivation パス・パッケージ名のいずれでもよい。

オプション:

- `--all` — ローカルで一意に解決できた場合でも upstream index(`nix-locate`)を照会する。既定は skip(理由は後述)
- `--flake <dir>` — 指定 flake の input も収集する(既定: カレントが flake なら自動)

### 2. 出力の読み方

```json
{
  "classified_as": "command_on_path",
  "resolved": { "store_path": "...", "via": "...", "exists": true },
  "candidates": {
    "local_db": { "matches": [...], "count": 4, "total_matched": 4, "truncated": false },
    "upstream_index": { "skipped": "...", "matches": null }
  },
  "context": { "store_entries": 35220, "db_valid_paths": 35141, "flake": {...} },
  "warnings": [...]
}
```

判断はこの順で行う:

1. **`resolved` が null でなければそれが答え**。分岐は不要で、追加のコマンドも要らない
2. `resolved` が null なら `candidates.local_db.matches` を見る。`is_drv` でビルド定義を除外し、`exists` で実在を確認して選ぶ
Read the full skill on GitHub

Details

Skill name
nix-store-lookup
Path
skills/nix/nix-store-lookup/SKILL.md
License
MIT
Repo updated
18 November 2026

FAQ

What does the Nix Store Lookup skill do?

/nix/store 配下の store path・ファイルを特定するときに必ず参照する。`find /nix/store` で名前を総当たりする前に読む。「あのパッケージの store path が知りたい」「nix-unit のバイナリはどこ」「flake input の実体パスを知りたい」「derivation の出力パスを取りたい」「store の中のこのファイルを探したい」「store path が実在するか確かめたい」といった場面が対象。/nix/store は数万エントリあり深さ無制限の find は完了しない(実測: 20秒でも終わらず出力ゼロ)。同梱の collect_store_lookup.sh が入力の種別判定・一意な解決・候補収集・実在確認までを決定論的に行うので、まずそれを実行してから分析する。nix-locate が返す path はローカルに存在しないことがあるという反直感的な挙動も、データとして検出される。

How do I install the Nix Store Lookup skill?

Claude Code plugin: /plugin marketplace add yasunori0418/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Nix Store Lookup popular?

It lives in yasunori0418/skills, which has 9 GitHub stars and 0 forks.

Related skills

Agent Teams

9

yasunori0418/skills

Claude Code の並列エージェント(agent teams・teammate)の後始末と無応答時の打ち切りルール。`name` を付けて Agent を起動するとき、TeamCreate でチームを組むとき、teammate から `idle_notification` が届いたとき、評価ループ等で次のイテレーションのエージェントを起動する前、エージェントの返信が届かないときに参照する。`name` を付けない通常のサブエージェント起動だけなら対象外。

AI, LLMs & Agents

Basic Design

9

yasunori0418/skills

spec.md の REQ-# を入力に、機能一覧・モジュール構成・インターフェース・データフローを持つ docs/dev/<対象>/basic-design.md を作成・改訂するスキル。/basic-design <対象名> で明示的に呼び出されたときのみ使用する。

Writing & Content

Biz Translate

9

yasunori0418/skills

技術的な内容を、技術用語を排したビジネス職向けの平易な説明文に翻訳する。`/biz-translate` と明示的に呼ばれたときのみ実行する。

Writing & Content

Product Spec

9

yasunori0418/skills

新しいソフトウェア/デジタルプロダクトのコンセプトを対話で固め、競合・類似プロダクトを並列調査し、軽量な仕様ドラフトを作るオーケストレーションスキル。/product-spec <一言のプロダクトアイデア> で明示的に呼び出されたときのみ使用する。

Other

Mathematics Problem Solver

5

cellrishi-code/claude-skills-atlas

Use when solving a mathematics problem and the user wants a rigorous, readable derivation with assumptions and verification.

Other

Brainstorm Ideas Existing

9

tarunccet/pm-skills

Brainstorm product ideas for an existing product using multi-perspective ideation from PM, Designer, and Engineer viewpoints. Use when generating new feature ideas, brainstorming solutions for an identified opportunity, or ideating with a product trio.

Other

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.