Skip to content

fix(skill-check): skip missing template validation for skipped primar… - #2034

Closed
dammanhdungvn wants to merge 1 commit into
garrytan:mainfrom
dammanhdungvn:fix/skill-check-skipped-claude-skill
Closed

dammanhdungvn wants to merge 1 commit into
garrytan:mainfrom
dammanhdungvn:fix/skill-check-skipped-claude-skill

Conversation

@dammanhdungvn

Copy link
Copy Markdown

…y host skills

@trunk-io

trunk-io Bot commented Jun 17, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@dammanhdungvn

Copy link
Copy Markdown
Author

no comment

@fiestyelf

Copy link
Copy Markdown

Logic bug: skip guard is unreachable for missing templates

The guard fires after the !fs.existsSync(tmplPath) check, so skipped skills with no template still print ⚠️ — no template and the skip block is never reached.

Current (broken order):

if (!fs.existsSync(tmplPath)) {
  console.log(`  ⚠️  ${output.padEnd(30)} — no template`);
  continue;  // exits here before skip guard
}
const dirName = path.dirname(tmpl);
if (dirName !== '.' && claudeSkipSkills.has(dirName)) {  // dead for missing templates
  ...
}

Fix — move skip guard above the existence check:

const dirName = path.dirname(tmpl);
if (dirName !== '.' && claudeSkipSkills.has(dirName)) {
  console.log(`  ✅ ${tmpl.padEnd(30)} → (skipped for primary host ${claude.displayName})`);
  continue;
}
if (!fs.existsSync(tmplPath)) {
  console.log(`  ⚠️  ${output.padEnd(30)} — no template`);
  continue;
}

Two other minor nits while here:

  • || [] → ?? [] (nullish coalescing is safer for optional arrays)
  • Three separate import statements from '../hosts/index' — can consolidate to one: import { claude, getExternalHosts, ALL_HOST_CONFIGS } from '../hosts/index';

@time-attack

time-attack commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

@dammanhdungvn Please rewrite the validation so skill:check does not require claude/SKILL.md when the Claude host intentionally skips that primary-host output.

@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @dammanhdungvn. The fix is now on main: skill:check was rewritten to validate the generator's actual outputs, so it no longer requires templates for host-skipped skills (scripts/skill-check.ts) (fixed in v1.87.6.0, #2898). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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.

3 participants