Created
November 19, 2025 14:26
-
-
Save shafty023/274c75c11a113eed2fcec4aac4308c92 to your computer and use it in GitHub Desktop.
claude skill activation hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Hook: UserPromptSubmit | |
| # Purpose: ENFORCE skill checking before starting work | |
| # Return JSON with proper hookSpecificOutput structure per Claude Code docs | |
| cat <<'EOF' | |
| { | |
| "decision": undefined , | |
| "reason": "n/a", | |
| "hookSpecificOutput": { | |
| "hookEventName": "UserPromptSubmit", | |
| "additionalContext": "🚨 MANDATORY: Before doing ANY work, you MUST create a todo list with TodoWrite containing:\n\nTodo 1 (status: pending): \"Check available skills for matches\"\nTodo 2 (status: pending): \"[User's actual request]\"\n\nYou MUST complete Todo 1 FIRST by:\n1. Check if ANY of your available skills (listed in your system prompt under Available Skills) match the user's request by comparing their descriptions to the request\n2. If one or more skills match → Mark Todo 1 complete, then INVOKE ALL matching skills using the Skill tool (invoke multiple if needed). Do NOT proceed to Todo 2 when skills match.\n3. If NO skills match → Mark Todo 1 complete, then proceed to Todo 2\n\nIMPORTANT: Use the skill descriptions already in your system prompt. Do NOT read filesystem or glob for skills. You already know what skills are available.\n\nYou are REQUIRED to use TodoWrite before starting. You are FORBIDDEN from skipping Todo 1." | |
| } | |
| } | |
| EOF |
Author
Author
Oh I see what you mean lol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@michabbb lol what do you mean 50%?