Lasso claude-hooks
Description
A collection of security and utility hooks for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Hooks allow you to extend Claude Code's behavior by running custom scripts at key points during execution.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Hooks
A collection of security and utility hooks for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Hooks allow you to extend Claude Code's behavior by running custom scripts at key points during execution.
**Research Paper**: For detailed analysis of indirect prompt injection vulnerabilities in Claude Code, see: [The Hidden Backdoor in Claude Coding Assistant](https://www.lasso.security/blog/the-hidden-backdoor-in-claude-coding-assistant)
Available Hooks
🛡️ Prompt Injection Defender
Defense against **indirect prompt injection** attacks. Scans tool outputs (files, web pages, command results) for injection attempts and warns Claude about suspicious content via PostToolUse hooks.
Quick Start
Option 1: Interactive Installation (Recommended)
If you have this repo added as a Claude Code skill, simply tell Claude:
"install the prompt injection defender"
Claude will handle the entire installation process for you.
Option 2: Install Script
# Clone this repo, then run the installer pointing to your project
git clone https://github.com/lasso-security/claude-hooks.git
cd claude-hooks
./install.sh /path/to/your-project
What gets installed
The installer copies hook files to your project and configures Claude Code:
your-project/
└── .claude/
├── hooks/
│ └── prompt-injection-defender/
│ ├── post-tool-defender.py
│ └── patterns.yaml
└── settings.local.json ← hook configuration
📖 **For manual installation and more options, see [INSTALLATION.md](INSTALLATION.md)**
Understanding Prompt Injection
The Problem: Indirect Prompt Injection
When Claude Code reads files, fetches web pages, or runs commands, malicious instructions can be hidden in that content:
# README.md (looks innocent)
Welcome to our project!
## Installation
...
...
Related Skills
Epic Decompose
Break an epic into task children without creating task branches.
Productivity Claude Code Terminal Title
Gives each Claude Code terminal window a dynamic title describing the work being done
Productivity N8n Skills
Enables AI assistants to directly understand and operate n8n workflows
Productivity Composio Make
Trigger and manage Make (Integromat) scenarios
Productivity Getting Help
career-ops is an open source project maintained in limited time. Here's how to get help efficiently.
Productivity Worktree Status Check
Verify the current worktree environment and show task details.
Productivity