@iceinvein/agent-skills 0.18.2 → 0.18.3

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/cli/index.js CHANGED
@@ -425,6 +425,7 @@ function resolveBundlePaths(entries, bundle) {
425
425
 
426
426
  // src/cli/adapters/claude.ts
427
427
  import { chmodSync, existsSync as existsSync2, mkdirSync, rmSync, rmdirSync, statSync, unlinkSync } from "node:fs";
428
+ import { homedir } from "node:os";
428
429
  import { dirname, join as join2 } from "node:path";
429
430
  function shouldBeExecutable(relPath, content) {
430
431
  if (relPath.endsWith(".sh"))
@@ -455,6 +456,12 @@ function matchesSkillDirective(hook, skillName, directive) {
455
456
  return true;
456
457
  return hook.command.includes(`Activate ${skillName} skill`);
457
458
  }
459
+ function commandRunsScript(command, scriptPath, settingsPath) {
460
+ const home = homedir();
461
+ const config = dirname(settingsPath);
462
+ const expanded = command.replaceAll("${CLAUDE_CONFIG_DIR:-$HOME/.claude}", config).replaceAll("${CLAUDE_CONFIG_DIR:-${HOME}/.claude}", config).replaceAll("${CLAUDE_CONFIG_DIR}", config).replaceAll("$CLAUDE_CONFIG_DIR", config).replaceAll("${HOME}", home).replaceAll("$HOME", home).replaceAll("~/", `${home}/`);
463
+ return expanded.includes(scriptPath);
464
+ }
458
465
  async function wireSessionStartHook(settingsPath, skillName, directive, scriptPath) {
459
466
  let settings = {};
460
467
  if (existsSync2(settingsPath)) {
@@ -480,8 +487,9 @@ async function wireSessionStartHook(settingsPath, skillName, directive, scriptPa
480
487
  const plain = hook.skill !== undefined || hook.command === legacy;
481
488
  if (!plain) {
482
489
  custom = true;
483
- if (scriptPath && hook.command?.includes(scriptPath))
490
+ if (scriptPath && commandRunsScript(hook.command ?? "", scriptPath, settingsPath)) {
484
491
  customRunsScript = true;
492
+ }
485
493
  kept.push(hook);
486
494
  continue;
487
495
  }
@@ -3421,9 +3429,9 @@ async function pickActivation(skillName, modes) {
3421
3429
  // src/cli/index.ts
3422
3430
  import { mkdirSync as mkdirSync4 } from "fs";
3423
3431
  import { join as join11 } from "path";
3424
- import { homedir } from "os";
3432
+ import { homedir as homedir2 } from "os";
3425
3433
  async function otherScopeSkillCount(currentDir) {
3426
- const home = homedir();
3434
+ const home = homedir2();
3427
3435
  const otherDir = currentDir === home ? process.cwd() : home;
3428
3436
  if (otherDir === currentDir)
3429
3437
  return { scope: "global", count: 0 };
@@ -3435,7 +3443,7 @@ async function otherScopeSkillCount(currentDir) {
3435
3443
  }
3436
3444
  function resolveInstallDir(flags) {
3437
3445
  if (flags.global !== undefined || flags.g !== undefined) {
3438
- return homedir();
3446
+ return homedir2();
3439
3447
  }
3440
3448
  return process.cwd();
3441
3449
  }
@@ -3572,7 +3580,7 @@ async function main() {
3572
3580
  case "install":
3573
3581
  case "browse": {
3574
3582
  const installDir = resolveInstallDir(flags);
3575
- const isGlobal = installDir === homedir();
3583
+ const isGlobal = installDir === homedir2();
3576
3584
  let names = args;
3577
3585
  if (names.length === 0 || command === "browse") {
3578
3586
  if (!process.stdin.isTTY) {
@@ -3773,7 +3781,7 @@ ${m.name} v${m.version}`);
3773
3781
  break;
3774
3782
  }
3775
3783
  if (command !== "update") {
3776
- const checkDir = flags.global !== undefined || flags.g !== undefined ? homedir() : process.cwd();
3784
+ const checkDir = flags.global !== undefined || flags.g !== undefined ? homedir2() : process.cwd();
3777
3785
  const outdated = await checkForUpdates(checkDir);
3778
3786
  if (outdated.length > 0) {
3779
3787
  const list = outdated.map((s) => `${s.name} (v${s.installed} \u2192 v${s.latest})`).join(", ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iceinvein/agent-skills",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "Install agent skills into AI coding tools",
5
5
  "author": "iceinvein",
6
6
  "license": "MIT",
package/skills/index.json CHANGED
@@ -283,7 +283,7 @@
283
283
  "name": "sluice",
284
284
  "description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment, one status command and a SessionStart hook can answer where the run is (the hook prints a live run at every session start, compaction included), and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
285
285
  "type": "prompt",
286
- "version": "0.19.2"
286
+ "version": "0.19.3"
287
287
  },
288
288
  {
289
289
  "name": "temporal-coupling-detector",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sluice",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment, one status command and a SessionStart hook can answer where the run is (the hook prints a live run at every session start, compaction included), and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
5
5
  "author": "iceinvein",
6
6
  "type": "prompt",