mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-08-12 18:07:26 +02:00
add hooks session starter
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# swe-skills session start hook
|
||||
# Injects the using-swe-skills meta-skill into every new session
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SKILLS_DIR="$(dirname "$SCRIPT_DIR")/skills"
|
||||
META_SKILL="$SKILLS_DIR/using-swe-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": "swe-skills loaded. Use the skill discovery flowchart to find the right skill for your task.\n\n$CONTENT"
|
||||
}
|
||||
EOF
|
||||
else
|
||||
echo '{"priority": "INFO", "message": "swe-skills: using-swe-skills meta-skill not found. Skills may still be available individually."}'
|
||||
fi
|
||||
Reference in New Issue
Block a user