skillmkt 0.1.0 → 0.1.1
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/client/commands/pack.js +22 -0
- package/client/commands/publish.js +10 -0
- package/package.json +16 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// pack <name> — hub/local skill → <name>-<ver>.tar.gz(npm pack 语义)
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
6
|
+
import { ok, fail, info } from '../lib/render.js';
|
|
7
|
+
|
|
8
|
+
export async function run(ctx) {
|
|
9
|
+
const name = ctx.args[0];
|
|
10
|
+
if (!name) { fail('usage: skillmkt pack <name>'); return 1; }
|
|
11
|
+
const src = path.join(ctx.hub, 'skills', name);
|
|
12
|
+
if (!fs.existsSync(path.join(src, 'SKILL.md'))) { fail(`未受管: ${name}`); return 1; }
|
|
13
|
+
const ver = ctx.library.skills?.[name]?.version || '0.0.0';
|
|
14
|
+
const out = path.resolve(`${name}-${ver}.tar.gz`);
|
|
15
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'skillmkt-pack-'));
|
|
16
|
+
fs.mkdirSync(path.join(tmp, name), { recursive: true });
|
|
17
|
+
execFileSync('cp', ['-R', src + '/', path.join(tmp, name)]);
|
|
18
|
+
execFileSync('tar', ['czf', out, '-C', tmp, name]);
|
|
19
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
20
|
+
ok(`packed ${out} (${(fs.statSync(out).size / 1024).toFixed(1)} KB)`);
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// publish <name> --to <registry> — 二期适配器;一期友好报错(clawhub POST /skills)
|
|
2
|
+
import { fail } from '../lib/render.js';
|
|
3
|
+
|
|
4
|
+
export async function run(ctx) {
|
|
5
|
+
const name = ctx.args[0];
|
|
6
|
+
const to = ctx.flags.raw.to;
|
|
7
|
+
if (!name || !to) { fail('usage: skillmkt publish <name> --to <registry>'); return 1; }
|
|
8
|
+
fail(`publish: '${to}' adapter 未实现(二期:clawhub POST /api/v1/skills / 企业 registry)——当前可用 skillmkt pack ${name} 出包手动分发`);
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillmkt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local-first agent skill manager: install, audit, merge, distribute.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/terry2010/awesome-skill-market.git"
|
|
10
|
+
},
|
|
8
11
|
"bugs": "https://github.com/terry2010/awesome-skill-market/issues",
|
|
9
12
|
"homepage": "https://github.com/terry2010/awesome-skill-market#readme",
|
|
10
|
-
"keywords": [
|
|
13
|
+
"keywords": [
|
|
14
|
+
"agent-skills",
|
|
15
|
+
"skill-manager",
|
|
16
|
+
"claude-code",
|
|
17
|
+
"codex",
|
|
18
|
+
"opencode",
|
|
19
|
+
"devin",
|
|
20
|
+
"skill-audit",
|
|
21
|
+
"skill-merge",
|
|
22
|
+
"anti-ai-slop"
|
|
23
|
+
],
|
|
11
24
|
"bin": {
|
|
12
25
|
"skillmkt": "client/bin/skillmkt.js"
|
|
13
26
|
},
|