itismyskillmarket 1.3.34 → 1.3.36

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 (3) hide show
  1. package/README.md +10 -4
  2. package/dist/index.js +72 -19
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SkillMarket
2
2
 
3
- > **v1.3.29** — Cross-platform skill manager for AI coding tools (Cursor, VSCode, Codex, OpenCode, Claude Code, Antigravity, OpenClaw, Hermes Agent).
3
+ > **v1.3.35** — Cross-platform skill manager for AI coding tools (Cursor, VSCode, Codex, OpenCode, Claude Code, Antigravity, OpenClaw, Hermes Agent).
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,11 +16,11 @@ npx itismyskillmarket --help
16
16
 
17
17
  ## Download Standalone .exe (Windows)
18
18
 
19
- Download the **standalone Windows executable** (~86 MB) — no Node.js installation required:
19
+ Download the **standalone Windows executable** (~70 MB) — no Node.js installation required:
20
20
 
21
21
  ```bash
22
22
  # Download from GitHub Releases
23
- # https://github.com/wxc2004/market/releases/download/v1.3.29/skillmarket.exe
23
+ # https://github.com/wxc2004/market/releases/download/v1.3.35/skillmarket.exe
24
24
 
25
25
  # Double-click the exe to start GUI + open browser automatically
26
26
  # Or run from terminal:
@@ -45,6 +45,10 @@ skm ls --limit 10 # Show 10 items per page
45
45
  skm ls --installed
46
46
  skm ls --installed --page 2
47
47
 
48
+ # Search skills from npm registry
49
+ skm search <keyword>
50
+ skm search test --limit 10
51
+
48
52
  # View skill information
49
53
  skm info brainstorming
50
54
 
@@ -90,6 +94,8 @@ skm uninstall brainstorming --platform opencode
90
94
 
91
95
  # Uninstall all skills
92
96
  skm uninstall --all
97
+ skm uninstall --all --yes # Skip confirmation
98
+ skm uninstall --dry-run # Preview without deleting
93
99
 
94
100
  # Publish a skill to npm
95
101
  skm publish <skill-name>
@@ -296,7 +302,7 @@ npm link
296
302
  # Build standalone .exe (Windows)
297
303
  # Requires: Node.js 20+, esbuild, postject
298
304
  node scripts/build-exe.mjs
299
- # Output: dist/skillmarket.exe (~86 MB)
305
+ # Output: dist/skillmarket.exe (~70 MB)
300
306
  ```
301
307
 
302
308
  ## Architecture
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/cli.ts
4
4
  import { Command } from "commander";
5
- import { readFileSync as readFileSync3 } from "fs";
5
+ import { readFileSync as readFileSync4 } from "fs";
6
6
  import { fileURLToPath as fileURLToPath4 } from "url";
7
7
  import { dirname as dirname2, resolve } from "path";
8
8
  import { execSync as execSync3 } from "child_process";
@@ -291,10 +291,20 @@ async function searchSkillmarketPackages(options = {}) {
291
291
  }
292
292
 
293
293
  // src/commands/ls.ts
294
+ function formatDate(isoString) {
295
+ try {
296
+ const date = new Date(isoString);
297
+ if (isNaN(date.getTime())) return isoString;
298
+ const pad = (n) => n.toString().padStart(2, "0");
299
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;
300
+ } catch {
301
+ return isoString;
302
+ }
303
+ }
294
304
  function filterInstalledSkills(skills, keyword) {
295
305
  const lower = keyword.toLowerCase();
296
306
  return skills.filter(
297
- (s) => s.id.toLowerCase().includes(lower) || s.displayName && s.displayName.toLowerCase().includes(lower) || s.description && s.description.toLowerCase().includes(lower)
307
+ (s) => s.id.toLowerCase().includes(lower)
298
308
  );
299
309
  }
300
310
  async function listSkills(options) {
@@ -327,8 +337,9 @@ async function listSkills(options) {
327
337
  const pageSkills = skills.slice(start, end);
328
338
  for (const skill of pageSkills) {
329
339
  console.log(` ${skill.id}@${skill.version}`);
330
- console.log(` Platforms: ${skill.platforms.join(", ")}`);
331
- console.log(` Installed: ${skill.installedAt}`);
340
+ const platforms = skill.platforms?.join(", ") || "N/A";
341
+ console.log(` Platforms: ${platforms}`);
342
+ console.log(` Installed: ${formatDate(skill.installedAt)}`);
332
343
  console.log();
333
344
  }
334
345
  console.log(`Page ${currentPage}/${totalPages} (${limit} per page) | Use --page N to navigate`);
@@ -375,14 +386,14 @@ async function listSkills(options) {
375
386
  const latestVersion = info["dist-tags"]?.latest || "unknown";
376
387
  const pkg = info.versions?.[latestVersion];
377
388
  const skillMeta = pkg?.skillmarket;
389
+ const versionCount = info.versions ? Object.keys(info.versions).length : 0;
378
390
  console.log(`\u{1F4E6} ${info.name}@${latestVersion}`);
379
391
  const displayName = skillMeta?.displayName || info.name;
380
392
  console.log(` \u540D\u79F0: ${displayName}`);
381
393
  console.log(` \u63CF\u8FF0: ${pkg?.description || "N/A"}`);
382
394
  const platforms = skillMeta?.platforms || [];
383
395
  console.log(` \u5E73\u53F0: ${platforms.length > 0 ? platforms.join(", ") : "N/A"}`);
384
- const npmLink = pkg?.links?.npm || `https://www.npmjs.com/package/${info.name}`;
385
- console.log(` \u94FE\u63A5: ${npmLink}`);
396
+ console.log(` \u7248\u672C: ${versionCount} | \u94FE\u63A5: ${pkg?.links?.npm || `https://www.npmjs.com/package/${info.name}`}`);
386
397
  console.log();
387
398
  } catch (e) {
388
399
  console.log(`\u{1F4E6} ${pkgName} (\u83B7\u53D6\u5931\u8D25: ${e})`);
@@ -1470,7 +1481,7 @@ Installing to ${targetPlatforms.length} platform(s)...
1470
1481
 
1471
1482
  // src/commands/publish.ts
1472
1483
  import { exec as exec2 } from "child_process";
1473
- import { existsSync as existsSync2 } from "fs";
1484
+ import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
1474
1485
  import { join as join2 } from "path";
1475
1486
  import { fileURLToPath } from "url";
1476
1487
  import { promisify as promisify2 } from "util";
@@ -1501,15 +1512,53 @@ async function publishSkill(skillName, options) {
1501
1512
  throw new Error(`Failed to update version: ${err}`);
1502
1513
  }
1503
1514
  }
1504
- console.log("Publishing to npm...");
1505
- try {
1506
- await execAsync2("npm publish --access=public", { cwd: skillDir });
1507
- } catch (err) {
1508
- throw new Error(`Failed to publish: ${err}`);
1515
+ const pkgJsonPath = join2(skillDir, "package.json");
1516
+ let baseName = skillName;
1517
+ if (existsSync2(pkgJsonPath)) {
1518
+ try {
1519
+ const pkg = JSON.parse(readFileSync2(pkgJsonPath, "utf-8"));
1520
+ if (pkg.name) {
1521
+ baseName = pkg.name.includes("/") ? pkg.name.split("/")[1] : pkg.name;
1522
+ }
1523
+ } catch {
1524
+ }
1525
+ }
1526
+ const scopesToTry = [
1527
+ NPM_SCOPE,
1528
+ ...SKILL_SCOPES.filter((s) => s !== NPM_SCOPE)
1529
+ ];
1530
+ let lastError = null;
1531
+ let publishedName = "";
1532
+ for (const scope of scopesToTry) {
1533
+ const targetName = `${scope}/${baseName}`;
1534
+ if (existsSync2(pkgJsonPath)) {
1535
+ try {
1536
+ const pkg = JSON.parse(readFileSync2(pkgJsonPath, "utf-8"));
1537
+ pkg.name = targetName;
1538
+ writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n");
1539
+ } catch {
1540
+ }
1541
+ }
1542
+ console.log(`Publishing as ${targetName}...`);
1543
+ try {
1544
+ await execAsync2("npm publish --access=public", { cwd: skillDir });
1545
+ publishedName = targetName;
1546
+ break;
1547
+ } catch (err) {
1548
+ lastError = err instanceof Error ? err : new Error(String(err));
1549
+ const errMsg = String(err);
1550
+ if (!errMsg.includes("404")) {
1551
+ break;
1552
+ }
1553
+ console.log(` Scope ${scope} not available, trying next...`);
1554
+ }
1555
+ }
1556
+ if (!publishedName) {
1557
+ throw lastError || new Error("Failed to publish to npm");
1509
1558
  }
1510
1559
  console.log(`
1511
- \u2705 ${skillName} published successfully!`);
1512
- console.log(` View at: ${SKM_URL}/${skillName}`);
1560
+ \u2705 ${skillName} published successfully as ${publishedName}!`);
1561
+ console.log(` View at: https://www.npmjs.com/package/${publishedName}`);
1513
1562
  }
1514
1563
 
1515
1564
  // src/commands/verify.ts
@@ -1608,7 +1657,7 @@ async function verifySkill(skillName) {
1608
1657
 
1609
1658
  // src/commands/ui.ts
1610
1659
  import { createServer } from "http";
1611
- import { readFileSync as readFileSync2, existsSync as existsSync3, mkdirSync, rmSync, readdirSync, renameSync } from "fs";
1660
+ import { readFileSync as readFileSync3, existsSync as existsSync3, mkdirSync, rmSync, readdirSync, renameSync } from "fs";
1612
1661
  import { join as join3, extname, dirname, basename } from "path";
1613
1662
  import { fileURLToPath as fileURLToPath3 } from "url";
1614
1663
  import AdmZip from "adm-zip";
@@ -2342,7 +2391,7 @@ API_ROUTES.GET["/api/skill-info"] = async (_req, res, url) => {
2342
2391
  API_ROUTES.GET["/api/version"] = async (_req, res, _url) => {
2343
2392
  try {
2344
2393
  const pkgPath = join3(__dirname2, "..", "package.json");
2345
- const pkg = JSON.parse(readFileSync2(pkgPath, "utf-8"));
2394
+ const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
2346
2395
  jsonResponse(res, 200, { version: pkg.version || "1.0.0" });
2347
2396
  } catch {
2348
2397
  jsonResponse(res, 200, { version: "1.0.0" });
@@ -2645,7 +2694,7 @@ API_ROUTES.POST["/api/upload"] = async (req, res, _url) => {
2645
2694
  const pkgJsonPath = findFileSync(skillDir, "package.json") || join3(skillDir, "package.json");
2646
2695
  if (existsSync3(pkgJsonPath)) {
2647
2696
  try {
2648
- pkgInfo = JSON.parse(readFileSync2(pkgJsonPath, "utf-8"));
2697
+ pkgInfo = JSON.parse(readFileSync3(pkgJsonPath, "utf-8"));
2649
2698
  } catch {
2650
2699
  }
2651
2700
  }
@@ -2727,7 +2776,7 @@ function serveStaticFile(res, filePath) {
2727
2776
  res.end("Not Found");
2728
2777
  return;
2729
2778
  }
2730
- const content = readFileSync2(filePath);
2779
+ const content = readFileSync3(filePath);
2731
2780
  const ext = extname(filePath);
2732
2781
  const mime = MIME_TYPES[ext] || "application/octet-stream";
2733
2782
  res.writeHead(200, {
@@ -3002,7 +3051,7 @@ async function resetConfig(key, all = false) {
3002
3051
  // src/cli.ts
3003
3052
  var __filename3 = fileURLToPath4(import.meta.url);
3004
3053
  var __dirname3 = dirname2(__filename3);
3005
- var packageJson = JSON.parse(readFileSync3(resolve(__dirname3, "../package.json"), "utf-8"));
3054
+ var packageJson = JSON.parse(readFileSync4(resolve(__dirname3, "../package.json"), "utf-8"));
3006
3055
  var VERSION = packageJson.version || "1.3.1";
3007
3056
  var program = new Command();
3008
3057
  program.name("skm").description("SkillMarket - Cross-platform skill manager for AI coding tools").version(VERSION);
@@ -3021,6 +3070,7 @@ Commands:
3021
3070
  --limit <n> Items per page (default: 20)
3022
3071
  -s, --search Search by keyword
3023
3072
  search <keyword> Search skills from npm registry
3073
+ -l, --limit Max results (default: 20)
3024
3074
  info <skill> Display skill information
3025
3075
  install <skill> Install a skill from npm or GitHub
3026
3076
  @<version> Install specific version
@@ -3042,6 +3092,7 @@ Commands:
3042
3092
  platforms Show available platforms
3043
3093
  gui [port] Start SkillMarket GUI web interface
3044
3094
  config View and manage configuration
3095
+ config [ls] List all configuration values
3045
3096
  config get <key> Get a config value
3046
3097
  config set <key> <val> Set a config value
3047
3098
  config reset [key] Reset config to defaults
@@ -3063,6 +3114,7 @@ Examples:
3063
3114
  skm ls --installed Show installed skills
3064
3115
  skm ls -s brain Search skills by keyword
3065
3116
  skm search test Search from registry
3117
+ skm search test --limit 10 Search with result limit
3066
3118
  skm info brainstorming View skill details
3067
3119
  skm install brainstorming Install to all detected platforms
3068
3120
  skm install brainstorming@1.0.0 Install specific version
@@ -3088,6 +3140,7 @@ Examples:
3088
3140
  skm config reset npmScope Reset config to default
3089
3141
  skm config reset --all Reset all config
3090
3142
  skm admin ls List all published skills
3143
+ skm admin stats Publishing statistics
3091
3144
  skm admin deprecate my-skill --message "Use v2" Deprecate a skill
3092
3145
  `);
3093
3146
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itismyskillmarket",
3
- "version": "1.3.34",
3
+ "version": "1.3.36",
4
4
  "description": "Cross-platform skill manager for AI coding tools",
5
5
  "type": "module",
6
6
  "bin": {