Claude FastClaude Fast
Hooks

Skill Activation Hook: Guarantee 100% Skill Loading in Claude Code

Stop Claude from ignoring your skills. The Skill Activation Hook appends recommendations to your prompts before Claude sees them. Zero memory reliance.

Problem: You tell Claude Code to load a skill. It forgets. You add instructions to CLAUDE.md. It ignores them. You end up manually reminding Claude about skills that should be automatic.

Quick Win: The Skill Activation Hook intercepts your prompts and appends skill recommendations before Claude sees the message. Claude can't forget because it never had to remember.

When you type "help me implement a feature", Claude actually sees:

help me implement a feature

SKILL ACTIVATION CHECK

CRITICAL SKILLS (REQUIRED):
  -> session-management

RECOMMENDED SKILLS:
  -> git-commits

ACTION: Use Skill tool BEFORE responding

Claude now knows exactly which skills to load. No guessing. No forgetting.

How It Works

The hook uses Claude Code's UserPromptSubmit event. Every prompt you send triggers this flow:

  1. You type a message - Your natural language request
  2. Hook intercepts - Before Claude sees anything
  3. Pattern matching - Hook checks skill-rules.json for keyword and intent matches
  4. Append recommendations - Matching skills get added to your message
  5. Claude receives both - Your prompt plus skill guidance

The hook runs in milliseconds. You won't notice any delay.

The Matching System

Two strategies work together:

Keyword Matching - Simple string matching. If your prompt contains "commit" or "git push", the git-commits skill triggers.

Intent Patterns - Regex for natural language variation. A pattern like (implement|build).*?feature catches "let's implement this feature" and "build a new feature for me".

Configuration: skill-rules.json

Every skill has triggers defined in .claude/skills/skill-rules.json:

{
  "skills": {
    "session-management": {
      "enforcement": "suggest",
      "priority": "critical",
      "promptTriggers": {
        "keywords": ["feature", "implement", "build", "refactor"],
        "intentPatterns": ["(implement|build).*?feature"]
      }
    },
    "git-commits": {
      "enforcement": "suggest",
      "priority": "high",
      "promptTriggers": {
        "keywords": ["commit", "git push", "commit changes"],
        "intentPatterns": ["(create|make).*?commit"]
      }
    }
  }
}

Priority levels control how the hook groups suggestions:

  • Critical - Must load before any work
  • High - Strongly recommended
  • Medium - Helpful context
  • Low - Optional enhancement

Customization for Your Speech Patterns

The hook adapts to how you talk. If you always say "push my code" instead of "git push", add it:

"keywords": ["commit", "git push", "push my code", "commit changes"]

After creating any new skill, update its triggers in skill-rules.json. Then read those triggers and keep those speech patterns in mind when prompting.

Session Intelligence

The hook tracks what it already recommended. If it suggested session-management earlier in your conversation, it won't repeat the suggestion. Less noise, same coverage.

Session state lives in recommendation-log.json and auto-cleans after 7 days.

Setup in ClaudeFast

The hook is pre-configured. Verify your .claude/settings.local.json includes:

Windows:

{
  "hooks": {
    "UserPromptSubmit": [{
      "hooks": [{
        "type": "command",
        "command": "cmd /c \".claude\\hooks\\SkillActivationHook\\skill-activation-prompt.cmd\""
      }]
    }]
  }
}

Linux/Mac:

{
  "hooks": {
    "UserPromptSubmit": [{
      "hooks": [{
        "type": "command",
        "command": "bash .claude/hooks/SkillActivationHook/skill-activation-prompt.sh"
      }]
    }]
  }
}

Common Issues

No suggestions appearing Check that your keywords match your actual speech patterns. Run the hook manually to test:

echo '{"session_id":"test","prompt":"implement a feature"}' | node .claude/hooks/SkillActivationHook/skill-activation-prompt.mjs

Suggestions appearing when not needed Your keywords may be too broad. Use more specific terms or intent patterns.

Duplicate suggestions The hook might be configured in both global and project settings. Keep it in one location only.

Next Actions

  1. Check your skill-rules.json matches your vocabulary
  2. Add keywords for new skills you create
  3. Learn more about CLAUDE.md configuration to complement the hook
  4. Explore configuration basics for complete setup
  5. Review the skills guide if you need to create new skills

The Skill Activation Hook removes human memory from the equation. You focus on describing what you need. The framework handles which skills Claude should use. That's the point of a framework.

Last updated on

On this page

Claude Code ready in seconds.