GROK BOT TOOLS · SKILL
Dead code candidates, evidence before removal未使用に見えるコードの候補と根拠
Lists code that appears unused, with reference searches, search scope and possible indirect callers. Stops at a candidate list; deletes nothing and opens no pull request.
未使用に見えるコードを、参照の検索結果、検索範囲、間接的に呼ばれる可能性とともに挙げます。候補一覧までで止まり、削除もプルリクエストの作成もしません。
Where it goesどこに貼るか
Grok Build: save the file as .grok/skills/dead-code-candidates/SKILL.md in the repository, or as ~/.grok/skills/dead-code-candidates/SKILL.md for every project. It then shows up as the slash command /dead-code-candidates.
Grok Build:リポジトリの .grok/skills/dead-code-candidates/SKILL.md に保存します。すべてのプロジェクトで使うなら ~/.grok/skills/dead-code-candidates/SKILL.md に。スラッシュコマンド /dead-code-candidates として呼べるようになります。
First three moves最初の3手
- Fill the blanks and save the text as ./.grok/skills/dead-code-candidates/SKILL.md in the repository.
- In Grok Build, invoke /dead-code-candidates for a small directory with known entry points.
- Read the search evidence and possible indirect uses for each candidate before deciding whether to investigate removal.
- 空欄を埋め、リポジトリ内の ./.grok/skills/dead-code-candidates/SKILL.md に保存します。
- Grok Build で /dead-code-candidates を呼び出し、呼び出しの起点が分かる小さなディレクトリを対象にします。
- 削除の検討に進むか決める前に、各候補の検索結果と間接的に使われる可能性を確認します。
Where it stops止まる条件
- Before deleting or editing code: candidates are review notes, not removal instructions.
- Before opening a pull request, committing, pushing, merging, deploying or any force operation.
- Before sending messages, publishing, purchasing, paying or changing production.
- When a search finds no references: it records the scope and checks for indirect use before listing a candidate.
- When files are unreadable or the source changes: it reports incomplete evidence and withholds affected conclusions.
- コードの削除・編集の前で止まります。候補は確認用の所見であり、削除の指示ではありません。
- プルリクエストの作成、コミット、push、マージ、デプロイ、強制操作の前で止まります。
- メッセージの送信、公開、購入、支払い、本番環境の変更の前で止まります。
- 参照が見つからない場合は、検索範囲を記録し、間接的な利用を調べてから候補に挙げます。
- ファイルが読めない場合や確認中に内容が変わった場合は、根拠の不足を報告し、影響を受ける判断を保留します。
Blanks to fill埋める空欄
| Blank空欄 | What goes there入れるもの |
|---|---|
[REPOSITORY] | The local repository to inspect without changing files.ファイルを変更せずに調べるローカルリポジトリです。 |
[CANDIDATE_SCOPE] | Directories or modules where unused code candidates may be listed.未使用コードの候補を探すディレクトリやモジュールです。 |
[ENTRY_POINTS] | Known application, command, job or public interface entry points; write unknown where needed.アプリ、コマンド、ジョブ、公開インターフェースの既知の起点です。不明なものは unknown と記入します。 |
[EXCLUSIONS] | Files or directories that must not be searched; write none if there are no exclusions.検索してはいけないファイルやディレクトリです。除外がなければ none と記入します。 |
Replace every bracket. Leave none behind.
角かっこはすべて置き換え、残さないでください。
The text文面
Download SKILL.mdSKILL.md で持ち帰る Fork itフォークする Results & questions結果・質問を書く
--- name: dead-code-candidates description: List apparently unused repository code with search evidence and possible indirect callers. Use when asked to find dead code or assess cleanup candidates without removing anything. when-to-use: find dead code, list unused functions, assess cleanup candidates, inspect unused modules metadata: author: "BotShelf Vampire (unofficial, not xAI)" short-description: Unused code candidates with search evidence license: MIT --- # Dead code candidates, evidence before removal ## When to use Use this when I ask for code that may no longer be used. A missing reference is a search result, not permission to remove code. Keep the repository unchanged. ## Inputs and access - Local repository: [REPOSITORY]. - Candidate directories or modules: [CANDIDATE_SCOPE]. - Known entry points: [ENTRY_POINTS]. - Search exclusions: [EXCLUSIONS]. Use readable local source, configuration and history. Do not fetch remote code, run the application or request secrets. ## Steps 1. Record the revision and existing working changes. Read repository guidance and identify executable entry points, exports and generated code boundaries. 2. Select possible unused declarations or modules within the candidate scope. Search their names, aliases, import paths and registration strings across the readable repository, respecting exclusions. 3. For each candidate, record the search expressions, directories searched, excluded files and matching locations. Separate declarations, comments and tests from calls that can reach the code. 4. Inspect configuration, registries, command dispatch, reflection and dynamic imports where relevant. Follow reexports and wrapper calls. Flag public interfaces and external consumers whose use cannot be judged from this repository. 5. Group mutually referencing candidates so internal calls do not hide the absence of a reachable entry point. If reachability remains unclear, label it unresolved. 6. List candidates only with their evidence and a remaining question. For each, name the next focused check a maintainer could make before considering removal. ## Check the result Revisit each cited definition and search scope. Remove candidates with an observed reachable caller. Distinguish no references found from only test references or uncertain dynamic use. Never describe a text search as proof of nonuse. ## What to return Return a candidate table with file and line, symbol, search evidence, possible indirect use and next check. Follow it with exclusions, unresolved cases and scope limits. If none qualify, say so without claiming the repository contains no dead code. ## Needs my approval Delete nothing and open no pull request. Stop before edits, commits, pushes, merges, deployments or force operations. Ask before sending messages, publishing, purchasing, paying, deleting anything or changing production. Return notes only. ## If data is missing or stale Report unreadable paths and incomplete searches. If source changes during review, withhold affected candidates until reviewed again. Do not reconstruct missing callers from memory.
License: MIT. Free, no sign-up. Use is at your own risk. BSV does not run it or set it up for you.
ライセンス:MIT。無料・登録不要。利用は自己責任です。BSVが代わりに実行・セットアップすることはありません。
What it adds to the official page公式ページに足しているもの
The official page describes the Grok Build skill format. This text adds a search record for unused code candidates, checks for indirect callers and a boundary before removal or pull request creation.
公式ページは Grok Build のスキル形式を説明しています。この文面は、未使用コード候補の検索記録、間接的な呼び出しの確認、削除やプルリクエスト作成の前で止まる決まりを加えています。
Sources出どころ
The product facts in this text come from these official pages, read on 2026-11-18. Products change: when a page and this text disagree, the page is right.
この文面の製品に関する記述は、次の公式ページ(2026-11-18 に確認)に基づいています。製品は変わります。公式ページとこの文面が食い違うときは、公式ページが正です。
All Grok Bot toolsGrok Bot の道具の一覧 Download all (ZIP)まとめてダウンロード(ZIP) Search the shelf棚を検索