@iceinvein/agent-skills 0.1.40 → 0.3.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 (141) hide show
  1. package/README.md +18 -2
  2. package/dist/cli/index.js +115 -34
  3. package/package.json +1 -1
  4. package/skills/index.json +14 -2
  5. package/skills/magpie/SKILL.md +118 -40
  6. package/skills/magpie/bin/magpie.ts +43 -0
  7. package/skills/magpie/fixtures/fake-gh-nodiff.sh +38 -0
  8. package/skills/magpie/package.json +1 -1
  9. package/skills/magpie/references/peer-review.md +7 -2
  10. package/skills/magpie/references/specialists.md +38 -7
  11. package/skills/magpie/scripts/__tests__/cli.test.ts +101 -1
  12. package/skills/magpie/scripts/__tests__/dedupe-cmd.test.ts +187 -0
  13. package/skills/magpie/scripts/__tests__/diff-chunks.test.ts +51 -0
  14. package/skills/magpie/scripts/__tests__/filter-diff-preservation.test.ts +54 -0
  15. package/skills/magpie/scripts/__tests__/findings-files.test.ts +35 -0
  16. package/skills/magpie/scripts/__tests__/gh.test.ts +69 -0
  17. package/skills/magpie/scripts/__tests__/git-diff.test.ts +83 -0
  18. package/skills/magpie/scripts/__tests__/helpers/git-fixture.ts +47 -0
  19. package/skills/magpie/scripts/__tests__/path-filter.test.ts +27 -0
  20. package/skills/magpie/scripts/__tests__/render-cmd.test.ts +95 -0
  21. package/skills/magpie/scripts/__tests__/render-findings.test.ts +33 -0
  22. package/skills/magpie/scripts/__tests__/render-progress.test.ts +42 -0
  23. package/skills/magpie/scripts/__tests__/setup-cmd.test.ts +83 -1
  24. package/skills/magpie/scripts/__tests__/shard.test.ts +165 -0
  25. package/skills/magpie/scripts/__tests__/skill-lint.test.ts +96 -1
  26. package/skills/magpie/scripts/dedupe-cmd.ts +58 -3
  27. package/skills/magpie/scripts/diff-chunks.ts +28 -0
  28. package/skills/magpie/scripts/findings-files.ts +32 -0
  29. package/skills/magpie/scripts/gh.ts +64 -13
  30. package/skills/magpie/scripts/git-diff.ts +111 -0
  31. package/skills/magpie/scripts/path-filter.ts +9 -5
  32. package/skills/magpie/scripts/refresh.ts +8 -0
  33. package/skills/magpie/scripts/render-cmd.ts +28 -9
  34. package/skills/magpie/scripts/render-findings.ts +11 -1
  35. package/skills/magpie/scripts/render-progress.ts +6 -1
  36. package/skills/magpie/scripts/setup-cmd.ts +38 -1
  37. package/skills/magpie/scripts/shard.ts +171 -0
  38. package/skills/magpie/scripts/status-cmd.ts +4 -1
  39. package/skills/magpie/skill.json +2 -2
  40. package/skills/magpie/templates/styles.css +5 -0
  41. package/skills/migrate/README.md +194 -0
  42. package/skills/migrate/SKILL.md +197 -0
  43. package/skills/migrate/bin/migrate +15 -0
  44. package/skills/migrate/bin/migrate.ts +309 -0
  45. package/skills/migrate/biome.json +35 -0
  46. package/skills/migrate/bun.lock +24 -0
  47. package/skills/migrate/docs/architecture.md +294 -0
  48. package/skills/migrate/docs/reference.md +590 -0
  49. package/skills/migrate/fixtures/tiny-express/GROUND-TRUTH.md +39 -0
  50. package/skills/migrate/fixtures/tiny-express/app.js +29 -0
  51. package/skills/migrate/fixtures/tiny-express/cron.js +6 -0
  52. package/skills/migrate/fixtures/tiny-express/reports/daily-users.json +6 -0
  53. package/skills/migrate/fixtures/tiny-express/schema.sql +12 -0
  54. package/skills/migrate/fixtures/tiny-express/settings.json +4 -0
  55. package/skills/migrate/fixtures/tiny-express/views/users.html +9 -0
  56. package/skills/migrate/fixtures/tiny-webforms/Controllers/UsersController.cs +68 -0
  57. package/skills/migrate/fixtures/tiny-webforms/Default.aspx +7 -0
  58. package/skills/migrate/fixtures/tiny-webforms/Default.aspx.cs +14 -0
  59. package/skills/migrate/fixtures/tiny-webforms/GROUND-TRUTH.md +50 -0
  60. package/skills/migrate/fixtures/tiny-webforms/Integrations/BillingClient.cs +16 -0
  61. package/skills/migrate/fixtures/tiny-webforms/Jobs/NightlyDigestJob.cs +33 -0
  62. package/skills/migrate/fixtures/tiny-webforms/Reports/DailyUsers.rdl +11 -0
  63. package/skills/migrate/fixtures/tiny-webforms/Schema.sql +12 -0
  64. package/skills/migrate/fixtures/tiny-webforms/Site.master +16 -0
  65. package/skills/migrate/fixtures/tiny-webforms/Users.aspx +8 -0
  66. package/skills/migrate/fixtures/tiny-webforms/Users.aspx.cs +14 -0
  67. package/skills/migrate/fixtures/tiny-webforms/web.config +10 -0
  68. package/skills/migrate/install.sh +68 -0
  69. package/skills/migrate/package.json +17 -0
  70. package/skills/migrate/references/phases/enumerate.md +291 -0
  71. package/skills/migrate/references/phases/extract.md +652 -0
  72. package/skills/migrate/references/phases/parity.md +275 -0
  73. package/skills/migrate/references/phases/probe.md +135 -0
  74. package/skills/migrate/references/phases/queue.md +242 -0
  75. package/skills/migrate/references/phases/seam.md +416 -0
  76. package/skills/migrate/references/recipes/README.md +116 -0
  77. package/skills/migrate/references/recipes/aspnet.md +287 -0
  78. package/skills/migrate/references/run-ops.md +280 -0
  79. package/skills/migrate/scripts/__tests__/census.test.ts +775 -0
  80. package/skills/migrate/scripts/__tests__/check.test.ts +458 -0
  81. package/skills/migrate/scripts/__tests__/citations.test.ts +156 -0
  82. package/skills/migrate/scripts/__tests__/cli.test.ts +183 -0
  83. package/skills/migrate/scripts/__tests__/concurrency.test.ts +164 -0
  84. package/skills/migrate/scripts/__tests__/config.test.ts +112 -0
  85. package/skills/migrate/scripts/__tests__/e2e-express.test.ts +1093 -0
  86. package/skills/migrate/scripts/__tests__/e2e-webforms.test.ts +1276 -0
  87. package/skills/migrate/scripts/__tests__/e2e.test.ts +320 -0
  88. package/skills/migrate/scripts/__tests__/ids.test.ts +38 -0
  89. package/skills/migrate/scripts/__tests__/import.test.ts +155 -0
  90. package/skills/migrate/scripts/__tests__/init.test.ts +192 -0
  91. package/skills/migrate/scripts/__tests__/leaks.test.ts +176 -0
  92. package/skills/migrate/scripts/__tests__/lock.test.ts +183 -0
  93. package/skills/migrate/scripts/__tests__/paths.test.ts +129 -0
  94. package/skills/migrate/scripts/__tests__/phase-cmd.test.ts +151 -0
  95. package/skills/migrate/scripts/__tests__/phases.test.ts +70 -0
  96. package/skills/migrate/scripts/__tests__/queue.test.ts +475 -0
  97. package/skills/migrate/scripts/__tests__/report.test.ts +150 -0
  98. package/skills/migrate/scripts/__tests__/run-state.test.ts +136 -0
  99. package/skills/migrate/scripts/__tests__/status-reset.test.ts +318 -0
  100. package/skills/migrate/scripts/__tests__/store.test.ts +132 -0
  101. package/skills/migrate/scripts/__tests__/validate.test.ts +54 -0
  102. package/skills/migrate/scripts/census-cmd.ts +109 -0
  103. package/skills/migrate/scripts/census.ts +342 -0
  104. package/skills/migrate/scripts/check-cmd.ts +24 -0
  105. package/skills/migrate/scripts/check.ts +376 -0
  106. package/skills/migrate/scripts/citations.ts +92 -0
  107. package/skills/migrate/scripts/config.ts +237 -0
  108. package/skills/migrate/scripts/ids.ts +31 -0
  109. package/skills/migrate/scripts/import-cmd.ts +141 -0
  110. package/skills/migrate/scripts/init-cmd.ts +118 -0
  111. package/skills/migrate/scripts/leaks.ts +184 -0
  112. package/skills/migrate/scripts/lock.ts +188 -0
  113. package/skills/migrate/scripts/paths.ts +103 -0
  114. package/skills/migrate/scripts/phase-cmd.ts +63 -0
  115. package/skills/migrate/scripts/phases.ts +113 -0
  116. package/skills/migrate/scripts/queue-cmd.ts +98 -0
  117. package/skills/migrate/scripts/queue.ts +258 -0
  118. package/skills/migrate/scripts/report-cmd.ts +47 -0
  119. package/skills/migrate/scripts/report.ts +131 -0
  120. package/skills/migrate/scripts/reset-cmd.ts +120 -0
  121. package/skills/migrate/scripts/status-cmd.ts +52 -0
  122. package/skills/migrate/scripts/store.ts +159 -0
  123. package/skills/migrate/scripts/types.ts +137 -0
  124. package/skills/migrate/scripts/validate.ts +221 -0
  125. package/skills/migrate/skill.json +33 -0
  126. package/skills/migrate/templates/config.toml +27 -0
  127. package/skills/migrate/templates/queue-item.md +17 -0
  128. package/skills/migrate/tsconfig.json +18 -0
  129. package/skills/migrate/uninstall.sh +31 -0
  130. package/skills/sluice/SKILL.md +95 -0
  131. package/skills/sluice/references/deep-channel.md +114 -0
  132. package/skills/sluice/references/finish.md +37 -0
  133. package/skills/sluice/references/intent.md +29 -0
  134. package/skills/sluice/references/meter.md +38 -0
  135. package/skills/sluice/references/review.md +42 -0
  136. package/skills/sluice/references/root-cause.md +38 -0
  137. package/skills/sluice/references/show-or-say.md +36 -0
  138. package/skills/sluice/references/test-first.md +35 -0
  139. package/skills/sluice/references/verify.md +26 -0
  140. package/skills/sluice/scripts/run-stats.sh +236 -0
  141. package/skills/sluice/skill.json +33 -0
package/README.md CHANGED
@@ -24,6 +24,12 @@ Auto-detects Claude Code, Cursor, Codex, or Gemini CLI. Use `--tool claude` to t
24
24
 
25
25
  ## Skills
26
26
 
27
+ ### Migration
28
+
29
+ | Skill | What it does |
30
+ |-------|--------------|
31
+ | **migrate** | Walks a legacy codebase through probe, enumerate, seam, extract, parity, and queue: measured surface coverage, an empirically derived capability seam, cited requirements, a parity plan, and a batch decision queue. Bundles a Bun CLI that enforces the coverage arithmetic and phase ordering instead of trusting it. |
32
+
27
33
  ### Code Architecture
28
34
 
29
35
  Skills that analyze how code is structured: module boundaries, coupling, complexity, contracts, and evolution over time.
@@ -91,6 +97,14 @@ Skills for producing job application materials that read like a human wrote them
91
97
  | **cover-letter-rewrite** | Reviser | Audit-driven targeted rewrite of an existing letter. Focus modes: humanize, align, tighten, structure, tone. Preserves voice where it already works. |
92
98
  | **cover-letter-persona** | Voice profile | Reusable writing personas using the NNGroup 4-dimension tone framework (funny-serious, formal-casual, respectful-irreverent, enthusiastic-matter-of-fact) adapted for professional correspondence. |
93
99
 
100
+ ### Workflow
101
+
102
+ Skills that shape how work gets done rather than analyzing code.
103
+
104
+ | Skill | What it does |
105
+ |-------|--------------|
106
+ | **sluice** | 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. Seven rules live as one-liners in the router; the full treatment sits in references read only on friction. Each run closes with a ledger read out of the session transcript: elapsed, tools, tokens, and what every dispatched agent cost. Claude Code only. Conflicts with the superpowers plugin, which requires its own fixed pipeline up front for anything that adds to or changes what the software does, not just code edits; disable superpowers before installing. |
107
+
94
108
  ### Orchestration
95
109
 
96
110
  Skills that compose the other audit skills into higher-level workflows.
@@ -145,11 +159,13 @@ To pin to the current version, do nothing: skills are not auto-updated. `update`
145
159
 
146
160
  ## Activation Modes (Claude Code)
147
161
 
148
- Some skills (like `terse`) support activation modes. Pick one at install time:
162
+ Some skills (like `terse` and `sluice`) support activation modes. Pick one at install time:
149
163
 
150
- - **session** (default): invoke the skill manually with `/<skill>` each session
164
+ - **session**: invoke the skill manually with `/<skill>` each session
151
165
  - **global**: auto-activate every Claude Code session via a `SessionStart` hook in `.claude/settings.json`
152
166
 
167
+ Each skill declares its own default: `terse` defaults to session, `sluice` defaults to global because a router that is not always on does not route.
168
+
153
169
  If a skill declares activation support and you're installing for Claude Code interactively, the CLI prompts you. Use `--activation session` or `--activation global` for scripted installs. `remove` strips the hook cleanly; `update` preserves your choice across version bumps.
154
170
 
155
171
  ## Supported Tools
package/dist/cli/index.js CHANGED
@@ -402,7 +402,7 @@ function resolveBundlePaths(entries, bundle) {
402
402
  }
403
403
 
404
404
  // src/cli/adapters/claude.ts
405
- import { chmodSync, existsSync as existsSync2, mkdirSync, rmSync, statSync, unlinkSync } from "node:fs";
405
+ import { chmodSync, existsSync as existsSync2, mkdirSync, rmSync, rmdirSync, statSync, unlinkSync } from "node:fs";
406
406
  import { dirname, join as join2 } from "node:path";
407
407
  function shouldBeExecutable(relPath, content) {
408
408
  if (relPath.endsWith(".sh"))
@@ -423,8 +423,10 @@ function runScript(scriptPath, cwd) {
423
423
  });
424
424
  return { ok: result.exitCode === 0, code: result.exitCode ?? 1 };
425
425
  }
426
- function matchesSkillDirective(command, skillName) {
427
- return command.includes(`Activate ${skillName} skill`);
426
+ function matchesSkillDirective(hook, skillName) {
427
+ if (hook.skill !== undefined)
428
+ return hook.skill === skillName;
429
+ return hook.command.includes(`Activate ${skillName} skill`);
428
430
  }
429
431
  async function wireSessionStartHook(settingsPath, skillName, directive) {
430
432
  let settings = {};
@@ -438,12 +440,12 @@ async function wireSessionStartHook(settingsPath, skillName, directive) {
438
440
  const command = `echo '${directive}'`;
439
441
  for (const group of settings.hooks.SessionStart) {
440
442
  for (const hook of group.hooks ?? []) {
441
- if (matchesSkillDirective(hook.command, skillName))
443
+ if (matchesSkillDirective(hook, skillName))
442
444
  return;
443
445
  }
444
446
  }
445
447
  settings.hooks.SessionStart.push({
446
- hooks: [{ type: "command", command }]
448
+ hooks: [{ type: "command", command, skill: skillName }]
447
449
  });
448
450
  mkdirSync(dirname(settingsPath), { recursive: true });
449
451
  await Bun.write(settingsPath, JSON.stringify(settings, null, 2) + `
@@ -457,7 +459,7 @@ async function unwireSessionStartHook(settingsPath, skillName) {
457
459
  if (!sessionStart)
458
460
  return;
459
461
  const filteredGroups = sessionStart.map((group) => ({
460
- hooks: (group.hooks ?? []).filter((h) => !matchesSkillDirective(h.command, skillName))
462
+ hooks: (group.hooks ?? []).filter((h) => !matchesSkillDirective(h, skillName))
461
463
  })).filter((group) => group.hooks.length > 0);
462
464
  if (filteredGroups.length === 0) {
463
465
  delete settings.hooks.SessionStart;
@@ -567,7 +569,7 @@ var claudeAdapter = {
567
569
  const stopAt = config.bundleRoot ? join2(cwd, config.bundleRoot, "..") : cwd;
568
570
  while (dir !== stopAt && dir !== "/" && dir.startsWith(cwd)) {
569
571
  try {
570
- rmSync(dir, { recursive: false });
572
+ rmdirSync(dir);
571
573
  } catch {
572
574
  break;
573
575
  }
@@ -596,7 +598,7 @@ var claudeAdapter = {
596
598
  };
597
599
 
598
600
  // src/cli/adapters/cursor.ts
599
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, unlinkSync as unlinkSync2, rmSync as rmSync2 } from "node:fs";
601
+ import { existsSync as existsSync3, mkdirSync as mkdirSync2, unlinkSync as unlinkSync2, rmdirSync as rmdirSync2 } from "node:fs";
600
602
  import { dirname as dirname2, join as join3 } from "node:path";
601
603
  var cursorAdapter = {
602
604
  name: "cursor",
@@ -649,7 +651,7 @@ var cursorAdapter = {
649
651
  if (existsSync3(fullPath)) {
650
652
  unlinkSync2(fullPath);
651
653
  try {
652
- rmSync2(dirname2(fullPath), { recursive: false });
654
+ rmdirSync2(dirname2(fullPath));
653
655
  } catch {}
654
656
  }
655
657
  }
@@ -726,7 +728,7 @@ var codexAdapter = {
726
728
  };
727
729
 
728
730
  // src/cli/adapters/gemini.ts
729
- import { existsSync as existsSync5, mkdirSync as mkdirSync3, unlinkSync as unlinkSync3, rmSync as rmSync3 } from "node:fs";
731
+ import { existsSync as existsSync5, mkdirSync as mkdirSync3, unlinkSync as unlinkSync3, rmdirSync as rmdirSync3 } from "node:fs";
730
732
  import { dirname as dirname3, join as join5 } from "node:path";
731
733
  var geminiAdapter = {
732
734
  name: "gemini",
@@ -779,7 +781,7 @@ var geminiAdapter = {
779
781
  if (existsSync5(fullPath)) {
780
782
  unlinkSync3(fullPath);
781
783
  try {
782
- rmSync3(dirname3(fullPath), { recursive: false });
784
+ rmdirSync3(dirname3(fullPath));
783
785
  } catch {}
784
786
  }
785
787
  }
@@ -865,6 +867,10 @@ async function installSkill(cwd, manifest, files, targetTools, activation) {
865
867
  return { ok: true, installed, skipped };
866
868
  }
867
869
 
870
+ // src/cli/commands/remove.ts
871
+ import { existsSync as existsSync6, statSync as statSync2, unlinkSync as unlinkSync4, rmSync as rmSync2 } from "node:fs";
872
+ import { basename, join as join7 } from "node:path";
873
+
868
874
  // src/cli/github.ts
869
875
  var REPO2 = "iceinvein/agent-skills";
870
876
  var BRANCH2 = "master";
@@ -969,6 +975,28 @@ function resolveBundlePaths2(entries, bundle) {
969
975
  }
970
976
 
971
977
  // src/cli/commands/remove.ts
978
+ var SHARED_CONFIG_FILES = new Set([
979
+ ".claude/settings.json",
980
+ ".claude/settings.local.json",
981
+ ".cursor/mcp.json",
982
+ ".gemini/settings.json"
983
+ ]);
984
+ function isSharedConfigFile(relPath) {
985
+ if (SHARED_CONFIG_FILES.has(relPath))
986
+ return true;
987
+ const parts = relPath.split("/");
988
+ const name = basename(relPath);
989
+ const isConfigName = name === "settings.json" || name === "settings.local.json" || name === "mcp.json";
990
+ return parts.length === 2 && parts[0].startsWith(".") && isConfigName;
991
+ }
992
+ function removeFileOrDir(fullPath) {
993
+ const stat = statSync2(fullPath);
994
+ if (stat.isDirectory()) {
995
+ rmSync2(fullPath, { recursive: true, force: true });
996
+ } else {
997
+ unlinkSync4(fullPath);
998
+ }
999
+ }
972
1000
  async function removeSkill(cwd, skillName) {
973
1001
  const lockfile = await readLockfile(cwd);
974
1002
  const entry = lockfile.skills[skillName];
@@ -987,24 +1015,36 @@ async function removeSkill(cwd, skillName) {
987
1015
  return true;
988
1016
  if (config.supporting && Object.values(config.supporting).includes(f))
989
1017
  return true;
1018
+ if (config.bundleRoot && f.startsWith(`${config.bundleRoot}/`) && !isSharedConfigFile(f))
1019
+ return true;
990
1020
  if (config.mcpServers && (f.includes(".claude/settings") || f.includes(".cursor/mcp") || f.includes(".gemini/settings")))
991
1021
  return true;
992
1022
  return false;
993
1023
  });
994
1024
  await adapter.remove(cwd, manifestResult.manifest, toolFiles);
995
1025
  }
996
- } else {
997
- const { unlinkSync: unlinkSync4, existsSync: existsSync6 } = await import("node:fs");
998
- const { join: join7 } = await import("node:path");
999
- for (const file of entry.files) {
1000
- const fullPath = join7(cwd, file);
1001
- if (existsSync6(fullPath)) {
1002
- unlinkSync4(fullPath);
1026
+ await removeSkillFromLockfile(cwd, skillName);
1027
+ return { ok: true, removed: entry.files };
1028
+ }
1029
+ const removed = [];
1030
+ const warnings = [];
1031
+ for (const file of entry.files) {
1032
+ if (isSharedConfigFile(file)) {
1033
+ const fullPath2 = join7(cwd, file);
1034
+ if (existsSync6(fullPath2)) {
1035
+ await unwireSessionStartHook(fullPath2, skillName);
1003
1036
  }
1037
+ warnings.push(`Manifest unavailable (${manifestResult.error}). Left '${file}' in place, only removing '${skillName}'s SessionStart hook from it; any MCP server entries it owns were not touched.`);
1038
+ continue;
1004
1039
  }
1040
+ const fullPath = join7(cwd, file);
1041
+ if (!existsSync6(fullPath))
1042
+ continue;
1043
+ removeFileOrDir(fullPath);
1044
+ removed.push(file);
1005
1045
  }
1006
1046
  await removeSkillFromLockfile(cwd, skillName);
1007
- return { ok: true, removed: entry.files };
1047
+ return { ok: true, removed, ...warnings.length > 0 ? { warnings } : {} };
1008
1048
  }
1009
1049
 
1010
1050
  // src/cli/commands/list.ts
@@ -1026,6 +1066,30 @@ async function infoSkill(skillName) {
1026
1066
  }
1027
1067
 
1028
1068
  // src/cli/commands/remove.ts
1069
+ import { existsSync as existsSync7, statSync as statSync3, unlinkSync as unlinkSync5, rmSync as rmSync3 } from "node:fs";
1070
+ import { basename as basename2, join as join8 } from "node:path";
1071
+ var SHARED_CONFIG_FILES2 = new Set([
1072
+ ".claude/settings.json",
1073
+ ".claude/settings.local.json",
1074
+ ".cursor/mcp.json",
1075
+ ".gemini/settings.json"
1076
+ ]);
1077
+ function isSharedConfigFile2(relPath) {
1078
+ if (SHARED_CONFIG_FILES2.has(relPath))
1079
+ return true;
1080
+ const parts = relPath.split("/");
1081
+ const name = basename2(relPath);
1082
+ const isConfigName = name === "settings.json" || name === "settings.local.json" || name === "mcp.json";
1083
+ return parts.length === 2 && parts[0].startsWith(".") && isConfigName;
1084
+ }
1085
+ function removeFileOrDir2(fullPath) {
1086
+ const stat = statSync3(fullPath);
1087
+ if (stat.isDirectory()) {
1088
+ rmSync3(fullPath, { recursive: true, force: true });
1089
+ } else {
1090
+ unlinkSync5(fullPath);
1091
+ }
1092
+ }
1029
1093
  async function removeSkill2(cwd, skillName) {
1030
1094
  const lockfile = await readLockfile(cwd);
1031
1095
  const entry = lockfile.skills[skillName];
@@ -1044,24 +1108,36 @@ async function removeSkill2(cwd, skillName) {
1044
1108
  return true;
1045
1109
  if (config.supporting && Object.values(config.supporting).includes(f))
1046
1110
  return true;
1111
+ if (config.bundleRoot && f.startsWith(`${config.bundleRoot}/`) && !isSharedConfigFile2(f))
1112
+ return true;
1047
1113
  if (config.mcpServers && (f.includes(".claude/settings") || f.includes(".cursor/mcp") || f.includes(".gemini/settings")))
1048
1114
  return true;
1049
1115
  return false;
1050
1116
  });
1051
1117
  await adapter.remove(cwd, manifestResult.manifest, toolFiles);
1052
1118
  }
1053
- } else {
1054
- const { unlinkSync: unlinkSync4, existsSync: existsSync6 } = await import("node:fs");
1055
- const { join: join7 } = await import("node:path");
1056
- for (const file of entry.files) {
1057
- const fullPath = join7(cwd, file);
1058
- if (existsSync6(fullPath)) {
1059
- unlinkSync4(fullPath);
1119
+ await removeSkillFromLockfile(cwd, skillName);
1120
+ return { ok: true, removed: entry.files };
1121
+ }
1122
+ const removed = [];
1123
+ const warnings = [];
1124
+ for (const file of entry.files) {
1125
+ if (isSharedConfigFile2(file)) {
1126
+ const fullPath2 = join8(cwd, file);
1127
+ if (existsSync7(fullPath2)) {
1128
+ await unwireSessionStartHook(fullPath2, skillName);
1060
1129
  }
1130
+ warnings.push(`Manifest unavailable (${manifestResult.error}). Left '${file}' in place, only removing '${skillName}'s SessionStart hook from it; any MCP server entries it owns were not touched.`);
1131
+ continue;
1061
1132
  }
1133
+ const fullPath = join8(cwd, file);
1134
+ if (!existsSync7(fullPath))
1135
+ continue;
1136
+ removeFileOrDir2(fullPath);
1137
+ removed.push(file);
1062
1138
  }
1063
1139
  await removeSkillFromLockfile(cwd, skillName);
1064
- return { ok: true, removed: entry.files };
1140
+ return { ok: true, removed, ...warnings.length > 0 ? { warnings } : {} };
1065
1141
  }
1066
1142
 
1067
1143
  // src/cli/commands/install.ts
@@ -1131,7 +1207,7 @@ async function updateAllSkills(cwd) {
1131
1207
  }
1132
1208
 
1133
1209
  // src/cli/commands/bump.ts
1134
- import { join as join7 } from "node:path";
1210
+ import { join as join9 } from "node:path";
1135
1211
 
1136
1212
  // src/cli/semver.ts
1137
1213
  function bumpVersion(current, level) {
@@ -1152,7 +1228,7 @@ function bumpVersion(current, level) {
1152
1228
 
1153
1229
  // src/cli/commands/bump.ts
1154
1230
  async function bumpSkill(repoRoot, skillName, level) {
1155
- const manifestPath = join7(repoRoot, "skills", skillName, "skill.json");
1231
+ const manifestPath = join9(repoRoot, "skills", skillName, "skill.json");
1156
1232
  const file = Bun.file(manifestPath);
1157
1233
  if (!await file.exists()) {
1158
1234
  return { ok: false, error: `Skill '${skillName}' not found at skills/${skillName}/skill.json` };
@@ -1223,7 +1299,7 @@ async function bumpAllChanged(repoRoot, level, dryRun) {
1223
1299
  if (skillVersionChanged(repoRoot, skillName, tag))
1224
1300
  continue;
1225
1301
  if (dryRun) {
1226
- const manifestPath = join7(repoRoot, "skills", skillName, "skill.json");
1302
+ const manifestPath = join9(repoRoot, "skills", skillName, "skill.json");
1227
1303
  const file = Bun.file(manifestPath);
1228
1304
  if (!await file.exists())
1229
1305
  continue;
@@ -1279,10 +1355,10 @@ async function checkForUpdates(cwd) {
1279
1355
  }
1280
1356
 
1281
1357
  // src/cli/lockfile.ts
1282
- import { join as join8 } from "node:path";
1358
+ import { join as join10 } from "node:path";
1283
1359
  var LOCKFILE_NAME2 = ".agent-skills.lock";
1284
1360
  async function readLockfile2(cwd) {
1285
- const path = join8(cwd, LOCKFILE_NAME2);
1361
+ const path = join10(cwd, LOCKFILE_NAME2);
1286
1362
  const file = Bun.file(path);
1287
1363
  if (!await file.exists()) {
1288
1364
  return { skills: {} };
@@ -3162,7 +3238,7 @@ async function pickActivation(skillName, modes) {
3162
3238
 
3163
3239
  // src/cli/index.ts
3164
3240
  import { mkdirSync as mkdirSync4 } from "fs";
3165
- import { join as join9 } from "path";
3241
+ import { join as join11 } from "path";
3166
3242
  import { homedir } from "os";
3167
3243
  async function otherScopeSkillCount(currentDir) {
3168
3244
  const home = homedir();
@@ -3266,7 +3342,7 @@ async function resolveTargetTools(installDir, isGlobal, flags) {
3266
3342
  for (const tool of picked) {
3267
3343
  const dir = TOOL_DIRS[tool];
3268
3344
  if (dir)
3269
- mkdirSync4(join9(installDir, dir), { recursive: true });
3345
+ mkdirSync4(join11(installDir, dir), { recursive: true });
3270
3346
  }
3271
3347
  return picked;
3272
3348
  }
@@ -3370,6 +3446,11 @@ Installing ${names.length} skills...
3370
3446
  console.error(`Error: ${result.error}`);
3371
3447
  process.exit(1);
3372
3448
  }
3449
+ if (result.warnings) {
3450
+ for (const warning of result.warnings) {
3451
+ console.warn(`\u26A0 ${warning}`);
3452
+ }
3453
+ }
3373
3454
  console.log(`\u2713 Removed '${skillName}'`);
3374
3455
  break;
3375
3456
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iceinvein/agent-skills",
3
- "version": "0.1.40",
3
+ "version": "0.3.0",
4
4
  "description": "Install agent skills into AI coding tools",
5
5
  "author": "iceinvein",
6
6
  "license": "MIT",
package/skills/index.json CHANGED
@@ -219,9 +219,15 @@
219
219
  },
220
220
  {
221
221
  "name": "magpie",
222
- "description": "Interactive PR review pipeline. Runs five parallel specialist subagents (security, bugs, performance, code-smells, architecture), dedupes findings, applies a critic rubric, peer-reviews via codex exec (falling back to a Claude second opinion when codex is unavailable), and serves an interactive HTML report for selecting findings to post via gh. Bundles a Bun CLI installed onto PATH via the skill's postinstall step. Use when the user asks to review a GitHub pull request.",
222
+ "description": "Interactive PR review pipeline. Runs five parallel specialist subagents (security, bugs, performance, code-smells, architecture), dedupes findings, applies a critic rubric, peer-reviews via codex exec (falling back to a Claude second opinion when codex is unavailable), and serves an interactive HTML report for selecting findings to post via gh. Bundles a Bun CLI installed onto PATH via the skill's postinstall step. Use when the user asks to review a GitHub pull request. Splits oversized diffs into budgeted shards and rebuilds the diff from the local clone when gh pr diff refuses it.",
223
223
  "type": "prompt",
224
- "version": "0.9.0"
224
+ "version": "0.10.0"
225
+ },
226
+ {
227
+ "name": "migrate",
228
+ "description": "Source-agnostic legacy migration mapping. Walks a legacy codebase through probe, enumerate, seam, extract, parity, and queue, building an auditable requirements ledger with mandatory citations and a `migrate check` gate in place of self-reported completeness. Use when the user asks to migrate, re-specify, replatform, or map a legacy system onto a new stack, or to resume, check, or report on a mapping run already under way.",
229
+ "type": "prompt",
230
+ "version": "0.2.0"
225
231
  },
226
232
  {
227
233
  "name": "module-secret-auditor",
@@ -273,6 +279,12 @@
273
279
  ],
274
280
  "quick": false
275
281
  },
282
+ {
283
+ "name": "sluice",
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, and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what every dispatched agent cost. Claude Code only; conflicts with the superpowers plugin.",
285
+ "type": "prompt",
286
+ "version": "0.1.1"
287
+ },
276
288
  {
277
289
  "name": "temporal-coupling-detector",
278
290
  "description": "Hidden ordering dependency analysis: detect two-phase init, method order dependencies, invisible preconditions, and resource lifecycle violations; fix with types, parameters, and factory patterns",