@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.
Files changed (32) hide show
  1. package/dist/index.js +39 -97
  2. package/package.json +1 -1
  3. package/templates/.claude/agents/dependency-manager.md +0 -1
  4. package/templates/.claude/agents/deployment-validator.md +0 -1
  5. package/templates/.claude/agents/designer.md +0 -1
  6. package/templates/.claude/agents/document-writer.md +0 -1
  7. package/templates/.claude/agents/implementation-executor.md +0 -1
  8. package/templates/.claude/agents/ko-to-en-translator.md +0 -1
  9. package/templates/.claude/agents/lint-fixer.md +0 -1
  10. package/templates/hono/docs/library/consola/index.md +687 -0
  11. package/templates/nextjs/docs/library/consola/index.md +680 -0
  12. package/templates/tanstack-start/docs/library/consola/index.md +673 -0
  13. package/templates/.claude/skills/stitch-design/README.md +0 -34
  14. package/templates/.claude/skills/stitch-design/SKILL.md +0 -213
  15. package/templates/.claude/skills/stitch-design/examples/DESIGN.md +0 -154
  16. package/templates/.claude/skills/stitch-loop/README.md +0 -54
  17. package/templates/.claude/skills/stitch-loop/SKILL.md +0 -316
  18. package/templates/.claude/skills/stitch-loop/examples/SITE.md +0 -73
  19. package/templates/.claude/skills/stitch-loop/examples/next-prompt.md +0 -25
  20. package/templates/.claude/skills/stitch-loop/resources/baton-schema.md +0 -61
  21. package/templates/.claude/skills/stitch-loop/resources/site-template.md +0 -104
  22. package/templates/.claude/skills/stitch-react/README.md +0 -36
  23. package/templates/.claude/skills/stitch-react/SKILL.md +0 -323
  24. package/templates/.claude/skills/stitch-react/examples/gold-standard-card.tsx +0 -88
  25. package/templates/.claude/skills/stitch-react/package-lock.json +0 -231
  26. package/templates/.claude/skills/stitch-react/package.json +0 -16
  27. package/templates/.claude/skills/stitch-react/resources/architecture-checklist.md +0 -15
  28. package/templates/.claude/skills/stitch-react/resources/component-template.tsx +0 -37
  29. package/templates/.claude/skills/stitch-react/resources/stitch-api-reference.md +0 -14
  30. package/templates/.claude/skills/stitch-react/resources/style-guide.json +0 -24
  31. package/templates/.claude/skills/stitch-react/scripts/fetch-stitch.sh +0 -30
  32. 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 FRAMEWORK_SPECIFIC_SKILLS_MAP = {
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
- "docs-creator",
251
- "docs-refactor",
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 skillsToCopy = /* @__PURE__ */ new Set();
283
- const skillTemplateMap = /* @__PURE__ */ new Map();
284
- COMMON_SKILLS.forEach((skill) => skillsToCopy.add(skill));
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(skillSrc)) {
299
- if (await fs4.pathExists(skillDest)) {
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
- const duplicateSkills = [];
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 (templates) => {
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 hasFrameworkSkills = templates.some((template) => {
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.8");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kood/claude-code",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "Claude Code documentation installer for projects",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -2,7 +2,6 @@
2
2
  name: dependency-manager
3
3
  description: package.json 의존성 분석, 업데이트, 보안 취약점 스캔. npm audit/outdated 기반 안전한 업데이트 제안.
4
4
  tools: Read, Edit, Bash, Grep
5
- model: sonnet
6
5
  permissionMode: default
7
6
  ---
8
7
 
@@ -2,7 +2,6 @@
2
2
  name: deployment-validator
3
3
  description: 배포 전 typecheck/lint/build 전체 검증 및 수정. 모든 단계 통과 필수.
4
4
  tools: Read, Edit, Bash, mcp__sequential-thinking__sequentialthinking
5
- model: sonnet
6
5
  permissionMode: default
7
6
  ---
8
7
 
@@ -2,7 +2,6 @@
2
2
  name: designer
3
3
  description: 2026 트렌드 기반 UI/UX 디자인. AI/공간/키네틱 타이포/적응형 테마 통합. 미적 우수성 + 기능적 코드 품질.
4
4
  tools: Read, Write, Edit, Grep, Glob, Bash, WebSearch
5
- model: sonnet
6
5
  permissionMode: default
7
6
  ---
8
7
 
@@ -2,7 +2,6 @@
2
2
  name: document-writer
3
3
  description: Anthropic Context Engineering 원칙 기반 고밀도 문서 작성/업데이트
4
4
  tools: Read, Write, Edit, Glob, Grep
5
- model: haiku
6
5
  ---
7
6
 
8
7
  @../../instructions/agent-patterns/parallel-execution.md
@@ -2,7 +2,6 @@
2
2
  name: implementation-executor
3
3
  description: 계획 또는 작업을 Sequential Thinking으로 분석하여 즉시 구현. 옵션 제시 없이 바로 실행.
4
4
  tools: Read, Write, Edit, Grep, Glob, Task, TodoWrite, mcp__sequential-thinking__sequentialthinking
5
- model: sonnet
6
5
  permissionMode: default
7
6
  ---
8
7
 
@@ -2,7 +2,6 @@
2
2
  name: ko-to-en-translator
3
3
  description: 한글 문서/코드 주석을 영어로 번역. 번역 전 웹 검색으로 주의점 파악 및 적용
4
4
  tools: Read, WebSearch, Edit
5
- model: haiku
6
5
  ---
7
6
 
8
7
  @../../instructions/agent-patterns/parallel-execution.md
@@ -2,7 +2,6 @@
2
2
  name: lint-fixer
3
3
  description: 코드 작성/수정 후 tsc/eslint 오류 수정. 간단한 오류는 즉시 수정, 복잡한 오류만 Sequential Thinking 사용.
4
4
  tools: Read, Edit, Bash, mcp__sequential-thinking__sequentialthinking
5
- model: sonnet
6
5
  permissionMode: default
7
6
  ---
8
7