pkg-guard
by Mohammed Mubarak · ★ 0 · updated 2 days ago
Hold npm, pnpm, yarn, pip, uv, and cargo installs of packages that don't exist, are brand new, or are barely downloaded, with the registry facts in the question. Catches hallucinated and typosquat packages before they land.
Install
/plugin marketplace add MDmubarak786/claude-mods/plugin install pkg-guard@modhubThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startcommand.runtool.call- API calls
$.command.register$.fs.exists$.fs.read$.http.fetch$.store.get$.store.set$.ui.ask$.ui.log- Can see
Bash calls- Reach
- level 3 of 3 networkreads filespersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/MDmubarak786/claude-mods
- Path in repo
mods/pkg-guard- Source commit
818d4f2the exact code the scan read- Author
- Mohammed Mubarak @MDmubarak786
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from MDmubarak786/claude-mods
big-output
MDmubarak786/claude-mods
Keep huge shell output out of the context window. A Bash result over a threshold is saved to a file and Claude gets its head and tail plus a slice tool to grep or page the rest on demand.
bingo
MDmubarak786/claude-mods
Classic 75-ball bingo, you against Claude. Numbers are called, you mark your card and shout Bingo first; Claude plays a card of its own and claims one call late, so you get a fair window. Zero tokens.
circuit-breaker
MDmubarak786/claude-mods
Stop Claude from retrying the same failing shell command over and over. After N identical failures the next attempt is held, and you choose: stop, or try once more.
connect-four
MDmubarak786/claude-mods
Connect Four against Claude, in a pane. Press a column's digit to drop a disc; Claude answers in half a second at three levels, from beatable to a seven-move lookahead. Zero tokens.
copy-last
MDmubarak786/claude-mods
Copy Claude's last reply, or its last code block, to the clipboard as clean Markdown with /copy, with no terminal indentation or trailing spaces.
ding
MDmubarak786/claude-mods
Play a sound and post a desktop notification when Claude finishes a turn or needs you to answer a question or a permission prompt.
dino
MDmubarak786/claude-mods
The Chrome dinosaur runner in a pane. Press w to jump the cacti; the ground speeds up as you go, and your best distance is kept. Zero tokens.
fence
MDmubarak786/claude-mods
Limit which paths Claude may edit in a project with one /fence command. Edits outside the fence are refused with a reason Claude can act on.
game-2048
MDmubarak786/claude-mods
2048 in a pane. Slide tiles with w, a, s and d, merge equal numbers, reach 2048. One undo, a best score that survives restarts, and a board that replays from its seed. Zero tokens.
mcp-diet
MDmubarak786/claude-mods
Choose which MCP tools and subagent types Claude sees, per project. A pane lists every server and tool with the size of its description; defer or hide the ones this repo never needs and stop paying for them on every request.
memory-lint
MDmubarak786/claude-mods
Know whether your auto-memory index loaded whole. Reports the index's size against a limit you set at every session start, names the entries past the cut, and warns when a session pushes it over.
pairs
MDmubarak786/claude-mods
Memory pairs in a pane. Sixteen face-down cards, eight matching pairs; press a card's letter to turn it, find its twin, finish in as few turns and as little time as you can. Best of each kept. Zero tokens.