2026-02-15 14:28:13 -08:00
|
|
|
#!/bin/bash
|
2026-02-23 12:02:07 +01:00
|
|
|
# agent-skills session start hook
|
|
|
|
|
# Injects the using-agent-skills meta-skill into every new session
|
2026-02-15 14:28:13 -08:00
|
|
|
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
|
SKILLS_DIR="$(dirname "$SCRIPT_DIR")/skills"
|
2026-02-23 12:02:07 +01:00
|
|
|
META_SKILL="$SKILLS_DIR/using-agent-skills/SKILL.md"
|
2026-02-15 14:28:13 -08:00
|
|
|
|
|
|
|
|
if [ -f "$META_SKILL" ]; then
|
|
|
|
|
CONTENT=$(cat "$META_SKILL")
|
|
|
|
|
# Output as JSON for Claude Code hook consumption
|
|
|
|
|
cat <<EOF
|
|
|
|
|
{
|
|
|
|
|
"priority": "IMPORTANT",
|
2026-02-23 12:02:07 +01:00
|
|
|
"message": "agent-skills loaded. Use the skill discovery flowchart to find the right skill for your task.\n\n$CONTENT"
|
2026-02-15 14:28:13 -08:00
|
|
|
}
|
|
|
|
|
EOF
|
|
|
|
|
else
|
2026-02-23 12:02:07 +01:00
|
|
|
echo '{"priority": "INFO", "message": "agent-skills: using-agent-skills meta-skill not found. Skills may still be available individually."}'
|
2026-02-15 14:28:13 -08:00
|
|
|
fi
|