mirror of https://github.com/garrytan/gstack.git
fix(skill-check): skip missing template validation for skipped primary host skills
This commit is contained in:
parent
c7ae63201a
commit
732c1dd542
|
|
@ -13,6 +13,7 @@ import { discoverTemplates, discoverSkillFiles } from './discover-skills';
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { execSync } from 'child_process';
|
||||
import { claude } from '../hosts/index';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
const ROOT_REALPATH = fs.realpathSync(ROOT);
|
||||
|
|
@ -64,6 +65,7 @@ for (const file of SKILL_FILES) {
|
|||
|
||||
console.log('\n Templates:');
|
||||
const TEMPLATES = discoverTemplates(ROOT);
|
||||
const claudeSkipSkills = new Set(claude.generation.skipSkills || []);
|
||||
|
||||
for (const { tmpl, output } of TEMPLATES) {
|
||||
const tmplPath = path.join(ROOT, tmpl);
|
||||
|
|
@ -72,6 +74,11 @@ for (const { tmpl, output } of TEMPLATES) {
|
|||
console.log(` \u26a0\ufe0f ${output.padEnd(30)} — no template`);
|
||||
continue;
|
||||
}
|
||||
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(outPath)) {
|
||||
hasErrors = true;
|
||||
console.log(` \u274c ${output.padEnd(30)} — generated file missing! Run: bun run gen:skill-docs`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue