prizmkit 1.0.22 → 1.0.23
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 +3 -3
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/src/scaffold.js +15 -24
package/bundled/VERSION.json
CHANGED
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -165,37 +165,28 @@ async function installSkills(platform, skills, projectRoot, dryRun) {
|
|
|
165
165
|
const hasAssets = await fs.pathExists(path.join(corePath, 'assets'));
|
|
166
166
|
const hasScripts = await fs.pathExists(path.join(corePath, 'scripts'));
|
|
167
167
|
|
|
168
|
+
// Always write the command file at the flat level (.claude/commands/skillName.md)
|
|
169
|
+
// so Claude Code shows it as /skillName (not /skillName:skillName).
|
|
170
|
+
// Assets/scripts are copied into a subdirectory for reference.
|
|
171
|
+
const commandsDir = path.join(projectRoot, '.claude', 'commands');
|
|
172
|
+
if (dryRun) {
|
|
173
|
+
console.log(chalk.gray(` [dry-run] .claude/commands/${skillName}.md`));
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
await fs.ensureDir(commandsDir);
|
|
177
|
+
await fs.writeFile(path.join(commandsDir, `${skillName}.md`), converted);
|
|
178
|
+
|
|
168
179
|
if (hasAssets || hasScripts) {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
console.log(chalk.gray(` [dry-run] .claude/commands/${skillName}/`));
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
await fs.ensureDir(targetDir);
|
|
175
|
-
await fs.writeFile(
|
|
176
|
-
path.join(targetDir, `${skillName}.md`),
|
|
177
|
-
converted
|
|
178
|
-
);
|
|
180
|
+
const assetTargetDir = path.join(commandsDir, skillName);
|
|
181
|
+
await fs.ensureDir(assetTargetDir);
|
|
179
182
|
for (const subdir of ['assets', 'scripts']) {
|
|
180
183
|
const srcSubdir = path.join(corePath, subdir);
|
|
181
184
|
if (await fs.pathExists(srcSubdir)) {
|
|
182
|
-
await fs.copy(srcSubdir, path.join(
|
|
185
|
+
await fs.copy(srcSubdir, path.join(assetTargetDir, subdir));
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
|
-
console.log(chalk.green(` ✓ .claude/commands/${skillName}/`));
|
|
186
|
-
} else {
|
|
187
|
-
const targetDir = path.join(projectRoot, '.claude', 'commands');
|
|
188
|
-
if (dryRun) {
|
|
189
|
-
console.log(chalk.gray(` [dry-run] .claude/commands/${skillName}.md`));
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
await fs.ensureDir(targetDir);
|
|
193
|
-
await fs.writeFile(
|
|
194
|
-
path.join(targetDir, `${skillName}.md`),
|
|
195
|
-
converted
|
|
196
|
-
);
|
|
197
|
-
console.log(chalk.green(` ✓ .claude/commands/${skillName}.md`));
|
|
198
188
|
}
|
|
189
|
+
console.log(chalk.green(` ✓ .claude/commands/${skillName}.md`));
|
|
199
190
|
}
|
|
200
191
|
}
|
|
201
192
|
}
|