An open API service indexing awesome lists of open source software.

https://github.com/yurukusa/cc-hook-registry

Search, browse, and install Claude Code hooks from the community
https://github.com/yurukusa/cc-hook-registry

ai-safety automation claude-code developer-tools hooks registry safety security

Last synced: 3 months ago
JSON representation

Search, browse, and install Claude Code hooks from the community

Awesome Lists containing this project

README

          

# cc-hook-registry

[![npm version](https://img.shields.io/npm/v/cc-hook-registry)](https://www.npmjs.com/package/cc-hook-registry)
[![tests](https://github.com/yurukusa/cc-hook-registry/actions/workflows/test.yml/badge.svg)](https://github.com/yurukusa/cc-hook-registry/actions/workflows/test.yml)

**Hook package manager for Claude Code.** Search, install, update, and manage 48 hooks from 7 projects.

**[Browse hooks in your browser](https://yurukusa.github.io/cc-hook-registry/)** — no install needed.

```bash
npx cc-hook-registry search database
```

```
Search: "database" — 1 result(s)

block-database-wipe [safety]
Blocks migrate:fresh, DROP DATABASE, prisma migrate reset
Install: npx cc-safe-setup --install-example block-database-wipe
```

## Commands

```bash
npx cc-hook-registry search # Find hooks by keyword
npx cc-hook-registry browse [category] # Browse by category
npx cc-hook-registry install # Install a hook (direct download)
npx cc-hook-registry recommend # Recommend hooks for your project
npx cc-hook-registry info # Show hook details
npx cc-hook-registry stats # Registry statistics
```

### recommend

Scans your project for `package.json`, `requirements.txt`, `Dockerfile`, `.env`, `Gemfile`, `artisan` and recommends hooks based on your tech stack:

```
npx cc-hook-registry recommend

✓ destructive-guard (installed)
Essential — prevents rm -rf disasters

○ auto-approve-build
Node.js project detected
Install: npx cc-hook-registry install auto-approve-build

○ block-database-wipe
Prisma detected — protect against migrate reset
```

### install (direct download)

Hooks are downloaded directly from GitHub — no `cc-safe-setup` dependency needed:

```bash
npx cc-hook-registry install block-database-wipe
# Downloads script, saves to ~/.claude/hooks/, registers in settings.json
```

## Categories

| Category | Hooks | What They Do |
|----------|-------|-------------|
| safety | 14 | Block destructive commands, protect files, secrets |
| quality | 4 | Syntax checks, commit quality, edit validation |
| utility | 3 | Cleanup, debugging, session handoff |
| monitoring | 2 | Context window, cost tracking |
| ux | 2 | Desktop notifications, sound alerts |
| framework | 2 | Python + TypeScript/Bun frameworks |
| approve | 1 | Auto-approve safe compound commands |
| security | 1 | Prompt injection defense |

## 29 Hooks

The registry includes hooks from:
- **cc-safe-setup** (22 hooks) — `npx cc-safe-setup`
- **claude-code-safety-net** (1,185★) — TypeScript safety hooks
- **karanb192/claude-code-hooks** (298★) — JavaScript safety
- **johnlindquist/claude-hooks** (329★) — TypeScript/Bun
- **claude-code-hooks-mastery** (3,386★) — Python framework
- **claude-hooks** by lasso-security — Prompt injection defense
- **awesome-claude-code** by pascalporedda — Sound notifications

## How It Works

The registry is a curated list embedded in the package. No server, no API calls, no network required. Install commands run `npx cc-safe-setup --install-example` for compatible hooks.

## Submit Your Hook

Want to add your hook to the registry? Open a PR on [GitHub](https://github.com/yurukusa/cc-hook-registry) adding an entry to the REGISTRY array in `index.mjs`.

## Related

- [cc-safe-setup](https://github.com/yurukusa/cc-safe-setup) — Install 8 safety hooks in one command
- [cc-hook-test](https://github.com/yurukusa/cc-hook-test) — Test runner for hooks
- [COOKBOOK](https://github.com/yurukusa/claude-code-hooks/blob/main/COOKBOOK.md) — 25 hook recipes

## License

MIT