diff options
| author | Jesse Vincent <jesse@fsck.com> | 2025-10-10 22:59:26 -0700 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2025-10-10 22:59:26 -0700 |
| commit | 015a07f7d76e62452e84afe7291d3d9381996f4f (patch) | |
| tree | 50674a71f3c025ea466199279bc2fb6749c1f935 | |
| parent | 33622d710e889093e85ea59a90aea5522b6aa196 (diff) | |
Show skills list and getting-started at session start
Session start hook now:
- Inlines full getting-started/SKILL.md content (no @ links in hooks)
- Runs find-skills and shows complete skills list
- Shows tool paths after the guide
Getting-started improvements:
- Removed "Just Read This Guide?" section (redundant with hook)
- Removed "Last thing" announcement requirement
- Tightened intro from ~80 to ~35 words
- Simplified "How to Load Skills" section
- Updated Workflow 2 to reference skills list shown at session start
- Removed redundant find-skills path examples
This eliminates friction - agents see all available skills immediately without
needing to search first. No excuse for "I didn't want to spend time searching."
| -rwxr-xr-x | hooks/session-start.sh | 12 | ||||
| -rw-r--r-- | skills/getting-started/SKILL.md | 40 |
2 files changed, 16 insertions, 36 deletions
diff --git a/hooks/session-start.sh b/hooks/session-start.sh index 3f146a4..1fad497 100755 --- a/hooks/session-start.sh +++ b/hooks/session-start.sh @@ -26,12 +26,22 @@ elif echo "$setup_output" | grep -q "setup_failed=true"; then github_recommendation="\n\n⚠️ Personal superpowers setup encountered an issue. Please file a bug at https://github.com/obra/superpowers/issues" fi +# Run find-skills to show all available skills +find_skills_output=$("${CLAUDE_PLUGIN_ROOT}/scripts/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") + +# Escape both outputs for JSON +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}') + # Output context injection as JSON cat <<EOF { "hookSpecificOutput": { "hookEventName": "SessionStart", - "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Skill tools are at:**\n- find-skills: ${CLAUDE_PLUGIN_ROOT}/scripts/find-skills\n- skill-run: ${CLAUDE_PLUGIN_ROOT}/scripts/skill-run\n\n**RIGHT NOW, go read**: @${CLAUDE_PLUGIN_ROOT}/skills/getting-started/SKILL.md${github_recommendation}\n</EXTREMELY_IMPORTANT>" + "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>" } } EOF diff --git a/skills/getting-started/SKILL.md b/skills/getting-started/SKILL.md index 3a11674..ab8c025 100644 --- a/skills/getting-started/SKILL.md +++ b/skills/getting-started/SKILL.md @@ -7,32 +7,11 @@ version: 3.1.0 # Getting Started with Skills -Two skill libraries work together: -- **Core skills** at `${CLAUDE_PLUGIN_ROOT}/skills/` (from plugin) -- **Personal skills** at `~/.config/superpowers/skills/` (yours to create and share) +Skills live in two places: +- **Core:** `${CLAUDE_PLUGIN_ROOT}/skills/` (from plugin) +- **Personal:** `~/.config/superpowers/skills/` (yours to create) -Personal skills shadow core skills when names match. - -## Just Read This Guide? - -**RIGHT NOW**: Check out all the skills you've got! - -`find-skills` with no args will show all your skills - - -**THEN**: Follow the workflows below based on what your partner is trying to do. - -## How to Reference Skills - -- Format: `skills/category/skill-name` (no @ prefix, no /SKILL.md suffix) -- Example: `skills/collaboration/brainstorming` or `skills/testing/test-driven-development` - -- Load with your Read tool when you need them. - -**When you see skill references in documentation:** -- `skills/path/name` → Check personal first (`~/.config/superpowers/skills/path/name/SKILL.md`) -- If not found, check core (`${CLAUDE_PLUGIN_ROOT}/skills/path/name/SKILL.md`) -- Load supporting files only when you need them +Personal skills shadow core when names match. To load `skills/path/name`, check personal first, then core. ## Mandatory Workflow 1: Brainstorming Before Coding @@ -49,11 +28,7 @@ Personal skills shadow core skills when names match. ## Mandatory Workflow 2: Before ANY Task -**1. Find skills** (shows all, or filter by pattern): - -```bash -find-skills [PATTERN] # Filter by grep-compatible pattern -``` +**1. Check the skills list** shown at session start, or run `find-skills [PATTERN]` to filter. **2. Check if historical context would help:** Review Workflow 3 conditions. If applicable, dispatch subagent to search past work. @@ -155,8 +130,3 @@ Your human partner's specific instructions describe WHAT to do, not HOW. **Skill has checklist?** TodoWrite for every item. **Skills are mandatory when they exist, not optional.** - - -## Last thing - -In the first response after reading this guide, you MUST announce to the user that you have read the getting started guide |
