@iceinvein/agent-skills 0.1.28 → 0.1.29

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/index.js +42 -12
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -1278,6 +1278,18 @@ async function checkForUpdates(cwd) {
1278
1278
  }
1279
1279
  }
1280
1280
 
1281
+ // src/cli/lockfile.ts
1282
+ import { join as join8 } from "node:path";
1283
+ var LOCKFILE_NAME2 = ".agent-skills.lock";
1284
+ async function readLockfile2(cwd) {
1285
+ const path = join8(cwd, LOCKFILE_NAME2);
1286
+ const file = Bun.file(path);
1287
+ if (!await file.exists()) {
1288
+ return { skills: {} };
1289
+ }
1290
+ return file.json();
1291
+ }
1292
+
1281
1293
  // src/cli/types.ts
1282
1294
  var TOOL_NAMES2 = ["claude", "cursor", "codex", "gemini"];
1283
1295
 
@@ -3150,8 +3162,19 @@ async function pickActivation(skillName, modes) {
3150
3162
 
3151
3163
  // src/cli/index.ts
3152
3164
  import { mkdirSync as mkdirSync4 } from "fs";
3153
- import { join as join8 } from "path";
3165
+ import { join as join9 } from "path";
3154
3166
  import { homedir } from "os";
3167
+ async function otherScopeSkillCount(currentDir) {
3168
+ const home = homedir();
3169
+ const otherDir = currentDir === home ? process.cwd() : home;
3170
+ if (otherDir === currentDir)
3171
+ return { scope: "global", count: 0 };
3172
+ const lockfile = await readLockfile2(otherDir);
3173
+ return {
3174
+ scope: otherDir === home ? "global" : "local",
3175
+ count: Object.keys(lockfile.skills).length
3176
+ };
3177
+ }
3155
3178
  function resolveInstallDir(flags) {
3156
3179
  if (flags.global !== undefined || flags.g !== undefined) {
3157
3180
  return homedir();
@@ -3243,7 +3266,7 @@ async function resolveTargetTools(installDir, isGlobal, flags) {
3243
3266
  for (const tool of picked) {
3244
3267
  const dir = TOOL_DIRS[tool];
3245
3268
  if (dir)
3246
- mkdirSync4(join8(installDir, dir), { recursive: true });
3269
+ mkdirSync4(join9(installDir, dir), { recursive: true });
3247
3270
  }
3248
3271
  return picked;
3249
3272
  }
@@ -3357,18 +3380,25 @@ Installing ${names.length} skills...
3357
3380
  `);
3358
3381
  const results = await updateAllSkills(updateDir);
3359
3382
  if (results.length === 0) {
3360
- console.log("No skills installed.");
3361
- break;
3362
- }
3363
- for (const r of results) {
3364
- if (!r.ok) {
3365
- console.error(` \u2717 ${r.name}: ${r.error}`);
3366
- } else if (r.from === r.to) {
3367
- console.log(` \u2298 ${r.name} already up to date (v${r.to})`);
3368
- } else {
3369
- console.log(` \u2713 ${r.name} v${r.from} \u2192 v${r.to}`);
3383
+ console.log("No skills installed in this scope.");
3384
+ } else {
3385
+ for (const r of results) {
3386
+ if (!r.ok) {
3387
+ console.error(` \u2717 ${r.name}: ${r.error}`);
3388
+ } else if (r.from === r.to) {
3389
+ console.log(` \u2298 ${r.name} already up to date (v${r.to})`);
3390
+ } else {
3391
+ console.log(` \u2713 ${r.name} v${r.from} \u2192 v${r.to}`);
3392
+ }
3370
3393
  }
3371
3394
  }
3395
+ const other = await otherScopeSkillCount(updateDir);
3396
+ if (other.count > 0) {
3397
+ const command2 = other.scope === "global" ? "agent-skills update --all -g" : "agent-skills update --all";
3398
+ const noun = other.count === 1 ? "skill" : "skills";
3399
+ console.log(`
3400
+ Note: ${other.count} ${noun} installed in the ${other.scope} scope. Run \`${command2}\` to update those too.`);
3401
+ }
3372
3402
  break;
3373
3403
  }
3374
3404
  const skillName = args[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iceinvein/agent-skills",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Install agent skills into AI coding tools",
5
5
  "author": "iceinvein",
6
6
  "license": "MIT",