Skip to content

Commit 5e938b7

Browse files
Merge pull request #22 from Factory-AI/dgu/top-level-skills
feat: add top level skills folder with links to inner skills
2 parents 144d9ed + fdf2230 commit 5e938b7

16 files changed

Lines changed: 112 additions & 0 deletions

.github/workflows/check-skills.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Check skills directory
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
check-skills:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Verify all skills are exposed or explicitly skipped
15+
run: |
16+
set -euo pipefail
17+
18+
# Collect skipped skills from .skillsrc
19+
skipped=()
20+
if [[ -f .skillsrc ]]; then
21+
while IFS= read -r line; do
22+
line="${line%%#*}" # strip inline comments
23+
line="${line// /}" # trim whitespace
24+
[[ -z "$line" ]] && continue
25+
skipped+=("$line")
26+
done < .skillsrc
27+
fi
28+
29+
is_skipped() {
30+
local skill="$1"
31+
for s in "${skipped[@]+"${skipped[@]}"}"; do
32+
[[ "$s" == "$skill" ]] && return 0
33+
done
34+
return 1
35+
}
36+
37+
errors=()
38+
39+
# Find every skill directory (contains a SKILL.md)
40+
while IFS= read -r skill_md; do
41+
skill_dir="$(dirname "$skill_md")"
42+
# e.g. plugins/core/skills/init -> extract plugin-relative path: core/skills/init
43+
rel="${skill_dir#plugins/}"
44+
skill_name="$(basename "$skill_dir")"
45+
46+
if is_skipped "$rel"; then
47+
# Ensure skipped skills do NOT have a symlink
48+
if [[ -L "skills/$skill_name" ]]; then
49+
errors+=("Skill '$skill_name' is in .skillsrc but also symlinked in skills/")
50+
fi
51+
continue
52+
fi
53+
54+
# Non-skipped skills MUST have a symlink
55+
if [[ ! -L "skills/$skill_name" ]]; then
56+
errors+=("Skill '$skill_name' ($rel) is not symlinked in skills/ and not listed in .skillsrc")
57+
else
58+
# Verify the symlink target resolves correctly
59+
if [[ ! -d "skills/$skill_name" ]]; then
60+
errors+=("Symlink skills/$skill_name is broken (target does not exist)")
61+
fi
62+
fi
63+
done < <(find plugins -name SKILL.md -type f | sort)
64+
65+
# Check for symlinks pointing to non-existent skills
66+
if [[ -d skills ]]; then
67+
for link in skills/*; do
68+
[[ -L "$link" ]] || continue
69+
if [[ ! -d "$link" ]]; then
70+
errors+=("Symlink $link is broken")
71+
fi
72+
done
73+
fi
74+
75+
if [[ ${#errors[@]} -gt 0 ]]; then
76+
echo "::error::Skills directory check failed:"
77+
for err in "${errors[@]}"; do
78+
echo " - $err"
79+
done
80+
echo ""
81+
echo "To fix: add a symlink in skills/ or add the skill to .skillsrc"
82+
exit 1
83+
fi
84+
85+
echo "All skills are accounted for."

.skillsrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Skills listed here are excluded from the top-level skills/ directory.
2+
# One skill path per line, relative to the repo root (plugin/skills/skill-name).
3+
# Lines starting with # are comments. Blank lines are ignored.
4+
droid-control/skills/agent-browser
5+
droid-control/skills/capture
6+
droid-control/skills/compose
7+
droid-control/skills/droid-cli
8+
droid-control/skills/droid-control
9+
droid-control/skills/pty-capture
10+
droid-control/skills/showcase
11+
droid-control/skills/true-input
12+
droid-control/skills/tuistory
13+
droid-control/skills/verify

skills/autoresearch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/autoresearch/skills/autoresearch

skills/browser-navigation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/droid-evolved/skills/browser-navigation

skills/commit-security-scan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/security-engineer/skills/commit-security-scan

skills/frontend-design

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/droid-evolved/skills/frontend-design

skills/human-writing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/droid-evolved/skills/human-writing

skills/init

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/core/skills/init

skills/review

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/core/skills/review

skills/security-review

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../plugins/security-engineer/skills/security-review

0 commit comments

Comments
 (0)