mirror of
https://github.com/obra/superpowers.git
synced 2026-04-25 11:09:05 +08:00
Add list-skills tool for Claude
- Shell script (not .md) that lists all skill names - Shows paths like 'testing/test-driven-development' - Helps Claude avoid useless skill searches - Added to getting-started workflow
This commit is contained in:
22
skills/getting-started/list-skills
Executable file
22
skills/getting-started/list-skills
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# list-skills - Show all available skill names without descriptions
|
||||
# For Claude to quickly see what exists before searching
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Detect if running from repo or installed location
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [[ "$SCRIPT_DIR" == *"/.claude/plugins/cache/"* ]]; then
|
||||
# Installed as plugin
|
||||
SKILLS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
else
|
||||
# Running from repo
|
||||
SKILLS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
fi
|
||||
|
||||
# Find all SKILL.md files and extract their paths
|
||||
find "$SKILLS_DIR" -name "SKILL.md" -type f | \
|
||||
sed "s|$SKILLS_DIR/||; s|/SKILL.md||" | \
|
||||
sort
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user