Prefix all skills (incl. frontend-design), fix cross-references, move toggle inline

- Prefix ALL skills in prefixed bundles, not just user-invokable ones
- Add prefixSkillReferences() to update /skillname and "the skillname skill"
  cross-references in skill body text when prefixing
- Add prefix/outputSuffix support to agents transformer
- Move prefix toggle inline next to the download ZIP button for better discoverability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-03-05 10:12:36 -08:00
co-authored by Claude Opus 4.6
parent ee7eeae301
commit aadaee5c37
9 changed files with 4010 additions and 48 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
import path from 'path';
import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders } from '../utils.js';
import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders, prefixSkillReferences } from '../utils.js';
/**
* Codex Transformer (Skills Only)
@@ -23,9 +23,10 @@ export function transformCodex(skills, distDir, patterns = null, options = {}) {
cleanDir(codexDir);
ensureDir(skillsDir);
const allSkillNames = skills.map(s => s.name);
let refCount = 0;
for (const skill of skills) {
const skillName = skill.userInvokable ? `${prefix}${skill.name}` : skill.name;
const skillName = `${prefix}${skill.name}`;
const skillDir = path.join(skillsDir, skillName);
const frontmatterObj = {
@@ -45,6 +46,7 @@ export function transformCodex(skills, distDir, patterns = null, options = {}) {
const frontmatter = generateYamlFrontmatter(frontmatterObj);
let skillBody = replacePlaceholders(skill.body, 'codex');
if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames);
// For user-invokable skills, transform remaining {{argname}} to $ARGNAME
if (skill.userInvokable) {
skillBody = skillBody.replace(/\{\{([^}]+)\}\}/g, (match, argName) => {