Skip to content

fix(skill-check): honor primary host skipSkills in Templates check#1430

Open
EricXu-0805 wants to merge 1 commit into
garrytan:mainfrom
EricXu-0805:fix/skill-check-honor-skipskills
Open

fix(skill-check): honor primary host skipSkills in Templates check#1430
EricXu-0805 wants to merge 1 commit into
garrytan:mainfrom
EricXu-0805:fix/skill-check-honor-skipskills

Conversation

@EricXu-0805
Copy link
Copy Markdown

@EricXu-0805 EricXu-0805 commented May 11, 2026

Summary

scripts/skill-check.ts Templates section flags claude/SKILL.md as ❌ generated file missing! and exits 1, even though hosts/claude.ts has generation.skipSkills: ['claude'] and gen-skill-docs.ts correctly skips generating it. This is an inconsistency between the generator (honors skipSkills) and the checker (doesn't).

Root cause

scripts/gen-skill-docs.ts:510-516 already filters skills by skipSkills/includeSkills per the current host config — so claude/SKILL.md never gets generated for the Claude host.

scripts/skill-check.ts:75-79 iterates discoverTemplates(ROOT) and naively checks fs.existsSync(outPath) without consulting any host config. Result: the legitimately-skipped claude/SKILL.md shows up as a hard failure, killing bun run skill:check with exit 1.

Fix

Import the primary host (claude) and check its skipSkills set before flagging missing outputs. The change mirrors the existing logic in gen-skill-docs.ts so check and generation stay aligned.

11 added lines in scripts/skill-check.ts. No behavior change when skipSkills is empty (the default for most hosts) or when a missing output is unrelated to skipSkills.

Test plan

Pre-patch (with default hosts/claude.ts skipSkills: ['claude']):

$ bun run gen:skill-docs       # claude/SKILL.md correctly NOT generated
$ bun run skill:check
…
  ❌ claude/SKILL.md                — generated file missing! Run: bun run gen:skill-docs
…
error: script "skill:check" exited with code 1
$ echo $?
1

Post-patch:

$ bun run skill:check
…
  -  claude/SKILL.md                — skipped per claude host config
…
$ echo $?
0

All other checks remain unchanged.

Notes

Spotted while running /gstack-upgrade on a fresh clone after v1.31.1.0 — the upgrade itself succeeded cleanly (binaries rebuilt, 338 tests pass), but bun run skill:check exited 1 on the cosmetic claude/SKILL.md false positive. No functional impact for users, but the check should be self-consistent.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

When `hosts/claude.ts` has `generation.skipSkills: ['claude']` (the existing
config — the /claude outside-voice skill is intentionally for non-Claude hosts),
`bun run gen:skill-docs` correctly skips generating `claude/SKILL.md`. But
`scripts/skill-check.ts` Templates section still flags it as `❌ generated file
missing!` and the script exits 1.

Fix: mirror the same `skipSkills` filter that `gen-skill-docs.ts` already uses
(see `scripts/gen-skill-docs.ts:510-516`). Read the primary host's skipSkills
once, then in the Templates loop, if the output file is missing AND the skill
dir is in skipSkills, log it as `- skipped per <host> host config` and skip
the error flag instead of marking it missing.

Impact: `bun run skill:check` now exits 0 for any host config that uses
`skipSkills`. No behavior change when skipSkills is empty (default for most
hosts) or when the skipped skill's output is in fact missing for some other
reason.

Test plan: configure `skipSkills: ['claude']` (default `hosts/claude.ts`),
run `bun run gen:skill-docs`, confirm `claude/SKILL.md` is not generated, then
`bun run skill:check` — before the patch, exit=1 with `❌ claude/SKILL.md —
generated file missing!`; after the patch, exit=0 with `- claude/SKILL.md —
skipped per claude host config`.
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.

1 participant