lightspeed-agentic-operator: Skill for Claude Code

.cursor/skills/find-dead-code/SKILL.md

find-dead-code is a skill for Claude Code, Cursor from openshift/lightspeed-agentic-operator. It costs 44 tokens per session (796 once invoked), scanned A, original, Apache-2.0.

A Go code-analysis guide that finds unused functions, types, constants, imports, and unreachable code. Dead code is code that no longer runs or is needed.

In plain words
What is it for?
Use it to inspect changed files or a whole codebase for cleanup candidates. It reports possible dead code but does not delete anything.
Why use it?
It helps reduce clutter and code size while reminding you to check for false positives, such as code called through reflection or interfaces.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also installed under .cursor/.

This is openshift/lightspeed-agentic-operator's own configuration. It tells Claude Code and Cursor how to work on lightspeed-agentic-operator itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lightspeed-agentic-operator configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/openshift/lightspeed-agentic-operator/main/.cursor/skills/find-dead-code/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/openshift/lightspeed-agentic-operator

Made for: Claude Code, Cursor.

Wrote 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.

agentmods badge for find-dead-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/find-dead-code/github.svg)](https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-dead-code)
Your own site
<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.

agentmods 80×15 button for find-dead-code

Your own site · 80×15
<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>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 796 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 1c5067ba2114, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.cursor/skills/find-dead-code/SKILL.md · 112 lines

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

Read the full file on GitHub · 112 lines

Changes

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.

  1. 1mo ago First seen · 112 lines · 44 tokens per session scan A 1c5067ba2114

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

go-linters

Add and validate custom Go analysis linters in gh-aw.

github/gh-aw · 17 tokens

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.

opensquilla/opensquilla · 42 tokens

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…

samber/cc-skills-golang · 175 tokens

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…

samber/cc-skills-golang · 144 tokens

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.

xberg-io/tree-sitter-language-pack · 52 tokens

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.

xberg-io/tree-sitter-language-pack · 48 tokens