An agentic skills framework & software development methodology that works.
Update hooks to use skills repository from ~/.config/superpowers/skills
Jesse Vincent5b0b08682948
diff --git a/commands/brainstorm.md b/commands/brainstorm.mdindex 89b7f225d..2ca6e3c46 100644--- a/commands/brainstorm.md+++ b/commands/brainstorm.md@@ -2,4 +2,4 @@description: Interactive design refinement using Socratic method----Read and follow: ${CLAUDE_PLUGIN_ROOT}/skills/collaboration/brainstorming/SKILL.md+Read and follow: ${SUPERPOWERS_SKILLS_ROOT}/skills/collaboration/brainstorming/SKILL.mddiff --git a/commands/execute-plan.md b/commands/execute-plan.mdindex 33f98efa1..0d268a63c 100644--- a/commands/execute-plan.md+++ b/commands/execute-plan.md@@ -2,4 +2,4 @@description: Execute plan in batches with review checkpoints----Read and follow: ${CLAUDE_PLUGIN_ROOT}/skills/collaboration/executing-plans/SKILL.md+Read and follow: ${SUPERPOWERS_SKILLS_ROOT}/skills/collaboration/executing-plans/SKILL.mddiff --git a/commands/write-plan.md b/commands/write-plan.mdindex d9f653489..48cb43507 100644--- a/commands/write-plan.md+++ b/commands/write-plan.md@@ -2,4 +2,4 @@description: Create detailed implementation plan with bite-sized tasks----Read and follow: ${CLAUDE_PLUGIN_ROOT}/skills/collaboration/writing-plans/SKILL.md+Read and follow: ${SUPERPOWERS_SKILLS_ROOT}/skills/collaboration/writing-plans/SKILL.mddiff --git a/hooks/session-start.sh b/hooks/session-start.shindex 1fad497ad..b27032213 100755--- a/hooks/session-start.sh+++ b/hooks/session-start.sh@@ -3,8 +3,15 @@set -euo pipefail-# Run personal superpowers setup+# Set SUPERPOWERS_SKILLS_ROOT environment variable+export SUPERPOWERS_SKILLS_ROOT="${HOME}/.config/superpowers/skills"++# Run skills initialization script (handles clone/fetch/notification)SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"+init_output=$("${PLUGIN_ROOT}/lib/initialize-skills.sh" 2>&1 || echo "")++# Run personal superpowers setupsetup_output=$("${SCRIPT_DIR}/setup-personal-superpowers.sh" 2>&1 || echo "setup_failed=true")# Use same directory resolution as setup script@@ -27,21 +34,28 @@ elif echo "$setup_output" | grep -q "setup_failed=true"; thenfi# Run find-skills to show all available skills-find_skills_output=$("${CLAUDE_PLUGIN_ROOT}/scripts/find-skills" 2>&1 || echo "Error running find-skills")+find_skills_output=$("${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills" 2>&1 || echo "Error running find-skills")-# Read getting-started content-getting_started_content=$(cat "${CLAUDE_PLUGIN_ROOT}/skills/getting-started/SKILL.md" 2>&1 || echo "Error reading getting-started")+# Read using-skills content (renamed from getting-started)+using_skills_content=$(cat "${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/SKILL.md" 2>&1 || echo "Error reading using-skills")-# Escape both outputs for JSON+# Escape outputs for JSON+init_escaped=$(echo "$init_output" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')find_skills_escaped=$(echo "$find_skills_output" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')-getting_started_escaped=$(echo "$getting_started_content" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')+using_skills_escaped=$(echo "$using_skills_content" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')++# Build initialization output message if present+init_message=""+if [ -n "$init_escaped" ]; then+ init_message="${init_escaped}\n\n"+fi# Output context injection as JSONcat <<EOF{"hookSpecificOutput": {"hookEventName": "SessionStart",- "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**The content below is from skills/getting-started/SKILL.md - your introduction to using skills:**\n\n${getting_started_escaped}\n\n**Tool paths (use these when you need to search for or run skills):**\n- find-skills: ${CLAUDE_PLUGIN_ROOT}/scripts/find-skills\n- skill-run: ${CLAUDE_PLUGIN_ROOT}/scripts/skill-run\n\n**Available skills (output of find-skills):**\n\n${find_skills_escaped}${github_recommendation}\n</EXTREMELY_IMPORTANT>"+ "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n${init_message}**The content below is from skills/using-skills/SKILL.md - your introduction to using skills:**\n\n${using_skills_escaped}\n\n**Tool paths (use these when you need to search for or run skills):**\n- find-skills: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills\n- skill-run: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/skill-run\n\n**Available skills (output of find-skills):**\n\n${find_skills_escaped}${github_recommendation}\n</EXTREMELY_IMPORTANT>"}}EOF