diff --git a/.github/workflows/check-skills.yml b/.github/workflows/check-skills.yml new file mode 100644 index 0000000..8ecf718 --- /dev/null +++ b/.github/workflows/check-skills.yml @@ -0,0 +1,85 @@ +name: Check skills directory + +on: + pull_request: + push: + branches: [master] + +jobs: + check-skills: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Verify all skills are exposed or explicitly skipped + run: | + set -euo pipefail + + # Collect skipped skills from .skillsrc + skipped=() + if [[ -f .skillsrc ]]; then + while IFS= read -r line; do + line="${line%%#*}" # strip inline comments + line="${line// /}" # trim whitespace + [[ -z "$line" ]] && continue + skipped+=("$line") + done < .skillsrc + fi + + is_skipped() { + local skill="$1" + for s in "${skipped[@]+"${skipped[@]}"}"; do + [[ "$s" == "$skill" ]] && return 0 + done + return 1 + } + + errors=() + + # Find every skill directory (contains a SKILL.md) + while IFS= read -r skill_md; do + skill_dir="$(dirname "$skill_md")" + # e.g. plugins/core/skills/init -> extract plugin-relative path: core/skills/init + rel="${skill_dir#plugins/}" + skill_name="$(basename "$skill_dir")" + + if is_skipped "$rel"; then + # Ensure skipped skills do NOT have a symlink + if [[ -L "skills/$skill_name" ]]; then + errors+=("Skill '$skill_name' is in .skillsrc but also symlinked in skills/") + fi + continue + fi + + # Non-skipped skills MUST have a symlink + if [[ ! -L "skills/$skill_name" ]]; then + errors+=("Skill '$skill_name' ($rel) is not symlinked in skills/ and not listed in .skillsrc") + else + # Verify the symlink target resolves correctly + if [[ ! -d "skills/$skill_name" ]]; then + errors+=("Symlink skills/$skill_name is broken (target does not exist)") + fi + fi + done < <(find plugins -name SKILL.md -type f | sort) + + # Check for symlinks pointing to non-existent skills + if [[ -d skills ]]; then + for link in skills/*; do + [[ -L "$link" ]] || continue + if [[ ! -d "$link" ]]; then + errors+=("Symlink $link is broken") + fi + done + fi + + if [[ ${#errors[@]} -gt 0 ]]; then + echo "::error::Skills directory check failed:" + for err in "${errors[@]}"; do + echo " - $err" + done + echo "" + echo "To fix: add a symlink in skills/ or add the skill to .skillsrc" + exit 1 + fi + + echo "All skills are accounted for." diff --git a/.skillsrc b/.skillsrc new file mode 100644 index 0000000..3e16873 --- /dev/null +++ b/.skillsrc @@ -0,0 +1,13 @@ +# Skills listed here are excluded from the top-level skills/ directory. +# One skill path per line, relative to the repo root (plugin/skills/skill-name). +# Lines starting with # are comments. Blank lines are ignored. +droid-control/skills/agent-browser +droid-control/skills/capture +droid-control/skills/compose +droid-control/skills/droid-cli +droid-control/skills/droid-control +droid-control/skills/pty-capture +droid-control/skills/showcase +droid-control/skills/true-input +droid-control/skills/tuistory +droid-control/skills/verify diff --git a/skills/autoresearch b/skills/autoresearch new file mode 120000 index 0000000..3d3a693 --- /dev/null +++ b/skills/autoresearch @@ -0,0 +1 @@ +../plugins/autoresearch/skills/autoresearch \ No newline at end of file diff --git a/skills/browser-navigation b/skills/browser-navigation new file mode 120000 index 0000000..d06a07b --- /dev/null +++ b/skills/browser-navigation @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/browser-navigation \ No newline at end of file diff --git a/skills/commit-security-scan b/skills/commit-security-scan new file mode 120000 index 0000000..af31032 --- /dev/null +++ b/skills/commit-security-scan @@ -0,0 +1 @@ +../plugins/security-engineer/skills/commit-security-scan \ No newline at end of file diff --git a/skills/frontend-design b/skills/frontend-design new file mode 120000 index 0000000..9e4c70d --- /dev/null +++ b/skills/frontend-design @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/frontend-design \ No newline at end of file diff --git a/skills/human-writing b/skills/human-writing new file mode 120000 index 0000000..52bae7f --- /dev/null +++ b/skills/human-writing @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/human-writing \ No newline at end of file diff --git a/skills/init b/skills/init new file mode 120000 index 0000000..0228cdc --- /dev/null +++ b/skills/init @@ -0,0 +1 @@ +../plugins/core/skills/init \ No newline at end of file diff --git a/skills/review b/skills/review new file mode 120000 index 0000000..a75dd38 --- /dev/null +++ b/skills/review @@ -0,0 +1 @@ +../plugins/core/skills/review \ No newline at end of file diff --git a/skills/security-review b/skills/security-review new file mode 120000 index 0000000..0c1ff95 --- /dev/null +++ b/skills/security-review @@ -0,0 +1 @@ +../plugins/security-engineer/skills/security-review \ No newline at end of file diff --git a/skills/session-navigation b/skills/session-navigation new file mode 120000 index 0000000..814b9b8 --- /dev/null +++ b/skills/session-navigation @@ -0,0 +1 @@ +../plugins/core/skills/session-navigation \ No newline at end of file diff --git a/skills/skill-creation b/skills/skill-creation new file mode 120000 index 0000000..442729d --- /dev/null +++ b/skills/skill-creation @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/skill-creation \ No newline at end of file diff --git a/skills/threat-model-generation b/skills/threat-model-generation new file mode 120000 index 0000000..5bf981a --- /dev/null +++ b/skills/threat-model-generation @@ -0,0 +1 @@ +../plugins/security-engineer/skills/threat-model-generation \ No newline at end of file diff --git a/skills/visual-design b/skills/visual-design new file mode 120000 index 0000000..7d24fbd --- /dev/null +++ b/skills/visual-design @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/visual-design \ No newline at end of file diff --git a/skills/vulnerability-validation b/skills/vulnerability-validation new file mode 120000 index 0000000..215090e --- /dev/null +++ b/skills/vulnerability-validation @@ -0,0 +1 @@ +../plugins/security-engineer/skills/vulnerability-validation \ No newline at end of file diff --git a/skills/wiki b/skills/wiki new file mode 120000 index 0000000..eba347d --- /dev/null +++ b/skills/wiki @@ -0,0 +1 @@ +../plugins/droid-evolved/skills/wiki \ No newline at end of file