Add unified scripts system with find-skills and run

Consolidates skill discovery and adds generic runner for cross-platform compatibility.

Changes:
- Created scripts/find-skills: Unified tool (show all + filter by pattern)
  - Shows descriptions by default
  - Searches personal first, then core (shadowing)
  - Logs searches for gap analysis
  - Bash 3.2 compatible

- Created scripts/run: Generic runner for any skill script
  - Searches personal superpowers first, then core
  - Enables running arbitrary skill scripts without CLAUDE_PLUGIN_ROOT env var
  - Example: scripts/run skills/collaboration/remembering-conversations/tool/search-conversations

- Fixed bash 3.2 compatibility in list-skills, skills-search
  - Replaced associative arrays with newline-delimited lists
  - Works on macOS default bash (3.2) and Linux bash 4+

- Updated all documentation to reference scripts/find-skills
- Removed redundant wrapper scripts

This solves the CLAUDE_PLUGIN_ROOT environment variable issue - scripts
can now be called from anywhere without needing the env var set.
This commit is contained in:
Jesse Vincent
2025-10-10 20:37:04 -07:00
parent c023e803ac
commit 16b764689a
8 changed files with 234 additions and 28 deletions

View File

@@ -81,7 +81,7 @@ gh repo edit --add-topic superpowers
**Personal skills shadow core skills** - if you have `~/.config/superpowers/skills/testing/test-driven-development/SKILL.md`, it will be used instead of the core version.
The `list-skills` and `skills-search` tools automatically search both locations with deduplication.
The `find-skills` tool automatically searches both locations with deduplication.
## Writing Skills
@@ -145,7 +145,7 @@ File a bug at https://github.com/obra/superpowers/issues
**Personal skills not being found:**
- Check `~/.config/superpowers/skills/` exists
- Verify skill has `SKILL.md` file
- Run `${CLAUDE_PLUGIN_ROOT}/skills/getting-started/list-skills` to see if it appears
- Run `${CLAUDE_PLUGIN_ROOT}/scripts/find-skills` to see if it appears
**GitHub push failed:**
- Check `gh auth status`

View File

@@ -576,7 +576,7 @@ Deploying untested skills = deploying untested code. It's a violation of quality
How future Claude finds your skill:
1. **Encounters problem** ("tests are flaky")
2. **Searches skills** using `skills-search` tool (checks personal then core)
2. **Searches skills** using `find-skills` tool (checks personal then core)
3. **Finds SKILL.md** (rich when_to_use matches)
4. **Scans overview** (is this relevant?)
5. **Reads patterns** (quick reference table)