Borrowing it
Nothing to install: this file belongs to openshift/lightspeed-agentic-operator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/openshift/lightspeed-agentic-operator/main/.cursor/skills/find-dead-code/SKILL.mdgit clone --depth 1 https://github.com/openshift/lightspeed-agentic-operatorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-dead-code)<a href="https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-dead-code"><img src="https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/find-dead-code/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-dead-code"><img src="https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/find-dead-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.00796 |
| Opus 5.5 | $0.00018 | $0.00318 |
| Sonnet 5.5 | $0.00009 | $0.00159 |
| Haiku 4.5 | $0.00004 | $0.00080 |
Grade A, and why
find-dead-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Find Dead Code
Detect unused Go code that can be safely removed.
Rules
- Report findings, do not delete. Removal is a separate task.
- Focus on production code (
controller/,api/,cmd/,cli/). Skip tests unless explicitly asked. - Tools have false positives — classify each finding before recommending removal.
- Code used via reflection or dynamic dispatch (e.g. Kubernetes controller-runtime, interface implementations) is not dead.
Step 1: Determine Scope
Ask the user:
- Branch mode: only files changed in the current branch vs main.
- Full mode: scan the entire codebase.
For branch mode:
git diff --name-only upstream/main -- 'controller/' 'api/' 'cmd/' 'cli/' | grep '\.go$' | grep -v '_test\.go$'
Step 2: Run Go Standard Tooling
Check for unused code with the compiler:
go build ./... 2>&1 | grep "declared and not used"
go vet ./... 2>&1 | grep -E "(not used|never used)"
Step 3: Run staticcheck
staticcheck detects unused code, including unexported functions, constants, and variables:
staticcheck -checks=U1000 ./...
U1000 reports unused code that is not exported and not referenced.
Step 4: Run deadcode (Go 1.23+)
If Go 1.23+ is available:
go run golang.org/x/tools/cmd/deadcode@latest -filter <package-pattern>
This finds functions, types, and variables that are never called or referenced.
Step 5: Check Unused Imports
goimports -l <target>
Any file listed has unused imports. Review with:
goimports -d <file>
Step 6: Filter False Positives
Common false positives in this codebase:
| Pattern | Why it's not dead |
|---|---|
Reconcile(ctx, req) implementations |
Called by controller-runtime via interface |
SetupWithManager() functions |
Called by manager setup code |
init() functions |
Called automatically by Go runtime |
| Interface method implementations | Called through interface, not directly |
kubebuilder: marker functions |
Used by code generation |
Constants/vars in constants.go |
May be used in tests or future code |
Error constants matching Err* pattern |
May be used in error wrapping |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 112 lines · 44 tokens per session scan A 1c5067ba2114
find-dead-code is a skill published in the GitHub repository openshift/lightspeed-agentic-operator (15 stars, last pushed today), licensed Apache-2.0. It adds 44 tokens to every session and 796 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
go-linters
Add and validate custom Go analysis linters in gh-aw.
stack-trace-go-probe
Internal helper for meta-stack-trace-investigator. Use when a Go panic or stack trace needs Go-specific nil/error checks, go test reproducer guidance, and patch targets.
golang-troubleshooting
Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, races, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve, race detection, GODEBUG tracing, and production…
golang-error-handling
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log…
tree-sitter-language-pack-extracting-code-structure
Use when the user wants structured code metadata from a source file — functions, classes, imports, exports, symbols, docstrings, comments, or syntax diagnostics. Covers ts-pack process feature flags, the JSON result shape, and the default feature set.
tree-sitter-language-pack-parsing-source
Use when the user wants a tree-sitter syntax tree for a source file — an s-expression dump or JSON tree. Covers ts-pack parse, language auto-detection vs --language, stdin input, and reading haserrors.