A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
High-performance Rust hooks for Claude Code skill auto-activation. ~2ms startup, zero dependencies, production-tested pa
High-performance Rust hooks for Claude Code skill auto-activation
Born from 6 months of production use, Catalyst provides battle-tested Rust hooks that make Claude Code skills activate automatically based on context. ~2ms startup time, zero runtime dependencies.
# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build and install
./install.sh
# For SQLite-backed state management
./install.sh --sqlite
That's it! Binaries are installed to ~/.claude-hooks/bin/
# Install Rust (if needed)
# Visit: https://rustup.rs/
# Or: winget install Rustlang.Rustup
# Build and install
.\install.ps1
# For SQLite-backed state management
.\install.ps1 -Sqlite
That's it! Binaries are installed to %USERPROFILE%\.claude-hooks\bin\
Analyzes user prompts and automatically suggests relevant Claude Code skills based on:
Scans codebases for patterns:
SQLite-backed state management for tracking file modifications across sessions with rich query capabilities.
| Metric | Performance |
|---|---|
| Startup Time | ~2ms (60x faster than interpreted languages) |
| Memory Usage | 3-5MB (10x less than Node.js/Python) |
| Binary Size | 1.8-2.4MB (self-contained) |
| Runtime | None required (zero dependencies) |
Why this matters: The skill-activation-prompt hook runs on EVERY user prompt. At 2ms, it's imperceptible. At 100-200ms (TypeScript/Python), users notice lag.
catalyst/
├── src/bin/ # Rust hook implementations
│ ├── skill_activation_prompt.rs
│ ├── file_analyzer.rs
│ └── post_tool_use_tracker_sqlite.rs
├── Cargo.toml # With idiomatic feature flags
├── install.sh # Standalone installer
├── docs/ # Comprehensive documentation
│ ├── rust-hooks.md
│ ├── databases.md
│ ├── performance-comparison.md
│ └── standalone-installation.md
└── .claude/ # Example Claude Code infrastructure
├── hooks/ # Bash wrappers + optional hooks
├── skills/ # 5 production skills
└── agents/ # 10 specialized agents
# Core hooks only (default)
cargo build --release
# With SQLite support
cargo build --release --features sqlite
Features:
sqlite - Enables post-tool-use-tracker-sqlite with rich query capabilities[profile.release]
opt-level = 3 # Maximum optimization
lto = true # Link-time optimization
codegen-units = 1 # Better optimization
strip = true # Remove debug symbols
Result: 1.8MB stripped binary with ~2ms startup.
Build once, use everywhere:
# From catalyst directory
./install.sh
# Or with SQLite support
./install.sh --sqlite
Installs to ~/.claude-hooks/bin/ for use across all projects.
# From catalyst directory
.\install.ps1
# Or with SQLite support
.\install.ps1 -Sqlite
Installs to %USERPROFILE%\.claude-hooks\bin\ for use across all projects.
For customization:
# Build in catalyst directory
cargo build --release
# Binaries in target/release/
Create thin wrappers in your project's .claude/hooks/:
cd your-project/.claude/hooks/
# Skill activation hook (essential)
cat > skill-activation-prompt.sh << 'EOF'
#!/bin/bash
cat | ~/.claude-hooks/bin/skill-activation-prompt
EOF
chmod +x skill-activation-prompt.sh
cd your-project\.claude\hooks\
# Copy PowerShell wrappers from catalyst
Copy-Item catalyst\.claude\hooks\*.ps1 .
# Or create manually:
# skill-activation-prompt.ps1
# post-tool-use-tracker.ps1
Add to .claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/skill-activation-prompt.sh"
}
]
}
]
}
}
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/skill-activation-prompt.ps1"
}
]
}
]
}
}
See docs/standalone-installation.md for complete setup.
User types prompt
↓
skill-activation-prompt (~2ms)
↓
Reads skill-rules.json
↓
Matches against:
- Keywords ("backend", "API", "Prisma")
- File paths (**/*.controller.ts)
- Intent patterns (regex: "create.*controller")
- File content (contains "prisma.")
↓
Injects skill suggestions
↓
Claude loads relevant skills
The breakthrough: Skills activate automatically based on context, not manual invocation.
# Debug build (fast compilation)
cargo build
# Release build (optimized)
cargo build --release
# With SQLite
cargo build --release --features sqlite
# Check code
cargo check
cargo clippy
cargo fmt
# Test with sample input
echo '{
"session_id": "test-123",
"prompt": "create a backend controller",
"cwd": "/project",
"permission_mode": "normal"
}' | ./target/release/skill-activation-prompt
# Measure startup time
time ./target/release/skill-activation-prompt < test-input.json
# Statistical analysis
hyperfine './target/release/skill-activation-prompt < test-input.json'
Enable rich analytics with the sqlite feature:
./install.sh --sqlite
Capabilities:
Performance:
See docs/databases.md for details.
Build for multiple targets:
# Linux
cargo build --release --target x86_64-unknown-linux-gnu
# macOS Intel
cargo build --release --target x86_64-apple-darwin
# macOS ARM (M1/M2)
cargo build --release --target aarch64-apple-darwin
# Windows
cargo build --release --target x86_64-pc-windows-msvc
The .claude/ directory contains production-tested examples:
These are examples - copy and adapt for your projects.
Critical for:
Less critical for:
For this project: The skill-activation-prompt hook runs on EVERY prompt. Rust's 2ms startup is imperceptible; 100-200ms would be noticeable lag.
Extracted from managing:
These patterns solved real problems:
cargo fmt and cargo clippyCode standards:
cargo fmtcargo clippyMIT License - Use freely in your projects, commercial or personal.
Start here: Run ./install.sh and see the auto-activation magic happen.
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Claude Code skill for YouTube creators — channel audits, video SEO, retention scripts, thumbnails, content strategy, Sho
Design enforcement with memory — keeps your UI consistent across a project
AI image generation skill for Claude Code -- Creative Director powered by Gemini