@kood/claude-code 0.5.8 → 0.5.10
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/dist/index.js +39 -97
- package/package.json +1 -1
- package/templates/.claude/agents/dependency-manager.md +0 -1
- package/templates/.claude/agents/deployment-validator.md +0 -1
- package/templates/.claude/agents/designer.md +0 -1
- package/templates/.claude/agents/document-writer.md +0 -1
- package/templates/.claude/agents/implementation-executor.md +0 -1
- package/templates/.claude/agents/ko-to-en-translator.md +0 -1
- package/templates/.claude/agents/lint-fixer.md +0 -1
- package/templates/hono/docs/library/consola/index.md +687 -0
- package/templates/nextjs/docs/library/consola/index.md +680 -0
- package/templates/tanstack-start/docs/library/consola/index.md +673 -0
- package/templates/.claude/skills/stitch-design/README.md +0 -34
- package/templates/.claude/skills/stitch-design/SKILL.md +0 -213
- package/templates/.claude/skills/stitch-design/examples/DESIGN.md +0 -154
- package/templates/.claude/skills/stitch-loop/README.md +0 -54
- package/templates/.claude/skills/stitch-loop/SKILL.md +0 -316
- package/templates/.claude/skills/stitch-loop/examples/SITE.md +0 -73
- package/templates/.claude/skills/stitch-loop/examples/next-prompt.md +0 -25
- package/templates/.claude/skills/stitch-loop/resources/baton-schema.md +0 -61
- package/templates/.claude/skills/stitch-loop/resources/site-template.md +0 -104
- package/templates/.claude/skills/stitch-react/README.md +0 -36
- package/templates/.claude/skills/stitch-react/SKILL.md +0 -323
- package/templates/.claude/skills/stitch-react/examples/gold-standard-card.tsx +0 -88
- package/templates/.claude/skills/stitch-react/package-lock.json +0 -231
- package/templates/.claude/skills/stitch-react/package.json +0 -16
- package/templates/.claude/skills/stitch-react/resources/architecture-checklist.md +0 -15
- package/templates/.claude/skills/stitch-react/resources/component-template.tsx +0 -37
- package/templates/.claude/skills/stitch-react/resources/stitch-api-reference.md +0 -14
- package/templates/.claude/skills/stitch-react/resources/style-guide.json +0 -24
- package/templates/.claude/skills/stitch-react/scripts/fetch-stitch.sh +0 -30
- package/templates/.claude/skills/stitch-react/scripts/validate.js +0 -77
package/dist/index.js
CHANGED
|
@@ -236,24 +236,16 @@ import fs4 from "fs-extra";
|
|
|
236
236
|
import path6 from "path";
|
|
237
237
|
|
|
238
238
|
// src/shared/constants.ts
|
|
239
|
-
var
|
|
240
|
-
nextjs: ["nextjs-react-best-practices", "korea-uiux-design", "figma-to-code"],
|
|
241
|
-
"tanstack-start": [
|
|
242
|
-
"tanstack-start-react-best-practices",
|
|
243
|
-
"korea-uiux-design",
|
|
244
|
-
"figma-to-code"
|
|
245
|
-
]
|
|
246
|
-
// hono와 npx는 프레임워크별 스킬 없음
|
|
247
|
-
};
|
|
248
|
-
var COMMON_SKILLS = [
|
|
239
|
+
var UI_SKILLS = [
|
|
249
240
|
"global-uiux-design",
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
"plan",
|
|
253
|
-
"prd",
|
|
254
|
-
"ralph",
|
|
255
|
-
"execute"
|
|
241
|
+
"korea-uiux-design",
|
|
242
|
+
"figma-to-code"
|
|
256
243
|
];
|
|
244
|
+
var NON_UI_TEMPLATES = ["hono", "npx"];
|
|
245
|
+
var FRAMEWORK_SPECIFIC_SKILLS = {
|
|
246
|
+
nextjs: ["nextjs-react-best-practices"],
|
|
247
|
+
"tanstack-start": ["tanstack-start-react-best-practices"]
|
|
248
|
+
};
|
|
257
249
|
|
|
258
250
|
// src/features/extras/extras-copier.ts
|
|
259
251
|
var createExtrasCopier = (extrasType) => {
|
|
@@ -271,6 +263,26 @@ var createExtrasCopier = (extrasType) => {
|
|
|
271
263
|
var copyCommands = createExtrasCopier("commands");
|
|
272
264
|
var copyAgents = createExtrasCopier("agents");
|
|
273
265
|
var copyInstructions = createExtrasCopier("instructions");
|
|
266
|
+
var getAllSkills = async (skillsSrc) => {
|
|
267
|
+
const entries = await fs4.readdir(skillsSrc, { withFileTypes: true });
|
|
268
|
+
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
269
|
+
};
|
|
270
|
+
var getSkillsToInstall = (allSkills, templates) => {
|
|
271
|
+
const isNonUITemplate = templates.some((t) => NON_UI_TEMPLATES.includes(t));
|
|
272
|
+
return allSkills.filter((skill) => {
|
|
273
|
+
if (isNonUITemplate && UI_SKILLS.includes(skill)) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
for (const [framework, skills] of Object.entries(
|
|
277
|
+
FRAMEWORK_SPECIFIC_SKILLS
|
|
278
|
+
)) {
|
|
279
|
+
if (skills.includes(skill) && !templates.includes(framework)) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return true;
|
|
284
|
+
});
|
|
285
|
+
};
|
|
274
286
|
var copySkills = async (templates, targetDir) => {
|
|
275
287
|
const counter = { files: 0, directories: 0 };
|
|
276
288
|
const targetSkillsDir = path6.join(targetDir, ".claude", "skills");
|
|
@@ -279,42 +291,17 @@ var copySkills = async (templates, targetDir) => {
|
|
|
279
291
|
return counter;
|
|
280
292
|
}
|
|
281
293
|
await fs4.ensureDir(targetSkillsDir);
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
for (const template of templates) {
|
|
286
|
-
const skills = FRAMEWORK_SPECIFIC_SKILLS_MAP[template] || [];
|
|
287
|
-
skills.forEach((skill) => {
|
|
288
|
-
skillsToCopy.add(skill);
|
|
289
|
-
if (!skillTemplateMap.has(skill)) {
|
|
290
|
-
skillTemplateMap.set(skill, /* @__PURE__ */ new Set());
|
|
291
|
-
}
|
|
292
|
-
skillTemplateMap.get(skill).add(template);
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
for (const skill of skillsToCopy) {
|
|
294
|
+
const allSkills = await getAllSkills(skillsSrc);
|
|
295
|
+
const skillsToInstall = getSkillsToInstall(allSkills, templates);
|
|
296
|
+
for (const skill of skillsToInstall) {
|
|
296
297
|
const skillSrc = path6.join(skillsSrc, skill);
|
|
297
298
|
const skillDest = path6.join(targetSkillsDir, skill);
|
|
298
|
-
if (await fs4.pathExists(
|
|
299
|
-
|
|
300
|
-
await fs4.remove(skillDest);
|
|
301
|
-
}
|
|
302
|
-
await copyRecursive(skillSrc, skillDest, counter);
|
|
299
|
+
if (await fs4.pathExists(skillDest)) {
|
|
300
|
+
await fs4.remove(skillDest);
|
|
303
301
|
}
|
|
302
|
+
await copyRecursive(skillSrc, skillDest, counter);
|
|
304
303
|
}
|
|
305
|
-
|
|
306
|
-
for (const [skill, templateSet] of skillTemplateMap.entries()) {
|
|
307
|
-
if (templateSet.size > 1) {
|
|
308
|
-
duplicateSkills.push({
|
|
309
|
-
skill,
|
|
310
|
-
templates: Array.from(templateSet).sort()
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return {
|
|
315
|
-
...counter,
|
|
316
|
-
...duplicateSkills.length > 0 && { duplicateSkills }
|
|
317
|
-
};
|
|
304
|
+
return counter;
|
|
318
305
|
};
|
|
319
306
|
|
|
320
307
|
// src/features/extras/extras-checker.ts
|
|
@@ -340,16 +327,13 @@ var checkExistingClaudeFiles = async (targetDir) => {
|
|
|
340
327
|
}
|
|
341
328
|
return existingFiles;
|
|
342
329
|
};
|
|
343
|
-
var checkAllExtrasExist = async (
|
|
330
|
+
var checkAllExtrasExist = async (_templates) => {
|
|
344
331
|
const claudeDir = path7.join(getTemplatesDir(), ".claude");
|
|
332
|
+
const skillsSrc = path7.join(claudeDir, "skills");
|
|
345
333
|
const commandsSrc = path7.join(claudeDir, "commands");
|
|
346
334
|
const agentsSrc = path7.join(claudeDir, "agents");
|
|
347
335
|
const instructionsSrc = path7.join(claudeDir, "instructions");
|
|
348
|
-
const
|
|
349
|
-
const skills = FRAMEWORK_SPECIFIC_SKILLS_MAP[template];
|
|
350
|
-
return skills && skills.length > 0;
|
|
351
|
-
});
|
|
352
|
-
const hasSkills = COMMON_SKILLS.length > 0 || hasFrameworkSkills;
|
|
336
|
+
const hasSkills = await hasFiles(skillsSrc);
|
|
353
337
|
const hasCommands = await hasFiles(commandsSrc);
|
|
354
338
|
const hasAgents = await hasFiles(agentsSrc);
|
|
355
339
|
const hasInstructions = await hasFiles(instructionsSrc);
|
|
@@ -367,15 +351,6 @@ async function promptConfirm(message, initial = false) {
|
|
|
367
351
|
});
|
|
368
352
|
return { confirmed: response.confirmed ?? false };
|
|
369
353
|
}
|
|
370
|
-
async function promptSelect(message, choices) {
|
|
371
|
-
const response = await prompts({
|
|
372
|
-
type: "select",
|
|
373
|
-
name: "value",
|
|
374
|
-
message,
|
|
375
|
-
choices
|
|
376
|
-
});
|
|
377
|
-
return { value: response.value };
|
|
378
|
-
}
|
|
379
354
|
async function promptMultiselect(message, choices, options) {
|
|
380
355
|
const response = await prompts({
|
|
381
356
|
type: "multiselect",
|
|
@@ -489,32 +464,6 @@ async function handleDuplicateFiles(existingClaudeFiles, force) {
|
|
|
489
464
|
);
|
|
490
465
|
return response.confirmed;
|
|
491
466
|
}
|
|
492
|
-
async function handleDuplicateSkills(duplicateSkills, templates, targetDir) {
|
|
493
|
-
logger.blank();
|
|
494
|
-
logger.warn("The following skills are included in multiple templates:");
|
|
495
|
-
duplicateSkills.forEach(({ skill, templates: skillTemplates }) => {
|
|
496
|
-
logger.step(`${skill} (${skillTemplates.join(", ")})`);
|
|
497
|
-
});
|
|
498
|
-
logger.blank();
|
|
499
|
-
const response = await promptSelect(
|
|
500
|
-
"Which template's version should be used?",
|
|
501
|
-
templates.map((t) => ({
|
|
502
|
-
title: t,
|
|
503
|
-
value: t
|
|
504
|
-
}))
|
|
505
|
-
);
|
|
506
|
-
if (response.value) {
|
|
507
|
-
logger.info(`Reinstalling skills with ${response.value} template...`);
|
|
508
|
-
const reinstallResult = await copySkills([response.value], targetDir);
|
|
509
|
-
logger.success(
|
|
510
|
-
`Skills: ${reinstallResult.files} files, ${reinstallResult.directories} directories`
|
|
511
|
-
);
|
|
512
|
-
return reinstallResult;
|
|
513
|
-
} else {
|
|
514
|
-
logger.warn("No template selected. Using all templates.");
|
|
515
|
-
return { files: 0, directories: 0 };
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
467
|
async function installSkillsIfNeeded(templates, targetDir, shouldInstall, hasSkills) {
|
|
519
468
|
if (!shouldInstall) {
|
|
520
469
|
return { files: 0, directories: 0 };
|
|
@@ -526,13 +475,6 @@ async function installSkillsIfNeeded(templates, targetDir, shouldInstall, hasSki
|
|
|
526
475
|
logger.blank();
|
|
527
476
|
logger.info("Installing skills...");
|
|
528
477
|
const skillsResult = await copySkills(templates, targetDir);
|
|
529
|
-
if (skillsResult.duplicateSkills && skillsResult.duplicateSkills.length > 0) {
|
|
530
|
-
return await handleDuplicateSkills(
|
|
531
|
-
skillsResult.duplicateSkills,
|
|
532
|
-
templates,
|
|
533
|
-
targetDir
|
|
534
|
-
);
|
|
535
|
-
}
|
|
536
478
|
logger.success(
|
|
537
479
|
`Skills: ${skillsResult.files} files, ${skillsResult.directories} directories`
|
|
538
480
|
);
|
|
@@ -854,7 +796,7 @@ var init = async (options) => {
|
|
|
854
796
|
|
|
855
797
|
// src/index.ts
|
|
856
798
|
var program = new Command();
|
|
857
|
-
program.name("claude-code").description("Claude Code documentation installer for projects").version("0.5.
|
|
799
|
+
program.name("claude-code").description("Claude Code documentation installer for projects").version("0.5.10");
|
|
858
800
|
program.option(
|
|
859
801
|
"-t, --template <names>",
|
|
860
802
|
"template names (comma-separated: tanstack-start,hono)"
|
package/package.json
CHANGED