blob: 1b482b0661b488bc702a5d0e02357aed198e8c00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
# agent-skills session start hook
# Injects the using-agent-skills meta-skill into every new session
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS_DIR="$(dirname "$SCRIPT_DIR")/skills"
META_SKILL="$SKILLS_DIR/using-agent-skills/SKILL.md"
if [ -f "$META_SKILL" ]; then
CONTENT=$(cat "$META_SKILL")
# Output as JSON for Claude Code hook consumption
cat <<EOF
{
"priority": "IMPORTANT",
"message": "agent-skills loaded. Use the skill discovery flowchart to find the right skill for your task.\n\n$CONTENT"
}
EOF
else
echo '{"priority": "INFO", "message": "agent-skills: using-agent-skills meta-skill not found. Skills may still be available individually."}'
fi
|