DeadWeight
VS Code extension: find and remove unused npm packages and dead code, and catch malicious dependencies. Verified removal with auto-undo.
Install / Use
claude mcp add Kalyan-github-4 -- npx -y github:Kalyan-github-4/DeadWeightIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
SecuritySupported Platforms
Our assessment of DeadWeight
DeadWeight scores 84/100 on our quality scale, 833rd of 1,108 Security skills we index.
Its MCP Server is 28 KB long, well organised into 32 sections with 8 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated yesterday, so DeadWeight is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-16. Automated pattern scan on 2026-11-16. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
DeadWeight compared with similar skills
All 4 of these similar skills score higher than DeadWeight; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| DeadWeight (this skill)by Kalyan-github-4 | 84 | 10 | 1d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 48.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install DeadWeight?
- Run
claude mcp add Kalyan-github-4 -- npx -y github:Kalyan-github-4/DeadWeight. The install tabs above show the steps for each supported agent. - Which AI agents does DeadWeight work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is DeadWeight safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is DeadWeight still maintained?
- The repository was last updated yesterday, so DeadWeight is actively maintained.
Skill content
View source on GitHub💀 Deadweight
Find and remove unused npm packages and dead code, and catch malicious dependencies, right inside VS Code.

Install from the Marketplace · or run ext install kalyanmanna.deadweight from Ctrl+P
- 📦 Unused packages: dependencies nothing imports, with the MB each one frees from
node_modules - 🗂️ Dead files and unused exports: code no entry point can reach, marked right in the editor
- ☣️ Malicious dependencies: every installed package checked against the npm advisory database and OSV.dev malware records
- 🎯 Safe-to-delete score: every finding rated 0–99 with the reason, so you know what's safe before you touch it
- ✅ Verified one-click removal: your own type check, build and tests run after removal, and it's undone automatically if anything breaks
- 🔓 Deletes vulnerabilities too: see the known CVEs you remove, e.g. "frees 84 MB and 3 known vulnerabilities"
- 🕸️ Connection graph, blast radius, MCP server for AI agents and a PR guard GitHub Action
Works with npm, yarn and pnpm, in JavaScript and TypeScript projects, including folders with several projects.
📑 Contents
- The problem
- Quick start (1 minute)
- The complete workflow
- Understanding the safe-to-delete score
- The Connection Graph
- Commands & settings
- Troubleshooting & FAQ
- How it works
- Safety philosophy
- Development
🚨 The Problem
Modern projects accumulate technical clutter surprisingly fast.
You install a package for a feature that gets removed. You create a utility file that stops being used. You leave behind dependencies from an old implementation.
Over time, these become deadweight: unnecessary dependencies, unused files, larger projects, harder navigation, more maintenance and more technical debt.
Tools that detect dead code already exist — but they print a list of 40 paths in a terminal and leave you to double-check every one before daring to delete anything. Most people never act on it.
Deadweight closes that loop: detect → understand → remove safely → undo if needed.
⚡ Quick start (1 minute)
- Install — in VS Code open Extensions (
Ctrl+Shift+X/Cmd+Shift+X), search Deadweight, click Install. - Open your project — File → Open Folder… and pick the folder that contains your
package.json. - Click the Deadweight icon (🗑️) in the left activity bar → Scan Workspace.
- Read the results — every item has a score like
high · 98. Hover it to see why. - Click the trash icon at the top of the panel → check the preview → Remove.
- Changed your mind? Click Undo.
That's it. The rest of this page explains each step in detail.
🧭 The complete workflow
Install ─► Open project ─► Scan ─► Read scores ─► Investigate ─► Review & Remove ─► (Undo) ─► Scan again
│ ▲
└──► Connection Graph ───┘ (optional: see how everything connects)
Step 1 — Install
- VS Code: Extensions view → search Deadweight → Install, or press
Ctrl+Pand runext install kalyanmanna.deadweight. - From a file: download the
.vsixfrom the GitHub releases, then Extensions view → ⋯ → Install from VSIX…
Installing does nothing on its own — Deadweight never runs in the background or on startup. It only works when you ask.
Step 2 — Open your project
Open the folder that directly contains package.json (File → Open Folder…).
💡 If your project lives in a subfolder — e.g. you opened
my-projects/but the app is inmy-projects/my-app/— openmy-appitself. Otherwise Deadweight will tell you it can't find apackage.json.
Tip: commit your work to git before cleaning up. Then the cleanup shows up as its own, easy-to-review diff.
Step 3 — Scan
Click the Deadweight icon in the activity bar, then Scan Workspace (or run Deadweight: Scan for unused code from the Command Palette).
- A progress notification appears; you can keep working, or Cancel at any time.
- The first scan downloads the analysis engines and can take 30–60 seconds; later scans take a few seconds.
- When it finishes, the panel fills with three groups:
| Group | What it lists | Can Deadweight remove it? |
|---|---|---|
| 📦 Unused Packages | Dependencies in package.json that nothing imports, runs or configures | ✅ Yes (uninstalls with your package manager) |
| 🗂️ Unused Files | Files no entry point can reach | ✅ Yes (moves them to a trash folder) |
| 🧩 Unused Exports | Exported functions, classes, constants and types that no file imports | ✋ No — you delete the code yourself |
If nothing is found you'll see "No deadweight found" — that's a clean project. 🎉
Step 4 — Read the scores
Every finding shows a band and a safe-to-delete score from 0 to 99:
| Score | Band | Meaning | Pre-checked? | |---|---|---|---| | 80–99 | 🟢 high | Independent checks all agree it's unused | ✅ Yes | | 50–79 | 🟡 medium | Probably unused, but something is worth a look | No | | < 50 | 🔴 low | Could be used in a way that can't be proven (dynamic imports, config, plugins…) | No |
Hover any finding to read exactly why it got its score — for example "No import found across 5 scanned files; depcheck agrees. Deadweight's graph agrees: nothing imports it." See Understanding the score for all the rules.
Step 5 — Investigate
- Click a finding to open it: a file opens directly, a package jumps to its line in
package.json, an export jumps to the exact function. - In the editor, dead files and unused exports are marked with a ⊘ in the gutter and a note like "Deadweight: unused export · high 98" at the end of the line. Unused files are also dimmed in the Explorer.

- Right-click a finding → Show in Connection Graph to see what it is (or isn't) connected to.
Step 6 — Review & Remove
- Tick or untick the checkboxes. High-score packages and files start ticked; medium and low never do.
- Click the trash icon at the top of the Deadweight panel (Review & Remove).
- A preview opens — nothing has changed yet. It shows:
- the exact uninstall command (e.g.
npm uninstall chalk left-pad lodash), - a View package.json diff button,
- which files will move to
.deadweight-trash/<timestamp>/, - the checks that will verify the removal (your type check,
buildandtestscripts), - a warning if you have uncommitted changes.
- the exact uninstall command (e.g.
- Click Remove & verify to go ahead, or Cancel to leave everything as it is.

What actually happens:
- Packages are uninstalled in one command with your package manager (npm, yarn, pnpm or bun — detected automatically).
package.jsonand your lockfile are backed up first. - Files are moved, never deleted, into
.deadweight-trash/<timestamp>/with their folder structure preserved. The trash folder is added to your.gitignoreautomatically. - Unused exports are never touched — open them and delete the code by hand if you agree.
🛡️ Delete a vulnerability
Every unused package shows what removing it really gains: the space it and the dependencies nothing else needs take up in node_modules, and the known vulnerabilities among them (from the npm advisory database, the one npm audit uses):
lodash high · 98 · 1.3 MB · ⚠ 5 vulns
minimist high · 98 · 32 KB · ⚠ 1 vuln
Hover a package for the list of advisories with links. The scan summary and the Review & Remove panel add it up: "Frees 1.4 MB and removes 6 known vulnerabilities (1 critical, 2 high, 3 moderate)." Unused code you never run can still be installed, audited against and exploited in your supply chain; removing it is the cheapest fix there is.
The lookup sends the names and versions of the unused packages (and their exclusive dependencies) to registry.npmjs.org, like npm audit does. Turn it off with deadweight.checkVulnerabilities; sizes are measured locally either way.
☠️ Malicious packages
Every scan also checks everything installed in node_modules, used or not, for known malware: hijacked releases of real packages (like chalk@5.6.1) and packages published only to steal tokens. The exact installed versions are matched against the npm advisory database and OSV.dev (the OpenSSF malicious-packages records), so a clean version of the same package is never flagged.
⚠ Malicious Packages (2) known malware · remove by hand
chalk@5.6.1 declared in package.json
flatmap-stream@0.1.1 installed by event-stream
Each one shows its version, whether you declared it or which of your dependencies installs it, and links to the reports on hover. You also get an error notification, with the details in the Deadweight output channel.
Deadweight doesn't remove malware for you: remove or replace the package (or the dependency that installs it), delete node_modules and reinstall. Its code may already have run on install, so treat tokens, keys and .env secrets on that machine as leaked and rotate them.
The check needs dependencies installed, and sends the names and versions of the installed packages to registry.npmjs.org and api.osv.dev. Turn it off with deadweight.checkMalware.
🤖 AI Security Scan (bring your own key)
The databases only know malware that has already been reported. AI Security Scan asks an AI to look for what they can't know yet, using your own API key for Claude, OpenAI, Gemini, or any OpenAI-compatible API (OpenRouter, Groq, Mistral, DeepSeek, a local Ollama server…). Click it in the Deadweight view, or run Deadweight: AI Security Scan. The first time, it asks for the provider, the key and the model.
It reviews:
- Install scripts (
preinstall/install/postinstall) of every installed package, with the files they run. Most npm malware runs this way. - Your dependencies, looking for typosquats and packages pulled from unexpected sources.
- Your own code, configs and CI: lines matching backdoor and exfiltration patterns (
eval, shell commands, base64 payloads, environment dumps, credential-file reads, webhook hosts, reverse shells, hard-coded master passwords, disabled TLS checks), with the code around them. .npmrc,.yarnrcand CI files, where registries and tokens get redirected.
You get a report with a verdict and each fin
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
48.0kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
