code-auditing
Systematic methodology for comprehensive codebase analysis — security review, technical debt identification, dead code detection, code quality checks, and…
Detect and clean up dead code — unused imports, exports, files, and dependencies — using knip or deadcode with agent verification to filter false positives.
$ npx -y skills add jeffrigby/somepulp-agents --skill dead-code --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dead-codeContext preview
The summary Claude sees to decide when to auto-load this skill.
Detect and clean up dead code — unused imports, exports, files, and dependencies — using knip or deadcode with agent verification to filter false positives.
name: dead-code description: Detect and clean up dead code — unused imports, exports, files, and dependencies — using knip or deadcode with agent verification to filter false positives. when_to_use: When the user asks to "find dead code", "remove unused code", "clean up unused imports/exports", or "check for unused dependencies". argument-hint: "<detect|cleanup>"
Analyze the project for dead code using automated tools with agent verification.
$ARGUMENTS
Project type is auto-detected from package.json, tsconfig.json, requirements.txt, or pyproject.toml.
Dead code tools return many false positives. The agent MUST verify each finding before reporting:
For each flagged item: 1. **Read the flagged code** to understand its context 2. **Check for dynamic references**: `import(variable)`, `require(variable)`, reflection 3. **Check framework patterns**: React components, decorators, middleware 4. **Check re-exports**: Is this in an index.ts barrel file for public API? 5. **Check entry points**: CLI scripts, serverless handlers, workers
1. Invoke the `dead-code-cleanup` agent to run detection and verification:
2. Present the returned report and plan to the user 3. If cleanup mode: use AskUserQuestion to ask which groups to remove 4. Apply only the approved removals
Present findings as:
## Dead Code Analysis Report ### Summary - Unused exports: X (verified) - Unused imports: Y (verified) - Unused dependencies: Z (verified) ### Unused Exports | File | Export | Line | |------|--------|------| | src/utils.ts | formatDate | 42 | ### Filtered (False Positives) - ComponentName - React component (JSX usage) - dynamicLoader - dynamic import pattern
If mode=cleanup, after the agent returns its report and plan:
1. Use AskUserQuestion to ask which groups to remove:
2. If excluding, let user specify what to keep 3. Apply only the approved removals: re-invoke the `dead-code-cleanup` agent with the explicitly approved list, or apply them directly here (`npx knip --fix` / `deadcode --fix` only when everything was approved; otherwise remove items surgically) 4. Show summary of changes and recommend running tests
Note: the `dead-code-cleanup` agent runs as a subagent and cannot prompt the user itself — approval always happens here, in the main conversation.
A plugin marketplace for Claude Code providing specialized agents for code auditing, documentation maintenance, and library/API research.
Repo: jeffrigby/somepulp-agents
Systematic methodology for comprehensive codebase analysis — security review, technical debt identification, dead code detection, code quality checks, and…
Run a comprehensive deep audit by orchestrating specialist agents (security, performance, libraries, quality, dead code) into a single dated report.
Methodology for keeping project documentation current, consistent, and optimized for AI coding agents — CLAUDE.md optimization, README synchronization,…
Update dependencies safely — apply in-range minor/patch updates, then analyze each pending major in parallel and apply only the ones proven safe for this…
Update and synchronize project documentation — CLAUDE.md, README, CHANGELOG — with recent code changes.
Fetch official documentation and code examples for a library or API from authoritative sources only — Context7, official docs sites, official GitHub repos.…