vibe-cokit 1.7.2 → 1.8.0

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 (2) hide show
  1. package/dist/cli.js +20 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2268,7 +2268,7 @@ var REPO = "vibe-cokit/claude-code";
2268
2268
  var ANTIGRAVITY_REPO = "vibe-cokit/antigravity";
2269
2269
  var SKILLS_REPO = "vibe-cokit/skills";
2270
2270
  var CLAUDE_DIR = join(homedir(), ".claude");
2271
- var SKILLS_DIR = join(CLAUDE_DIR, "skills");
2271
+ var CLAUDE_SKILLS_DIR = join(CLAUDE_DIR, "skills");
2272
2272
  var CONFIG_FOLDERS = ["agents", "commands", "hooks", "prompts", "workflows"];
2273
2273
  var TEMP_DIR = join(homedir(), ".vibe-cokit-tmp");
2274
2274
  var SETTINGS_PATH = join(CLAUDE_DIR, "settings.json");
@@ -2367,13 +2367,13 @@ async function getRemoteSha(ref, repo = REPO) {
2367
2367
  throw new Error(`Could not resolve ref: ${target}`);
2368
2368
  return sha;
2369
2369
  }
2370
- async function copySkillFolders(srcDir) {
2371
- await mkdir(SKILLS_DIR, { recursive: true });
2370
+ async function copySkillFolders(srcDir, destDir = CLAUDE_SKILLS_DIR) {
2371
+ await mkdir(destDir, { recursive: true });
2372
2372
  const entries = await readdir(srcDir, { withFileTypes: true });
2373
2373
  for (const entry of entries) {
2374
2374
  if (entry.isDirectory() && !entry.name.startsWith(".")) {
2375
2375
  const src = join(srcDir, entry.name);
2376
- const dest = join(SKILLS_DIR, entry.name);
2376
+ const dest = join(destDir, entry.name);
2377
2377
  await cp(src, dest, { recursive: true, force: true });
2378
2378
  log(`Copied skill: ${entry.name}/`);
2379
2379
  }
@@ -2503,6 +2503,15 @@ vibe-cokit init (antigravity)
2503
2503
  await cloneRepo(tmpDir, ANTIGRAVITY_REPO);
2504
2504
  log("Copying agent config to .agents/...");
2505
2505
  await copyAgentFolder(tmpDir);
2506
+ const skillsTmpDir = join2(TEMP_DIR, crypto.randomUUID());
2507
+ try {
2508
+ log("Cloning skills repository...");
2509
+ await cloneRepo(skillsTmpDir, SKILLS_REPO);
2510
+ log("Installing skills to .agents/skills/...");
2511
+ await copySkillFolders(skillsTmpDir, join2(process.cwd(), ".agents", "skills"));
2512
+ } finally {
2513
+ await cleanup(skillsTmpDir);
2514
+ }
2506
2515
  log("Updating .gitignore...");
2507
2516
  await ensureGitignore(".agents");
2508
2517
  log("Updating version tracking...");
@@ -2569,7 +2578,7 @@ vibe-cokit update (${agentType})
2569
2578
  break;
2570
2579
  case "antigravity":
2571
2580
  await updateAntigravity(ref);
2572
- await updateSkills(ref);
2581
+ await updateSkills(ref, join3(process.cwd(), ".agents", "skills"));
2573
2582
  break;
2574
2583
  }
2575
2584
  console.log(`
@@ -2614,7 +2623,7 @@ async function updateConfig(ref) {
2614
2623
  await cleanup(tmpDir);
2615
2624
  }
2616
2625
  }
2617
- async function updateSkills(ref) {
2626
+ async function updateSkills(ref, destDir) {
2618
2627
  const tmpDir = join3(TEMP_DIR, crypto.randomUUID());
2619
2628
  try {
2620
2629
  log("Checking skills version...");
@@ -2631,8 +2640,9 @@ async function updateSkills(ref) {
2631
2640
  log(`Checking out ${ref}...`);
2632
2641
  await exec3("git", ["-C", tmpDir, "checkout", ref]);
2633
2642
  }
2634
- log("Updating skills in ~/.claude/skills/");
2635
- await copySkillFolders(tmpDir);
2643
+ const target = destDir ?? CLAUDE_SKILLS_DIR;
2644
+ log(`Updating skills in ${target}/`);
2645
+ await copySkillFolders(tmpDir, target);
2636
2646
  const sha = await getCommitSha(tmpDir);
2637
2647
  await updateSkillsVersion(sha);
2638
2648
  const from = currentSha ? currentSha.slice(0, 8) : "none";
@@ -3158,7 +3168,7 @@ vibe-cokit doctor
3158
3168
  issues++;
3159
3169
  }
3160
3170
  }
3161
- if (await dirExists(SKILLS_DIR)) {
3171
+ if (await dirExists(CLAUDE_SKILLS_DIR)) {
3162
3172
  console.log(` \u2713 ~/.claude/skills/`);
3163
3173
  } else {
3164
3174
  console.log(` \u2717 ~/.claude/skills/ missing \u2014 run \`vk skills\``);
@@ -3252,7 +3262,7 @@ vibe-cokit doctor fix
3252
3262
  log("Config: OK");
3253
3263
  log("CLAUDE.md: OK");
3254
3264
  }
3255
- const skillsMissing = !await dirExists(SKILLS_DIR) || !await getSkillsVersion();
3265
+ const skillsMissing = !await dirExists(CLAUDE_SKILLS_DIR) || !await getSkillsVersion();
3256
3266
  if (skillsMissing) {
3257
3267
  log("Skills missing \u2014 installing...");
3258
3268
  const tmpDir = join7(TEMP_DIR, crypto.randomUUID());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-cokit",
3
- "version": "1.7.2",
3
+ "version": "1.8.0",
4
4
  "description": "A toolkit for interacting with Claude Code",
5
5
  "module": "index.ts",
6
6
  "type": "module",