Discover and apply best practice skills automatically. Gap analysis scans the codebase, skill-search fills gaps from the registry, skill-classifier separates proactive from reactive skills, quality-standards generates CLAUDE.md guidance, self-review compares code against checklists, and verification-strategy sets up test/lint/typecheck feedback loops.
86
86%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
#!/bin/bash
# skill-discovery: PostToolUse hook for Bash — fires after git commit
#
# Suggests running the self-review skill after committing.
# Reads proactive skills from state and lists their paths.
INPUT=$(cat)
COMMAND=$(echo "$INPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('tool_input',{}).get('command',''))" 2>/dev/null)
if ! echo "$COMMAND" | grep -q "git commit"; then
echo '{}'
exit 0
fi
STATE_FILE=".skill-discovery-state.json"
# Get proactive skill paths from state
SKILL_PATHS=""
if [ -f "$STATE_FILE" ]; then
SKILL_PATHS=$(python3 -c "
import json, os
with open('$STATE_FILE') as f:
state = json.load(f)
paths = state.get('proactiveSkills', [])
paths = [p for p in paths if os.path.isfile(p)]
if paths:
print('\n'.join(paths))
" 2>/dev/null)
fi
# Fall back to all installed SKILL.md files if no proactive list
if [ -z "$SKILL_PATHS" ]; then
SKILL_PATHS=$(find .tessl/tiles -name "SKILL.md" 2>/dev/null | sort)
fi
if [ -z "$SKILL_PATHS" ]; then
echo '{}'
exit 0
fi
PATHS_LIST=$(echo "$SKILL_PATHS" | sed 's/^/- /' | tr '\n' '\\' | sed 's/\\/\\n/g')
cat <<EOF
{
"hookSpecificOutput": {
"hookEventName": "PostToolUse",
"additionalContext": "SELF-REVIEW: You just committed. Use the self-review skill now:\\n\\n1. Read EVERY proactive skill's checklist section:\\n${PATHS_LIST}\\n2. For each checklist item, read the relevant source file in YOUR code\\n3. If a pattern from a skill is missing in your code, fix it now\\n\\nDo not skip this. Read the actual SKILL.md files and compare against your actual code."
}
}
EOF