Skip to content

fix(skills): store gate scripts as real files, not symlinks - #312

Merged
sgraczyk merged 1 commit into
mainfrom
fix-311-skill-symlinks
Sep 10, 2026
Merged

fix(skills): store gate scripts as real files, not symlinks#312
sgraczyk merged 1 commit into
mainfrom
fix-311-skill-symlinks

Conversation

@sgraczyk

@sgraczyk sgraczyk commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Replaces the 4 skill gate-script symlinks with identical file copies, so per-skill-dir installers no longer reject the skills with 'skill package path escapes source root'.

Closes #311

Changes:

  • skills/spec/scripts/spec-dir.sh, validate-spec.sh, skills/implement/scripts/validate-implementation.sh, and skills/document/scripts/doc-gates.sh are now real executable files (byte-identical to scripts/ root copies, verified with cmp). No SKILL.md changes: the relative scripts/ path is unchanged.
  • New scripts/check-skill-links.sh fails when a tracked symlink under skills/ points outside its own skill folder, resolves to a missing target, or disagrees with the working tree. Includes scripts/check-skill-links.test.bats (6 tests).
  • Wired into make lint and the CI plugin-validation job.

Verification:

  • New tests: 6/6 pass. check-script-permissions tests: 8/8 pass. Gate-script suites (spec-dir, validate-spec, validate-implementation, doc-gates, install) pass in the unit run.
  • Copied spec-dir.sh runs from the skill dir. Simulated per-skill install (cp -R of one skill folder): 0 symlinks, 0 dangling, content intact.
  • Pre-existing failures unrelated to this change (missing jq and shellcheck on this host; same validate-plugin and version-sync tests fail on base).

Note: the skill copies can drift from the scripts/ root copies. A sync check is possible later. This PR keeps scope to the issue.

Per-skill-dir installers reject paths that escape the skill root.
Replace the 4 symlinks with identical copies. Add check-skill-links.sh
(with tests) to block escaping links. Wire the check into lint and CI.
@sgraczyk
sgraczyk merged commit 145f93e into main Sep 10, 2026
6 checks passed
@sgraczyk
sgraczyk deleted the fix-311-skill-symlinks branch September 10, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills fail external validation: gate scripts are symlinks outside the skill dir

1 participant