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.
npx agentmods add commands/lasso-security/claude-hooks/installgit clone --depth 1 https://github.com/lasso-security/claude-hooksWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00711 |
| Opus 5 | $0.00000 | $0.00356 |
| Sonnet 5 | $0.00000 | $0.00142 |
| Haiku 4.5 | $0.00000 | $0.00071 |
Grade A, and why
install 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 2d ago.
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.
Reads agent configuration directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- For user-wide: update `~/.claude/settings.json` Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Install Prompt Injection Defender
Install the prompt injection defender hooks into your Claude Code project.
Instructions
Guide me through installing the prompt injection defender. Ask me:
- Which implementation? Python (uv) or TypeScript (bun)
- Installation scope? Project-only or user-wide
- Which tools to monitor? All recommended tools or let me select
Installation Steps
After gathering my preferences:
-
Check prerequisites
- For Python: Verify
uvis installed (which uv) - For TypeScript: Verify
bunis installed (which bun)
- For Python: Verify
-
Copy hook files
- Copy the appropriate hook implementation to my project or user config
- For project:
.claude/hooks/prompt-injection-defender/ - For user-wide:
~/.claude/hooks/prompt-injection-defender/
-
Copy patterns.yaml
- Place
patterns.yamlalongside the hook script - This file contains all detection patterns
- Place
-
Update settings configuration
- IMPORTANT: Check if
.claude/settings.local.jsonexists first - If
settings.local.jsonexists, merge hooks into THAT file (it takes precedence oversettings.json) - If only
settings.jsonexists, merge hooks there - Use the template from
python-settings.jsonortypescript-settings.json - Adjust paths based on installation scope
- For user-wide: update
~/.claude/settings.json
Settings precedence (highest to lowest):
.claude/settings.local.json(local project - overrides all below).claude/settings.json(project settings)~/.claude/settings.json(user settings)
- IMPORTANT: Check if
-
Restart Claude Code
- CRITICAL: Hooks are captured at session startup
- Tell the user they MUST restart Claude Code for hooks to take effect
- Exit the current session and start a new one
-
Verify installation
- After restart, run a quick test to ensure the hook is working
- Read a test file with known injection patterns
- Use
/hookscommand to verify hooks are loaded
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.
- 2d ago First seen · 88 lines · 0 tokens per session scan A 296bc875f948
install is a command published in the GitHub repository lasso-security/claude-hooks (264 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 711 tokens. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
cl
Audit changelog entries before release.
AGENTS
CLAUDE.md is a symlink to this file. Edit AGENTS.md only.
global-shortcuts
Global shortcuts do not use the renderer command registry. Electron main registers them with globalShortcut.register, so they can run while the app is unfocused.
speckit.archive
Archive a feature specification into main project memory after merge, resolving gaps and conflicts.
speckit.critique.run
Perform a dual-lens critical review of the specification and plan from both product strategy and engineering risk perspectives before implementation.
speckit.extract.run
Extract knowledge, guidelines, and ADRs from one or more completed spec directories into the project documentation system.