BotShelf Vampire BOTSHELF VAMPIRE Register

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.

No sign-upSkillGrok BuildCode reviewUntested

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.

First three moves

  1. Fill the blanks and save the text as ./.grok/skills/dead-code-candidates/SKILL.md in the repository.
  2. In Grok Build, invoke /dead-code-candidates for a small directory with known entry points.
  3. Read the search evidence and possible indirect uses for each candidate before deciding whether to investigate removal.

Where it stops

Blanks to fill

BlankWhat 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.
[EXCLUSIONS]Files or directories that must not be searched; write none if there are no exclusions.

Replace every bracket. Leave none behind.

The text

Download SKILL.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.

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.

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.

All Grok Bot tools Download all (ZIP) Search the shelf