mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 13:15:24 +02:00
Merge remote-tracking branch 'origin/main' into garrytan/askuser-one-at-a-time
Resolved conflicts: - VERSION: take main's 0.11.17.0 (newer) - CHANGELOG.md: keep main's 0.11.17.0 entry, drop our stale 0.11.16.2 entry - SKILL.md, benchmark/SKILL.md, browse/SKILL.md, setup-browser-cookies/SKILL.md: regenerated from templates via bun run gen:skill-docs
This commit is contained in:
@@ -3012,17 +3012,6 @@ function processTemplate(tmplPath: string, host: Host = 'claude'): { outputPath:
|
||||
throw new Error(`Unresolved placeholders in ${relTmplPath}: ${remaining.join(', ')}`);
|
||||
}
|
||||
|
||||
// Inject auto-trigger guard into skill descriptions.
|
||||
// Adds explicit trigger criteria so Claude Code doesn't auto-fire skills
|
||||
// based on semantic similarity. Preserves existing "Use when" and
|
||||
// "Proactively suggest" text (both are tested in skill-validation.test.ts).
|
||||
const triggerGuard = ` MANUAL TRIGGER ONLY: invoke only when user types /${skillName}.\n`;
|
||||
const descMatch = content.match(/^(description:\s*\|?\s*\n)/m);
|
||||
if (descMatch && descMatch.index !== undefined) {
|
||||
const insertAt = descMatch.index + descMatch[0].length;
|
||||
content = content.slice(0, insertAt) + triggerGuard + content.slice(insertAt);
|
||||
}
|
||||
|
||||
// For codex host: transform frontmatter and replace Claude-specific paths
|
||||
if (host === 'codex') {
|
||||
// Extract hook safety prose BEFORE transforming frontmatter (which strips hooks)
|
||||
|
||||
Reference in New Issue
Block a user