mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 21:46:40 +02:00
fix: make skill/template discovery dynamic
Replace hardcoded SKILL_FILES and TEMPLATES arrays in skill-check.ts, gen-skill-docs.ts, and dev-skill.ts with a shared discover-skills.ts utility that scans the filesystem. New skills are now picked up automatically without updating three separate lists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,16 +7,17 @@
|
||||
*/
|
||||
|
||||
import { validateSkill } from '../test/helpers/skill-parser';
|
||||
import { discoverTemplates } from './discover-skills';
|
||||
import { execSync } from 'child_process';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
|
||||
const TEMPLATES = [
|
||||
{ tmpl: path.join(ROOT, 'SKILL.md.tmpl'), output: 'SKILL.md' },
|
||||
{ tmpl: path.join(ROOT, 'browse', 'SKILL.md.tmpl'), output: 'browse/SKILL.md' },
|
||||
];
|
||||
const TEMPLATES = discoverTemplates(ROOT).map(t => ({
|
||||
tmpl: path.join(ROOT, t.tmpl),
|
||||
output: t.output,
|
||||
}));
|
||||
|
||||
function regenerateAndValidate() {
|
||||
// Regenerate
|
||||
|
||||
Reference in New Issue
Block a user