reskill 1.4.2 → 1.5.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.
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  /**
3
- * uninstall command - Uninstall a skill
3
+ * uninstall command - Uninstall one or more skills
4
4
  */
5
5
  export declare const uninstallCommand: Command;
6
6
  export default uninstallCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAgFzB,CAAC;AAEL,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAqHzB,CAAC;AAEL,eAAe,gBAAgB,CAAC"}
package/dist/cli/index.js CHANGED
@@ -1418,10 +1418,14 @@ const installer_SKILLS_SUBDIR = 'skills';
1418
1418
  *
1419
1419
  * For different reference formats, cache paths are:
1420
1420
  * - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
1421
+ * - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
1421
1422
  * - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
1422
1423
  * - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
1423
1424
  */ getSkillCachePath(parsed, version) {
1424
- return __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo, version);
1425
+ const basePath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo);
1426
+ // Include subPath in cache path to differentiate skills in monorepos
1427
+ if (parsed.subPath) return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, parsed.subPath, version);
1428
+ return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, version);
1425
1429
  }
1426
1430
  /**
1427
1431
  * Get cache path (alias for getSkillCachePath)
@@ -7153,8 +7157,8 @@ async function publishAction(skillPath, options) {
7153
7157
  // ============================================================================
7154
7158
  const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publish').alias('pub').description('Publish a skill to the registry').argument('[path]', 'Path to skill directory', '.').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-t, --tag <tag>', 'Git tag to publish').option('--access <level>', 'Access level: public or restricted', 'public').option('-n, --dry-run', 'Validate without publishing').option('-y, --yes', 'Skip confirmation prompts').action(publishAction);
7155
7159
  /**
7156
- * uninstall command - Uninstall a skill
7157
- */ const uninstallCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('uninstall').alias('un').alias('remove').alias('rm').description('Uninstall a skill').argument('<skill>', 'Skill name to uninstall').option('-g, --global', 'Uninstall from global installation (~/.claude/skills)').option('-y, --yes', 'Skip confirmation prompts').action(async (skillName, options)=>{
7160
+ * uninstall command - Uninstall one or more skills
7161
+ */ const uninstallCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('uninstall').alias('un').alias('remove').alias('rm').description('Uninstall one or more skills').argument('<skills...>', 'Skill names to uninstall').option('-g, --global', 'Uninstall from global installation (~/.claude/skills)').option('-y, --yes', 'Skip confirmation prompts').action(async (skillNames, options)=>{
7158
7162
  const isGlobal = options.global || false;
7159
7163
  const skipConfirm = options.yes || false;
7160
7164
  const skillManager = new SkillManager(void 0, {
@@ -7162,7 +7166,7 @@ const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publis
7162
7166
  });
7163
7167
  console.log();
7164
7168
  __WEBPACK_EXTERNAL_MODULE__clack_prompts__.intro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgCyan.black(' reskill '));
7165
- // Check which agents have this skill installed
7169
+ // Check which agents have these skills installed
7166
7170
  // Use installDir from config to match where skills are actually installed
7167
7171
  const config = new ConfigLoader(process.cwd());
7168
7172
  const defaults = config.getDefaults();
@@ -7172,43 +7176,67 @@ const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publis
7172
7176
  installDir: defaults.installDir
7173
7177
  });
7174
7178
  const allAgentTypes = Object.keys(agents);
7175
- const installedAgents = allAgentTypes.filter((agent)=>installer.isInstalled(skillName, agent));
7176
- const isInCanonical = installer.isInstalledInCanonical(skillName);
7177
- if (0 === installedAgents.length && !isInCanonical) {
7179
+ const skillsToUninstall = [];
7180
+ const notInstalledSkills = [];
7181
+ for (const skillName of skillNames){
7182
+ const installedAgents = allAgentTypes.filter((agent)=>installer.isInstalled(skillName, agent));
7183
+ const isInCanonical = installer.isInstalledInCanonical(skillName);
7184
+ if (0 !== installedAgents.length || isInCanonical) skillsToUninstall.push({
7185
+ name: skillName,
7186
+ installedAgents,
7187
+ isInCanonical
7188
+ });
7189
+ else notInstalledSkills.push(skillName);
7190
+ }
7191
+ // Warn about skills that are not installed
7192
+ for (const skillName of notInstalledSkills){
7178
7193
  const location = isGlobal ? '(global)' : '';
7179
7194
  __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.warn(`Skill ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillName)} is not installed ${location}`.trim());
7195
+ }
7196
+ if (0 === skillsToUninstall.length) {
7180
7197
  __WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro('Done');
7181
7198
  process.exit(0);
7182
7199
  }
7183
7200
  // Show uninstallation summary
7184
7201
  const summaryLines = [];
7185
- summaryLines.push(`${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillName)}`);
7186
- const agentNames = installedAgents.map((a)=>agents[a].displayName).join(', ');
7187
- if (agentNames) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('')} ${agentNames}`);
7188
- if (isInCanonical && 0 === installedAgents.length) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('→')} Canonical location only`);
7189
- summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('Scope:')} ${isGlobal ? 'Global' : 'Project'}`);
7190
- __WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(summaryLines.join('\n'), 'Uninstallation Summary');
7202
+ for (const skill of skillsToUninstall){
7203
+ summaryLines.push(`${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)}`);
7204
+ const agentNames = skill.installedAgents.map((a)=>agents[a].displayName).join(', ');
7205
+ if (agentNames) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('→')} ${agentNames}`);
7206
+ if (skill.isInCanonical && 0 === skill.installedAgents.length) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('')} Canonical location only`);
7207
+ summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('Scope:')} ${isGlobal ? 'Global' : 'Project'}`);
7208
+ summaryLines.push('');
7209
+ }
7210
+ __WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(summaryLines.join('\n').trim(), 'Uninstallation Summary');
7191
7211
  if (!skipConfirm) {
7192
7212
  const confirmed = await __WEBPACK_EXTERNAL_MODULE__clack_prompts__.confirm({
7193
- message: 'Proceed with uninstallation?'
7213
+ message: `Proceed with uninstalling ${skillsToUninstall.length} skill(s)?`
7194
7214
  });
7195
7215
  if (__WEBPACK_EXTERNAL_MODULE__clack_prompts__.isCancel(confirmed) || !confirmed) {
7196
7216
  __WEBPACK_EXTERNAL_MODULE__clack_prompts__.cancel('Uninstallation cancelled');
7197
7217
  process.exit(0);
7198
7218
  }
7199
7219
  }
7200
- // Uninstall from all detected agents (also removes canonical location)
7201
- const results = skillManager.uninstallFromAgents(skillName, installedAgents);
7202
- const successCount = Array.from(results.values()).filter((r)=>r).length;
7203
- // Count canonical removal as success if it was there
7204
- const totalRemoved = successCount + (isInCanonical ? 1 : 0);
7205
- if (totalRemoved > 0) __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.success(`Uninstalled ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillName)} from ${successCount} agent(s)`);
7206
- else {
7207
- __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.error(`Failed to uninstall ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillName)}`);
7208
- process.exit(1);
7220
+ // Uninstall all skills
7221
+ let totalSuccess = 0;
7222
+ let totalFailed = 0;
7223
+ for (const skill of skillsToUninstall){
7224
+ // Uninstall from all detected agents (also removes canonical location)
7225
+ const results = skillManager.uninstallFromAgents(skill.name, skill.installedAgents);
7226
+ const successCount = Array.from(results.values()).filter((r)=>r).length;
7227
+ // Count canonical removal as success if it was there
7228
+ const totalRemoved = successCount + (skill.isInCanonical ? 1 : 0);
7229
+ if (totalRemoved > 0) __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.success(`Uninstalled ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)} from ${successCount} agent(s)`);
7230
+ else {
7231
+ __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.error(`Failed to uninstall ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)}`);
7232
+ totalFailed++;
7233
+ }
7209
7234
  }
7210
7235
  console.log();
7211
- __WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green('Done!'));
7236
+ if (totalFailed > 0) {
7237
+ __WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].yellow(`Done with ${totalFailed} failure(s)`));
7238
+ process.exit(1);
7239
+ } else __WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green('Done!'));
7212
7240
  });
7213
7241
  /**
7214
7242
  * update command - Update installed skills
@@ -34,6 +34,7 @@ export declare class CacheManager {
34
34
  *
35
35
  * For different reference formats, cache paths are:
36
36
  * - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
37
+ * - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
37
38
  * - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
38
39
  * - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
39
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cache-manager.d.ts","sourceRoot":"","sources":["../../src/core/cache-manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAcxD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,CAAC,EAAE,MAAM;IAI7B;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;;;;;;OAOG;IACH,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlE;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAI7D;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAK1D;;OAEG;IACG,GAAG,CACP,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,I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eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAoCrE;AAED,eAAe,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1142,10 +1142,14 @@ const installer_SKILLS_SUBDIR = 'skills';
1142
1142
  *
1143
1143
  * For different reference formats, cache paths are:
1144
1144
  * - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
1145
+ * - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
1145
1146
  * - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
1146
1147
  * - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
1147
1148
  */ getSkillCachePath(parsed, version) {
1148
- return __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo, version);
1149
+ const basePath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo);
1150
+ // Include subPath in cache path to differentiate skills in monorepos
1151
+ if (parsed.subPath) return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, parsed.subPath, version);
1152
+ return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, version);
1149
1153
  }
1150
1154
  /**
1151
1155
  * Get cache path (alias for getSkillCachePath)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reskill",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "AI Skills Package Manager - Git-based skills management for AI agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",