prizmkit 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundled/VERSION.json
CHANGED
|
@@ -64,15 +64,14 @@ export function convertSkillToCommand(skillContent, skillName) {
|
|
|
64
64
|
description: desc,
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
// Rewrite ${SKILL_DIR} references to
|
|
67
|
+
// Rewrite ${SKILL_DIR} references to .claude/command-assets/<name>
|
|
68
|
+
// Assets are stored outside .claude/commands/ to prevent Claude Code from
|
|
69
|
+
// registering asset .md files as slash commands (e.g. /skillName:assets:file).
|
|
68
70
|
let convertedBody = body;
|
|
69
71
|
|
|
70
|
-
// Replace ${SKILL_DIR} with a Claude Code compatible path
|
|
71
|
-
// In Claude Code, commands in a directory can reference sibling files
|
|
72
|
-
// Use project-root-relative paths as fallback
|
|
73
72
|
convertedBody = convertedBody.replace(
|
|
74
73
|
/\$\{SKILL_DIR\}/g,
|
|
75
|
-
`.claude/
|
|
74
|
+
`.claude/command-assets/${skillName}`
|
|
76
75
|
);
|
|
77
76
|
|
|
78
77
|
// Replace "invoke the X skill" or "prizmkit.X" patterns with /X slash command
|
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -177,7 +177,9 @@ async function installSkills(platform, skills, projectRoot, dryRun) {
|
|
|
177
177
|
await fs.writeFile(path.join(commandsDir, `${skillName}.md`), converted);
|
|
178
178
|
|
|
179
179
|
if (hasAssets || hasScripts) {
|
|
180
|
-
|
|
180
|
+
// Place assets/scripts outside .claude/commands/ to prevent Claude Code
|
|
181
|
+
// from registering them as slash commands (e.g. /skillName:assets:file).
|
|
182
|
+
const assetTargetDir = path.join(projectRoot, '.claude', 'command-assets', skillName);
|
|
181
183
|
await fs.ensureDir(assetTargetDir);
|
|
182
184
|
for (const subdir of ['assets', 'scripts']) {
|
|
183
185
|
const srcSubdir = path.join(corePath, subdir);
|
|
@@ -708,11 +710,24 @@ export async function scaffold(config) {
|
|
|
708
710
|
}
|
|
709
711
|
}
|
|
710
712
|
|
|
711
|
-
// 10.
|
|
713
|
+
// 10. Clean up stray .codebuddy/ directory left by third-party tools (e.g. npx skills)
|
|
714
|
+
// when installing for Claude Code only. CodeBuddy files should never appear in a
|
|
715
|
+
// claude-only install.
|
|
716
|
+
if (!dryRun && !platforms.includes('codebuddy')) {
|
|
717
|
+
const strayCbDir = path.join(projectRoot, '.codebuddy');
|
|
718
|
+
if (await fs.pathExists(strayCbDir)) {
|
|
719
|
+
const entries = await fs.readdir(strayCbDir);
|
|
720
|
+
if (entries.length === 0) {
|
|
721
|
+
await fs.remove(strayCbDir);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// 11. Git pre-commit hook
|
|
712
727
|
console.log(chalk.blue(' Git Hook:'));
|
|
713
728
|
await installGitHook(projectRoot, dryRun);
|
|
714
729
|
|
|
715
|
-
//
|
|
730
|
+
// 12. PrizmKit scripts (always installed)
|
|
716
731
|
console.log(chalk.blue(' PrizmKit 脚本:'));
|
|
717
732
|
await installPrizmkitScripts(projectRoot, dryRun);
|
|
718
733
|
|