lsp-dead-code

Solid

Enumerate exported symbols in a file and surface those with zero references across the workspace. Use when auditing for dead code, cleaning up APIs, or checking which exports are safe to remove.

AI & Automation 56 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> Requires the agent-lsp MCP server. # lsp-dead-code Audit an exported symbol list for zero-reference candidates. Calls `list_symbols` to enumerate symbols, then checks each exported symbol with `find_references` to find callers. Produces a classified report. ## When to Use Use this skill when you want to identify dead code in a file — exported symbols that are defined but never called anywhere in the workspace. Common use cases: - Cleaning up APIs before a release - Identifying legacy exports that can be safely removed - Auditing a package for unused public surface area **Important:** This skill surfaces *candidates*. Always review results manually before deleting anything. See the Caveats section below. ## What counts as "exported" | Language | Exported means... | |------------|------------------------------------------------------------------------| | Go | Identifier starts with an uppercase letter (e.g. `MyFunc`, `MyType`) | | TypeScript | Has `export` keyword; or is a public class member (no `private`) | | Python | Not prefixed with `_`; or explicitly listed in `__all__` | | Java/C# | Has `public` or `protected` visibility modifier | | Rust | Has `pub` keyword | ## Prerequisites If LSP is not yet initialized, call `mcp__lsp__start_lsp` with the workspace root first: ``` mcp__lsp__start_lsp(...

Details

Author
blackwell-systems
Repository
blackwell-systems/agent-lsp
Created
2 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category