A collection of hooks and plugins for Claude Code — security, cost tracking, workflow automation.
If you find this useful, give it a ⭐ — it helps others discover it.
npx claude-pluginsOr clone:
git clone https://github.com/sxrxvxnn/claude-plugins
cd claude-plugins && node install.jsRestart Claude Code after installing.
Blocks dangerous bash commands before they run. Detects secrets in file writes.
Blocks:
rm -rfon system/home pathscurl ... | bash(pipe to shell)- Force push to
main/master - Writing API keys, private keys, JWT tokens to source files
- Disk wipe commands (
dd,mkfs) - Fork bombs
Warns:
sudo rm,DROP TABLE,git reset --hard,git clean -f
🛡️ GUARDIAN BLOCKED: curl pipe to shell blocked — download and inspect first
Command: curl https://example.com/install.sh | bash
Tracks every tool call and estimates your Claude API cost per session.
💰 Session: 23 tool calls · ~48,200 tokens · $0.0821 · 14min
Generate a report:
claude-cost today
claude-cost all
claude-cost date 2026-07-28macOS notification when Claude finishes a long task. Session summary on stop.
✅ Claude done — 31 tool calls · $0.0943 today
Set CLAUDE_FLOW_AUTO_COMMIT=1 in your shell to auto-commit all changes when Claude stops:
export CLAUDE_FLOW_AUTO_COMMIT=1npx claude-plugins --uninstall- Node.js 18+
- Claude Code
- macOS (flow notifications use
osascript)
Claude Code fires hooks at lifecycle events. Hooks receive JSON on stdin, exit 0 to allow, exit 2 to block (PreToolUse only).
PreToolUse → runs before every tool call → can block
PostToolUse → runs after every tool call → informational
Stop → runs when Claude stops → informational
Hook config lives in ~/.claude/settings.json. The installer merges safely — existing hooks are never overwritten.
// my-hook.js
let input = '';
process.stdin.on('data', chunk => { input += chunk; });
process.stdin.on('error', () => process.exit(0));
process.stdin.on('end', () => {
const data = JSON.parse(input);
const command = data.tool_input?.command || '';
if (command.includes('something-dangerous')) {
process.stderr.write('Blocked: reason\n');
process.exit(2); // block
}
process.exit(0); // allow
});Add to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "node /path/to/my-hook.js" }]
}
]
}
}Built a hook? Open a PR to add it here.
| Plugin | What it does | Author |
|---|---|---|
| caveman | Terse response mode for Claude | @JuliusBrussee |
| guardian | Block dangerous commands + secret detection | @sxrxvxnn |
| cost | Token cost tracking per session | @sxrxvxnn |
| flow | macOS notifications on stop | @sxrxvxnn |
Open an issue or PR. Ideas welcome:
- Git commit message generator hook
- Slack/Discord notification on stop
- Auto-commit after every session
- Windows notification support (flow)
- Custom block lists for guardian
- mac-ssd-toolkit — Use an external SSD as your Mac's primary storage with 27 automation scripts and terminal menus
MIT
