mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 23:56:29 +03:00
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:
co-authored by
Claude Opus 4.5
parent
8a4e4bd380
commit
3083f8addc
@@ -51,9 +51,14 @@ These anti-patterns are baked into training data from countless generic template
|
||||
* Commands: Uses argument-hint format with $VARIABLE placeholders in .codex/prompts/
|
||||
* Skills: Uses Agent Skills standard with SKILL.md in .codex/skills/{name}/
|
||||
* Reference files are copied to skill subdirectories
|
||||
*
|
||||
* @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 transformCodex(commands, skills, distDir, patterns = null) {
|
||||
const codexDir = path.join(distDir, 'codex');
|
||||
export function transformCodex(commands, skills, distDir, patterns = null, options = {}) {
|
||||
const { prefix = '', outputSuffix = '' } = options;
|
||||
const codexDir = path.join(distDir, `codex${outputSuffix}`);
|
||||
const promptsDir = path.join(codexDir, '.codex/prompts');
|
||||
const skillsDir = path.join(codexDir, '.codex/skills');
|
||||
|
||||
@@ -63,6 +68,7 @@ export function transformCodex(commands, skills, distDir, patterns = null) {
|
||||
|
||||
// Commands: Transform to Codex prompt format
|
||||
for (const command of commands) {
|
||||
const commandName = `${prefix}${command.name}`;
|
||||
const yamlLines = ['---'];
|
||||
yamlLines.push(`description: ${command.description}`);
|
||||
|
||||
@@ -84,7 +90,7 @@ export function transformCodex(commands, skills, distDir, patterns = null) {
|
||||
});
|
||||
|
||||
const content = `${yamlLines.join('\n')}\n\n${body}`;
|
||||
const outputPath = path.join(promptsDir, `${command.name}.md`);
|
||||
const outputPath = path.join(promptsDir, `${commandName}.md`);
|
||||
writeFile(outputPath, content);
|
||||
}
|
||||
|
||||
@@ -118,5 +124,6 @@ export function transformCodex(commands, skills, distDir, patterns = null) {
|
||||
}
|
||||
|
||||
const refInfo = refCount > 0 ? ` (${refCount} reference files)` : '';
|
||||
console.log(`✓ Codex: ${commands.length} prompts, ${skills.length} skills${refInfo}`);
|
||||
const prefixInfo = prefix ? ` [${prefix}prefixed]` : '';
|
||||
console.log(`✓ Codex${prefixInfo}: ${commands.length} prompts, ${skills.length} skills${refInfo}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user