Add prefixed command option to avoid conflicts

Users can now toggle "Prefix commands with /i-" in the download section
to get bundles with all commands prefixed (e.g., /i-audit instead of /audit).
This helps avoid conflicts with existing custom commands.

Build system changes:
- Transformers now accept optional prefix/outputSuffix parameters
- Build generates both unprefixed and i-prefixed variants
- ZIP bundles created for both variants

UI changes:
- Add toggle switch to download section
- Toggle controls which bundle variant gets downloaded
- Styled to match existing design language

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-01-07 20:06:36 -08:00
co-authored by Claude Opus 4.5
parent 8a4e4bd380
commit 3083f8addc
103 changed files with 14852 additions and 24 deletions
+11 -4
View File
@@ -53,9 +53,14 @@ These anti-patterns are baked into training data from countless generic template
* Reference files are copied to skill subdirectories
*
* Note: Agent Skills in Cursor require nightly channel and are agent-decided rules.
*
* @param {Object} options - Optional settings
* @param {string} options.prefix - Prefix to add to command names (e.g., 'i-')
* @param {string} options.outputSuffix - Suffix for output directory (e.g., '-prefixed')
*/
export function transformCursor(commands, skills, distDir, patterns = null) {
const cursorDir = path.join(distDir, 'cursor');
export function transformCursor(commands, skills, distDir, patterns = null, options = {}) {
const { prefix = '', outputSuffix = '' } = options;
const cursorDir = path.join(distDir, `cursor${outputSuffix}`);
const commandsDir = path.join(cursorDir, '.cursor/commands');
const skillsDir = path.join(cursorDir, '.cursor/skills');
@@ -65,8 +70,9 @@ export function transformCursor(commands, skills, distDir, patterns = null) {
// Commands: Body only (Cursor doesn't support command frontmatter/args)
for (const command of commands) {
const commandName = `${prefix}${command.name}`;
const commandBody = replacePlaceholders(command.body, 'cursor');
const outputPath = path.join(commandsDir, `${command.name}.md`);
const outputPath = path.join(commandsDir, `${commandName}.md`);
writeFile(outputPath, commandBody);
}
@@ -100,5 +106,6 @@ export function transformCursor(commands, skills, distDir, patterns = null) {
}
const refInfo = refCount > 0 ? ` (${refCount} reference files)` : '';
console.log(`✓ Cursor: ${commands.length} commands, ${skills.length} skills${refInfo}`);
const prefixInfo = prefix ? ` [${prefix}prefixed]` : '';
console.log(`✓ Cursor${prefixInfo}: ${commands.length} commands, ${skills.length} skills${refInfo}`);
}