A toolkit of custom commands, hooks, and utilities for Claude Code
A toolkit of custom commands, hooks, and utilities for Claude Code
Smart guardrails and workflow automation for Claude Code - catch errors in real-time, save checkpoints, and enhance AI coding with expert subagents
⚠️ Requires: Claude Code Max plan (for optimal token usage) • Node.js 20+
npm install -g claudekit
# or: yarn global add claudekit
# or: pnpm add -g claudekit# Initialize in your project
claudekit setup
# In Claude Code, try these commands:
/git:status # Groups changes by type & suggests commit strategy
/spec:create "your next feature" # Researches codebase & writes full spec
/code-review # 6 specialized agents analyze code in parallelClaudekit acts as your safety net while coding with Claude:
…Claude sees your entire project structure automatically - skips most discovery searches.
xargs, find, pipes, and command substitutionfind -name '*.env' | xargs cat before executionany types and type errors as Claude edits.agentignore, .aiignore, .aiexclude, .geminiignore, .codeiumignore, .cursorignore/checkpoint:restore to undo changesresearch-expert for comprehensive parallel research with 90% time reduction, automatic source analysis, and structured reportingcode-search for fast, parallel codebase searches with 3-10x speed improvementstriage-expert for initial problem diagnosis and routing to specialistscode-review-expert agent with 6 focused analysis aspectsdisableHooks configuration to skip unnecessary validations during specialized operations/agents-md:init to update AGENTS.md/CLAUDE.md for automatic subagent delegationclaudekit-hooks profile.claude/settings.jsonthinking-level hook invisibly enhances Claude's reasoning without manual prompt engineeringclaudekit-hooks disable # Disable hook for current session
claudekit-hooks enable # Re-enable hook for current session
claudekit-hooks status # Show hook status (enabled/disabled)
### Using Prompts with External LLMs
The `show` command extracts agent and command prompts for use with Claude Code's non-interactive mode and other AI coding tools:
```bash
# Extract agent prompt for use with Claude Code CLI
EXPERT=$(claudekit show agent typescript-expert)
cat src/app.ts | claude -p --append-system-prompt "$EXPERT" "Review this code"
# Get structured metadata for integration with tools
claudekit show agent typescript-expert --format json | jq '.description'
# Works with any AI coding CLI tool
claudekit show agent react-expert | amp -x "Fix React hooks violations"
…
bash
# See all available hooks with descriptions
claudekit-hooks list
# Profile hook performance and output size
claudekit-hooks profile # Profile all hooks
claudekit-hooks profile typecheck-changed # Profile specific hook
claudekit-hooks profile --iterations 5 # Multiple runs for averages
# Session-based hook control (requires active Claude Code session)
claudekit-hooks disable typecheck-changed # Disable specific hook for current session
claudekit-hooks enable typecheck # Re-enable hook (supports partial matching)
claudekit-hooks status # Show status of all hooks
claudekit-hooks status lint # Show status of specific hook
…
bash
# List all available agents with token counts
claudekit list agents
# Install specific agents
claudekit setup --agents typescript-expert,react-expertOnce installed, agents work automatically or can be invoked directly:
"Use the oracle agent to debug this issue"
"Have the typescript-expert review this type definition"The file-guard hook automatically protects sensitive files from AI access. Quick setup:
# New projects: Install claudekit with file-guard protection
npm install -g claudekit && claudekit setup --yes --force --hooks file-guard
# Existing projects: Add file-guard to current setup
claudekit setup --yes --force --hooks file-guardOr manually create a .agentignore file:
# .agentignore
.env
.env.*
*.key
*.pem
.aws/credentials
.ssh/*
# Allow example files
!.env.example
…
json
{
"hooks": {
"PreToolUse": [{
"matcher": "Read|Edit|MultiEdit|Write",
"hooks": [{"type": "command", "command": "claudekit-hooks run file-guard"}]
}],
"PostToolUse": [{
"matcher": "Write|Edit|MultiEdit",
"hooks": [{"type": "command", "command": "claudekit-hooks run typecheck-changed"}]
}],
"Stop": [{
"matcher": "*",
"hooks": [{"type": "command", "command": "claudekit-hooks run create-checkpoint"}]
}],
"SubagentStop": [{
"matcher": "*",
"hooks": [{"type": "command", "command": "claudekit-hooks run create-checkpoint"}]
}],
"UserPromptSubmit": [{
"matcher": "*",
"hooks": [{"type": "command", "command": "claudekit-hooks run codebase-map"}]
}]
}
}.claudekit/config.json - Hook configuration
{
"hooks": {
"typecheck-changed": {
"command": "npm run typecheck"
},
"thinking-level": {
"level": 2
},
"codebase-map": {
"include": ["src/**", "lib/**"],
"exclude": ["**/*.test.ts", "**/*.spec.ts"],
"format": "dsl"
}
}
}claudekit doctor to check setupHooks not triggering?
claudekit doctor # Check configuration
npm list -g claudekit # Verify installationTests timing out? Use the ultra-fast test configuration for hook execution:
{
"hooks": {
"test-project": {
"command": "npm run test:fast",
"timeout": 30000
}
}
}Or configure a custom faster test command:
{
"hooks": {
"test-project": {
"command": "npm run test:unit",
"timeout": 50000
}
}
}Codebase map not generating? Install the codebase-map CLI tool:
npm install -g codebase-map
# Check installation:
codebase-map --versionSome commands support optional MCP server integration:
# Install globally
npm install -g @upstash/context7-mcp
# Add to Claude Code
claude mcp add context7 context7-mcpEnables /spec:create to fetch up-to-date library documentation.
# Clone and install
git clone https://github.com/claudekit/claudekit.git
cd claudekit
npm install
# Build
npm run build
# Test
npm test
# Validate production build
npm run validate:build # Check dependencies and build artifacts
npm run validate:install # Test clean installation
# Create symlinks for development
npm run symlinksWe welcome contributions! See CONTRIBUTING.md for guidelines.
MIT © claudekit contributors
No open issues yet, or sync has not completed.