Context-aware routing to skills and hooks management. Use when troubleshooting skill activation, fine-tuning keywords, or managing the automated documentation system.
Context-aware routing to skills and hooks management. Helps you troubleshoot, fine-tune, and manage the automated documentation system.
.claude/logs/skill-activations.log firstskill-rules.json workjq to validate skill-rules.json before committingCheck logs:
tail -20 .claude/logs/skill-activations.log
Check current keywords:
cat .claude/hooks/skill-rules.json | jq '.skills."SKILL-NAME".promptTriggers.keywords'
Add missing keyword:
.claude/hooks/skill-rules.json directlyTest:
echo '{"prompt":"test prompt"}' | .claude/hooks/skill-activation-prompt.sh
Identify the trigger - Check logs to see which keyword matched
Remove or make more specific:
Verify:
tail .claude/logs/skill-activations.log
Quick: Ask Claude
"Add 'refactoring' to ios-dev-guidelines keywords"
Manual: Edit .claude/hooks/skill-rules.json
"keywords": [
"swift",
"refactoring" // ā Add here
]
Quick: Ask Claude
"Remove 'text' from localization-developer, it's too broad"
Manual: Edit and remove from keywords array
tail -20 .claude/logs/skill-activations.log
Look for:
ā Matched: skill-name # ā This skill activated
No matches found # ā Nothing activated
echo '{"prompt":"add feature flag"}' | .claude/hooks/skill-activation-prompt.sh
Should output skill suggestion if match found.
What it does: When a substantial prompt (100+ chars OR 3+ lines) doesn't activate any skills, the system prompts you with available skills and auto-updates keywords based on your feedback.
Workflow:
.claude/hooks/utils/add-keywords-to-skill.sh localization-developer <keywords>Manual keyword extraction:
# Test keyword extraction
echo "Update space settings localization for membership tiers" | .claude/hooks/utils/extract-keywords.sh
# Output: membership, settings, localization, tiers, update
# Add keywords manually
.claude/hooks/utils/add-keywords-to-skill.sh localization-developer "membership" "tiers"
Logs:
.claude/logs/skill-activations-missed.log.claude/logs/skill-learning.logLocation: .claude/hooks/
What they do:
skill-activation-prompt.sh - Suggests skills based on your promptpost-tool-use-tracker.sh - Tracks file editsswiftformat-post-edit.sh - Auto-formats Swift files immediately after editnotification-alert.sh - Sends macOS notifications when Claude needs inputLocation: .claude/skills/*/SKILL.md
The 7 skills:
ios-dev-guidelines - Swift/iOS patternslocalization-developer - Localizationcode-generation-developer - Feature flags, make generatedesign-system-developer - Icons, typography, colorsskills-manager - This skill (meta!)code-review-developer - Code review standardsfeature-toggle-developer - Feature toggle removal, cleanup detectionLocation: .claude/hooks/skill-rules.json
What it contains:
{
"skills": {
"skill-name": {
"type": "domain",
"priority": "high", // or "medium", "low"
"description": "Smart router to...",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
},
"fileTriggers": {
"pathPatterns": ["**/*.swift"],
"contentPatterns": ["SomePattern"]
}
}
},
"config": {
"maxSkillsPerPrompt": 2,
"logActivations": true
}
}
Skills must follow the agentskills.io specification.
Every skill must start with YAML frontmatter:
---
name: skill-name
description: What this skill does and when to use it (max 1024 chars).
---
# Skill Title
## Purpose
...
a-z, 0-9, -skill-name ā
, -skill- āmy-skill ā
, my--skill āskills/my-skill/SKILL.md ā name: my-skillGood example:
description: Context-aware routing to the iOS localization system. Use when working with .xcstrings files, Loc constants, or user-facing text.
---
name: skill-name
description: Required description.
license: MIT
compatibility: Designed for Claude Code
metadata:
author: anytype
version: "1.0"
---
skill-name/
āāā SKILL.md # Required - main skill file
āāā scripts/ # Optional - executable scripts
āāā references/ # Optional - additional docs
āāā assets/ # Optional - templates, images
name fieldname and descriptionskill-rules.json with keywordsSymptom: No activation messages, empty logs
Fix:
# Make hooks executable
chmod +x .claude/hooks/*.sh
# Verify
ls -l .claude/hooks/*.sh # Should show rwx
Symptom: Hook fails silently
Fix:
# Validate
jq . .claude/hooks/skill-rules.json
# If error, ask Claude to fix it
Symptom: Skill activates too often
Fix: Make keywords more specific
Full Guide: .claude/SKILLS_MANAGEMENT_GUIDE.md
For comprehensive coverage of:
# Check hook permissions
ls -l .claude/hooks/*.sh
# Validate configuration
jq . .claude/hooks/skill-rules.json
# View recent activations
tail -20 .claude/logs/skill-activations.log
# Count activations by skill
grep "Matched:" .claude/logs/skill-activations.log | sort | uniq -c
# Test specific prompt
echo '{"prompt":"your test"}' | .claude/hooks/skill-activation-prompt.sh
.claude/hooks/README.md - Complete hooks documentation.claude/skills/README.md - Skills system overviewCLAUDE.md - Main documentationNavigation: This is a smart router. For deep troubleshooting and management details, always refer to SKILLS_MANAGEMENT_GUIDE.md.
Quick help: Just ask "Check skills system health" or "Why didn't X skill activate?"