fix: install skills at top-level .claude/skills/ for CI discovery

Claude Code discovers project skills from .claude/skills/<name>/SKILL.md
at the top level only. Nesting under .claude/skills/gstack/<name>/ caused
Claude to see only one "gstack" skill instead of individual skills like
/ship, /qa, /review. This explains 10/11 routing failures in CI — Claude
invoked "gstack" or used Bash directly instead of routing to specific skills.

Also adds workflow_dispatch trigger and --user runner container option.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-23 08:56:02 -07:00
parent fcbd2b729e
commit 55f9bb46c9
+5 -1
View File
@@ -59,8 +59,12 @@ function installSkills(tmpDir: string) {
const srcPath = path.join(ROOT, skill, 'SKILL.md');
if (!fs.existsSync(srcPath)) continue;
// Install skills at TOP level of .claude/skills/ so Claude Code discovers
// each as a separate invocable skill. Nesting under .claude/skills/gstack/
// only works for personal skills (~/.claude/skills/) — project-level skills
// need to be top-level for discovery.
const destDir = skill
? path.join(tmpDir, '.claude', 'skills', 'gstack', skill)
? path.join(tmpDir, '.claude', 'skills', skill)
: path.join(tmpDir, '.claude', 'skills', 'gstack');
fs.mkdirSync(destDir, { recursive: true });
fs.copyFileSync(srcPath, path.join(destDir, 'SKILL.md'));