ClaudeCodeMod

All shelves / Mods / Safety

injection-guard

By Singh-AP

injection-guard is a Claude Code safety mod by Singh-AP.

Strips hidden characters from tool output and marks results that carry instructions aimed at Claude, so they reach it as untrusted data.

Draws

Install

The marketplace name is awesome-claude-mods.

In Claude Code
/plugin marketplace add Singh-AP/awesome-claude-mods
/plugin install injection-guard@awesome-claude-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
1.0.0
License
MIT
Repo stars
3
Last change
2026-10-04

What it can reach

  • Draws in the session
  • Sees tool calls

Claude Code 2.1.287 or later. The mod is live once you run /reload-plugins or start a new session. It watches WebFetch, WebSearch, Read, Bash, Grep, and every MCP tool, subagents included. Hidden characters, Unicode tag characters, runs of variation selectors, bidi overrides, and zero-width characters, are removed in every mode, and each run becomes a marker, with the decoded text when it spells something. Emoji sequences, keycaps, and Persian, Arabic, Indic, and CJK joiners and variants are kept. A weighted scorer flags planted instructions, such as ignore previous instructions, don't tell the user, role switches, notes addressed to the AI, requests for the system prompt, chat markup, markdown images that leak data, and base64 that decodes to these, and a flagged result reaches Claude with a reminder to treat it as data and tell you, with one toast per source. mode is warn by default, adding the note; strip also cuts the passages, and block withholds the result. /injection-guard shows the counts, and /injection-guard test shows the score and every signal.

The marketplace, Singh-AP's awesome-claude-mods, holds the 21 mods built there, secret-shield, net-guard, bash-guard among them, and 26 community and Anthropic mods pinned to a commit. This one installs on its own. Defusing instructions hidden in what tools return is why this page files it under safety. guard-pack, by atretyak1985, holds file tools and shell moves that leave the project's roots, asks before a production deploy, and redacts secrets in a tool result before Claude reads it. transcript-redactor, by ray-amjad, swaps secrets and email addresses in the session for stable placeholders. This one rewrites tool results too, for hidden characters and planted instructions rather than secrets. The README says it catches patterns, not intent, so a paraphrased or translated injection can get past it and a page about prompt injection can trip it, which is why the default only warns. It sees tool results only, not @-mentioned files, pasted text, or a hook's context, and WebFetch output is already a summary a small model wrote, so hidden characters on the page may never reach it. Its plugin.json names awesome-claude-mods as its author, and Singh-AP owns the marketplace.

Demo

The injection-guard section on the author's GitHub page
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • tool.callAround a tool call, where it can hold one
  • command.runWhen you run its slash command/injection-guard

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /injection-guardWhat injection-guard has flagged, or dry-run it: /injection-guard test <text>

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
Singh-AP
Category
Safety
Marketplace
awesome-claude-mods
Repo
Singh-AP/awesome-claude-mods
Folder
mods/safety/injection-guard
Version
1.0.0
License
MIT
Repo stars
3
Last change
2026-10-04
Language
TypeScript
Files
8

Other mods in Safety

collision-guardnateherkaiHolds a commandHolds an edit to a file another open chat changed in the last 30 minutes, and asks you to proceed, move this chat to a worktree, or cancel.recording-modenateherkaiHolds a commandMasks keys, personal details, and business figures on screen while you record, hides results from mail, chat, and finance tools, and keeps private files closed.secret-boxray-amjadHolds a commandOpens a masked box when Claude needs a key, writes the key to .env, and gives Claude a placeholder; any key a tool prints comes back as a placeholder too.secret-shieldSingh-APHolds a commandReplaces API keys, tokens, private keys, and passwords in tool output with a redaction marker before the model or the transcript sees them.transcript-redactorray-amjadSwaps secrets and email addresses in the session for stable placeholders, and puts the real value back on the way into Bash, Write, and Edit.safe-deletecharlie947Holds a commandMoves the files Claude deletes to the Bin instead, toasts a receipt, and /undo-delete puts the last batch back.loop-detectiveYeonwooSungOpens a case when the same Bash command fails the same way again, ties it to the edits that followed, and shows the live cases in a pane and a status line.display-redactionmelodic-softwareMasks email addresses and secret-shaped text in what Claude Code draws, and leaves the transcript, the model's context, and the files unchanged.jev-permission-gatemadisonrickertHolds a commandHolds routine tool calls in auto mode for Jev to allow or deny, and sends the uncertain ones on to Claude Code's built-in classifier.subagent-wallerikdarlingdataHolds a commandHolds a subagent after a time limit to git, gh, and Markdown or text writes, and nudges a code-changing subagent that has edited nothing.public-repo-guardSzotaszHolds a commandAsks in a popup before a push to a public GitHub repo, or before one goes public, when outgoing commits hold keys, emails, local paths, or private repo names.agentic-qe-fleetproffesor-for-testingHolds a commandHolds a command that would delete or overwrite .agentic-qe learning data, and toasts when the guard is set to notify.
All 73 in Safety