Use when skills aren't activating reliably - covers official solutions (better descriptions) and custom hook system for deterministic skill activation
/plugin marketplace add withzombies/hyperpowers/plugin install withzombies-hyper@withzombies-hyperThis skill inherits all available tools. When active, it can use any tool Claude has access to.
resources/hook-implementation.mdresources/skill-rules-examples.mdresources/troubleshooting.md<skill_overview> Skills often don't activate despite keywords; make activation reliable through better descriptions, explicit triggers, or custom hooks. </skill_overview>
<rigidity_level> HIGH FREEDOM - Choose solution level based on project needs (Level 1 for simple, Level 3 for complex). Hook implementation is flexible pattern, not rigid process. </rigidity_level>
<quick_reference>
| Level | Solution | Effort | Reliability | When to Use |
|---|---|---|---|---|
| 1 | Better descriptions + explicit requests | Low | Moderate | Small projects, starting out |
| 2 | CLAUDE.md references | Low | Moderate | Document patterns |
| 3 | Custom hook system | High | Very High | Large projects, established patterns |
Hyperpowers includes: Auto-activation hook at hooks/user-prompt-submit/10-skill-activator.js
</quick_reference>
<when_to_use> Use this skill when:
Prerequisites:
<the_problem>
Symptoms:
Community reports:
Root cause: Skills rely on Claude recognizing relevance (not deterministic) </the_problem>
<solution_levels>
❌ Bad:
name: backend-dev
description: Helps with backend development
✅ Good:
name: backend-dev-guidelines
description: Use when creating API routes, controllers, services, or repositories in backend - enforces TypeScript patterns, error handling with Sentry, and Prisma repository pattern
Key elements:
Instead of: "How do I create an endpoint?"
Try: "Use my backend-dev-guidelines skill to create an endpoint"
Result: Works, but tedious
Reference skills in CLAUDE.md:
## When Working on Backend
Before making changes:
1. Check `/skills/backend-dev-guidelines` for patterns
2. Follow repository pattern for database access
The backend-dev-guidelines skill contains complete examples.
Pros: No custom code Cons: Claude still might not check
How it works:
Result: "Night and day difference" - skills consistently used
User submits prompt
↓
UserPromptSubmit hook intercepts
↓
Analyze prompt (keywords, intent, files)
↓
Check skill-rules.json for matches
↓
Inject activation reminder
↓
Claude sees: "🎯 USE these skills: ..."
↓
Claude loads and uses relevant skills
{
"backend-dev-guidelines": {
"type": "domain",
"enforcement": "suggest",
"priority": "high",
"promptTriggers": {
"keywords": ["backend", "controller", "service", "API", "endpoint"],
"intentPatterns": [
"(create|add|build).*?(route|endpoint|controller|service)",
"(how to|pattern).*?(backend|API)"
]
},
"fileTriggers": {
"pathPatterns": ["backend/src/**/*.ts", "server/**/*.ts"],
"contentPatterns": ["express\\.Router", "export.*Controller"]
}
},
"test-driven-development": {
"type": "process",
"enforcement": "suggest",
"priority": "high",
"promptTriggers": {
"keywords": ["test", "TDD", "testing"],
"intentPatterns": [
"(write|add|create).*?(test|spec)",
"test.*(first|before|TDD)"
]
},
"fileTriggers": {
"pathPatterns": ["**/*.test.ts", "**/*.spec.ts"],
"contentPatterns": ["describe\\(", "it\\(", "test\\("]
}
}
}
#!/usr/bin/env node
// ~/.claude/hooks/user-prompt-submit/skill-activator.js
const fs = require('fs');
const path = require('path');
// Load skill rules
const rules = JSON.parse(fs.readFileSync(
path.join(process.env.HOME, '.claude/skill-rules.json'), 'utf8'
));
// Read prompt from stdin
let promptData = '';
process.stdin.on('data', chunk => promptData += chunk);
process.stdin.on('end', () => {
const prompt = JSON.parse(promptData);
// Analyze prompt for skill matches
const activatedSkills = analyzePrompt(prompt.text);
if (activatedSkills.length > 0) {
// Inject skill activation reminder
const context = `
🎯 SKILL ACTIVATION CHECK
Relevant skills for this prompt:
${activatedSkills.map(s => `- **${s.skill}** (${s.priority} priority)`).join('\n')}
Check if these skills should be used before responding.
`;
console.log(JSON.stringify({
decision: 'approve',
additionalContext: context
}));
} else {
console.log(JSON.stringify({ decision: 'approve' }));
}
});
function analyzePrompt(text) {
// Match against all skill rules
// Return list of activated skills with priorities
}
For complete working implementation: See resources/hook-implementation.md
Phase 1 (Week 1): Basic keyword matching
{"keywords": ["backend", "API", "controller"]}
Phase 2 (Week 2): Add intent patterns
{"intentPatterns": ["(create|add).*?(route|endpoint)"]}
Phase 3 (Week 3): Add file triggers
{"fileTriggers": {"pathPatterns": ["backend/**/*.ts"]}}
Phase 4 (Ongoing): Refine based on observation </solution_levels>
<results> ### Before Hook SystemReal user: "Skills went from 'expensive decorations' to actually useful" </results>
<limitations> ## Hook System LimitationsToken usage:
Performance:
Maintenance:
Use Model Context Protocol to provide skills as context.
Pros: Built into Claude system Cons: Still not deterministic, same activation issues
Modify Claude's system prompt to always check certain skills.
Pros: Works without hooks Cons: Limited to Pro plan, can't customize per-project
Always explicitly request skill usage.
Pros: No setup required Cons: Tedious, easy to forget, doesn't scale
Combine all guidelines into CLAUDE.md.
Pros: Always loaded Cons: Violates progressive disclosure, wastes tokens
Recommendation: Level 3 (hooks) for large projects, Level 1 for smaller projects </alternatives>
<critical_rules>
All of these mean: Try Level 1 first, then decide.
<verification_checklist> Before building hook system:
If Level 1 works: Don't build hook system
If Level 1 insufficient: Build hook system (Level 3) </verification_checklist>
<integration> **This skill covers:** Skill activation strategiesRelated skills:
This skill enables:
Hyperpowers includes: Auto-activation hook at hooks/user-prompt-submit/10-skill-activator.js
</integration>
Official documentation:
When stuck:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.