A hook that automatically activates and tells claude to use the recommended skill based on your prompt.
Hooks are scripts that run automatically at specific points in Claude's workflow. They can inject context before prompts (PrePrompt), validate tool usage (PreToolUse), or process outputs (PostToolUse). Hooks help enforce standards, add project context, or automate repetitive checks.
Ask Claude to set up this hook for you. You have two choices: either add it to the user .claude file to work across projects for global skills, or add it to the project .claude folder (to which the current file path points). Based on that, you must write the correct path for the Bash script.
This hook uses the skill-rules.json file to read all skill rules, match them with your prompt keywords, and recommend the corresponding skill to Claude.
IMPORTANT: You may mention to Claude which OS you are using while setting up the hook in case of a global setup.
Hook integration in settings.json
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/skill-activation-prompt.sh"
}
]
}
]
}
}#!/bin/bash set -e cd "$CLAUDE_PROJECT_DIR/.claude/hooks" cat | npx tsx skill-activation-prompt.ts
Just write your prompt, and based on the keywords, the related skill will run.