instructions-audit

A security check for instruction files such as CLAUDE.md and .claude/rules files. It looks for hidden or hostile instructions, including secret theft, unsafe commands, and attempts to change protections.

In plain words
What is it for?
Use it to audit instruction files when they are loaded, prompts are submitted, or tools are called. It supports warning or stricter enforcement modes through configuration.
Why use it?
It can detect prompt-injection content before it influences an agent's work. When it finds a serious problem, it locks tool use until a person fixes the file or clears the lock.

Plugin for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Claude Code
/plugin marketplace add karanb192/claude-code-hooks
agentmods
npx agentmods add plugins/karanb192/claude-code-hooks/instructions-audit
Clone the repo
git clone --depth 1 https://github.com/karanb192/claude-code-hooks

Made for: Claude Code.

Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

instructions-audit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"description": "A prompt-injection tripwire for instruction files. An InstructionsLoaded hook audits CLAUDE.md / .claude/rules/*.md content as it enters context and flags hidden or hostile directives: invisible Unicode s
plugins/instructions-audit/.claude-plugin/plugin.json · 23 lines

What it actually says

{
  "name": "instructions-audit",
  "description": "A prompt-injection tripwire for instruction files. An InstructionsLoaded hook audits CLAUDE.md / .claude/rules/*.md content as it enters context and flags hidden or hostile directives: invisible Unicode smuggling (zero width characters, tag characters, variation-selector runs; the TrapDoor supply-chain signature), bidi overrides, directives to read or exfiltrate secrets, curl|sh, decode-and-execute, and hook/settings tampering. Because current builds cannot block on that event, the same script also registers on UserPromptSubmit and PreToolUse as the enforcement arm: a finding locks the session and every prompt and tool call is denied until a human fixes the file or clears the named lock. Tune via HOOK_AUDIT_LEVEL (critical/high/strict) and HOOK_AUDIT_WARN_ONLY, no file edits needed.",
  "version": "1.0.0",
  "author": {
    "name": "Karan Bansal",
    "url": "https://github.com/karanb192"
  },
  "homepage": "https://github.com/karanb192/claude-code-hooks",
  "license": "MIT",
  "keywords": [
    "claude-code",
    "hooks",
    "security",
    "prompt-injection",
    "claude-md",
    "guardrails",
    "instructionsloaded",
    "userpromptsubmit",
    "pretooluse"
  ]
}
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 23 lines scan A 150f4afda014

Subscribe to this mod's changes

instructions-audit is a plugin published in the GitHub repository karanb192/claude-code-hooks (491 stars, last pushed 8d ago), licensed MIT. Its token cost is not measured: this kind of file is read by the harness, not the model. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.