mdk-skills 2.2.6 → 2.2.8

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "test1",
3
+ "version": "1.0.0",
4
+ "description": "测试技能1",
5
+ "tags": ["test", "frontend"]
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "test2",
3
+ "version": "1.0.0",
4
+ "description": "测试技能2",
5
+ "tags": ["test", "frontend"]
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "test3",
3
+ "version": "1.0.0",
4
+ "description": "测试技能3",
5
+ "tags": ["test", "frontend"]
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdk-skills",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "description": "mdk-engineer - 沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
@@ -313,6 +313,7 @@ async function handleApi(req, res) {
313
313
  if (method === "GET" && pathname === "/api/status") {
314
314
  const settings = readSettings();
315
315
  const userSkills = core.getUserSkills(claudeDest);
316
+ const pkgSkills = core.getPackageSkills(skillsSource);
316
317
  const profiles = loadProfiles();
317
318
  const activeProfile = profiles?.find(
318
319
  (p) => p.id === settings._active_profile,
@@ -320,8 +321,9 @@ async function handleApi(req, res) {
320
321
  const enabledCount = userSkills.filter((s) => s.enabled).length;
321
322
  const mdExists = fs.existsSync(path.join(projectRoot, "CLAUDE.md"));
322
323
  return sendJSON(res, {
324
+ pkgSkills,
323
325
  enabledCount,
324
- totalCount: userSkills.length,
326
+ totalCount: pkgSkills.length,
325
327
  activeProfile: activeProfile
326
328
  ? { id: activeProfile.id, name: activeProfile.name }
327
329
  : null,
@@ -343,11 +345,14 @@ async function handleApi(req, res) {
343
345
  if (method === "POST" && pathname === "/api/source/connect") {
344
346
  const body = await parseBody(req);
345
347
  const repoPath = body.path;
346
- if (!repoPath)
347
- return sendJSON(res, { error: "缺少仓库路径" }, 400);
348
+ if (!repoPath) return sendJSON(res, { error: "缺少仓库路径" }, 400);
348
349
  const resolved = path.resolve(repoPath);
349
350
  if (!fs.existsSync(path.join(resolved, ".claude", "skills"))) {
350
- return sendJSON(res, { error: `路径 "${resolved}" 下没有 .claude/skills/` }, 400);
351
+ return sendJSON(
352
+ res,
353
+ { error: `路径 "${resolved}" 下没有 .claude/skills/` },
354
+ 400,
355
+ );
351
356
  }
352
357
  const settings = readSettings();
353
358
  settings._skill_source = resolved;
@@ -372,8 +377,7 @@ async function handleApi(req, res) {
372
377
  if (method === "POST" && pathname === "/api/source/sync") {
373
378
  const settings = readSettings();
374
379
  const sourcePath = settings._skill_source;
375
- if (!sourcePath)
376
- return sendJSON(res, { error: "尚未绑定技能源" }, 400);
380
+ if (!sourcePath) return sendJSON(res, { error: "尚未绑定技能源" }, 400);
377
381
  if (!fs.existsSync(path.join(sourcePath, ".claude"))) {
378
382
  return sendJSON(res, { error: "绑定的路径已失效" }, 400);
379
383
  }