skilldrop-cli 0.12.1 → 0.12.2

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/bin/skilldrop.js +38 -1
  2. package/package.json +1 -1
package/bin/skilldrop.js CHANGED
@@ -55,6 +55,8 @@ Usage:
55
55
  skilldrop scan [<skill...>] [--from <src>] supply-chain scan — flag network/exec/credential
56
56
  patterns in scripts and injection-shaped instructions
57
57
  in SKILL.md before you trust a catalog (RFC-0022)
58
+ skilldrop bootstrap add the skilldrop marketplace to ~/.claude/settings.json
59
+ (idempotent — safe to run in onboarding scripts)
58
60
 
59
61
  Catalogs:
60
62
  (default) the catalog bundled with this package
@@ -1153,9 +1155,44 @@ function validateCmd(args) {
1153
1155
  console.log(`OK: ${names.length} skills in catalog '${cat.source}' pass the structural check.`);
1154
1156
  }
1155
1157
 
1158
+ /* ---------- bootstrap (enterprise distribution) ----------
1159
+ Writes the skilldrop marketplace into ~/.claude/settings.json so every Claude Code
1160
+ session on this machine discovers the catalogue without any per-session /plugin command.
1161
+ Idempotent: safe to run in a provisioning script or onboarding runbook. */
1162
+ const BOOTSTRAP_MARKETPLACE_KEY = "skilldrop";
1163
+ const BOOTSTRAP_GITHUB_OWNER = "sananthanarayan";
1164
+ const BOOTSTRAP_GITHUB_REPO = "skilldrop";
1165
+
1166
+ function bootstrap() {
1167
+ const settingsPath = path.join(os.homedir(), ".claude", "settings.json");
1168
+ let data = {};
1169
+ const raw = readIfPresent(settingsPath, null);
1170
+ if (raw !== null) {
1171
+ try { data = JSON.parse(raw); }
1172
+ catch (e) { die(`${settingsPath} is not valid JSON — fix it first, then re-run bootstrap`); }
1173
+ }
1174
+ data.extraKnownMarketplaces = data.extraKnownMarketplaces || {};
1175
+ const entry = { source: { source: "github", owner: BOOTSTRAP_GITHUB_OWNER, repo: BOOTSTRAP_GITHUB_REPO } };
1176
+ const existing = data.extraKnownMarketplaces[BOOTSTRAP_MARKETPLACE_KEY];
1177
+ if (existing && JSON.stringify(existing) === JSON.stringify(entry)) {
1178
+ console.log(`already configured: ${BOOTSTRAP_MARKETPLACE_KEY} -> github:${BOOTSTRAP_GITHUB_OWNER}/${BOOTSTRAP_GITHUB_REPO}`);
1179
+ console.log(`\nIn any Claude Code session:\n /plugin install <pack>@${BOOTSTRAP_MARKETPLACE_KEY}`);
1180
+ return;
1181
+ }
1182
+ data.extraKnownMarketplaces[BOOTSTRAP_MARKETPLACE_KEY] = entry;
1183
+ fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
1184
+ fs.writeFileSync(settingsPath, JSON.stringify(data, null, 2) + "\n");
1185
+ console.log(`configured ${settingsPath}:`);
1186
+ console.log(` extraKnownMarketplaces.${BOOTSTRAP_MARKETPLACE_KEY} -> github:${BOOTSTRAP_GITHUB_OWNER}/${BOOTSTRAP_GITHUB_REPO}`);
1187
+ console.log(`\nIn any Claude Code session, install a role pack:\n /plugin install solution-architect@${BOOTSTRAP_MARKETPLACE_KEY}`);
1188
+ console.log(` /plugin install dev-team@${BOOTSTRAP_MARKETPLACE_KEY}`);
1189
+ console.log(` /plugin install ai-engineering@${BOOTSTRAP_MARKETPLACE_KEY}`);
1190
+ console.log(`\nOr install the full catalogue:\n /plugin install ${BOOTSTRAP_MARKETPLACE_KEY}@${BOOTSTRAP_MARKETPLACE_KEY}`);
1191
+ }
1192
+
1156
1193
  const args = parseArgs(process.argv.slice(2));
1157
1194
  const cmd = args._.shift();
1158
- const commands = { list, info, packs: listPacks, agents: listAgents, loops: listLoops, install, update, outdated, uninstall, validate: validateCmd, scan };
1195
+ const commands = { list, info, packs: listPacks, agents: listAgents, loops: listLoops, install, update, outdated, uninstall, validate: validateCmd, scan, bootstrap };
1159
1196
  if (!cmd || cmd === "help" || args.flags.help) console.log(HELP);
1160
1197
  else if (commands[cmd]) commands[cmd](args);
1161
1198
  else die(`unknown command '${cmd}' — run: skilldrop help`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skilldrop-cli",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Portable AI-agent skills for the deliverables knowledge workers ship \u2014 diagrams, ADRs, PRDs, runbooks, decks, reviews \u2014 installable into Claude Code, Cursor, Kiro, and any IDE that takes custom instructions. One command per skill or per role-based pack.",
5
5
  "author": {
6
6
  "name": "Sanjay Ananthanarayan",