Skip to content

Commit c574ee3

Browse files
authored
Add installer skill discovery (#4)
* Add installer skill listing * Test installer skill listing * Document installer skill listing
1 parent efae294 commit c574ee3

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
python -m py_compile scripts/install_skills.py
2323
bash install.sh --help
2424
25+
list_output="$(bash install.sh --list)"
26+
printf '%s\n' "$list_output" | grep -q '^Available skills:$'
27+
printf '%s\n' "$list_output" | grep -q '^- reduce-to-facts$'
28+
printf '%s\n' "$list_output" | grep -q '^- status-update$'
29+
2530
tmp_home="$(mktemp -d)"
2631
HOME="$tmp_home" ./install.sh --claude-user --dry-run
2732
test ! -e "$tmp_home/.claude/skills"

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ git clone https://github.com/tmusser/context-to-action-skills.git
4444
cd context-to-action-skills
4545
```
4646

47+
See the available skill names:
48+
49+
```sh
50+
./install.sh --list
51+
```
52+
4753
Then choose one install target.
4854

4955
Claude Code:

install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,17 @@
22
set -eu
33

44
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
5+
6+
case "${1:-}" in
7+
--list)
8+
printf '%s\n' "Available skills:"
9+
for skill_file in "$SCRIPT_DIR"/skills/*/SKILL.md; do
10+
[ -f "$skill_file" ] || continue
11+
skill_dir=${skill_file%/SKILL.md}
12+
printf '%s\n' "- ${skill_dir##*/}"
13+
done
14+
exit 0
15+
;;
16+
esac
17+
518
exec python3 "$SCRIPT_DIR/scripts/install_skills.py" "$@"

0 commit comments

Comments
 (0)