@ichintansoni/skills-master 0.1.30 → 0.2.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.
- package/dist/bin.js +41 -23
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.
|
|
7
|
+
var version = "0.2.0";
|
|
8
8
|
|
|
9
9
|
// src/schema/projectConfig.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -1997,9 +1997,10 @@ var CLASS_CATEGORY = {
|
|
|
1997
1997
|
};
|
|
1998
1998
|
var PLUGINS_DIR = "plugins";
|
|
1999
1999
|
var MARKETPLACE_JSON = ".claude-plugin/marketplace.json";
|
|
2000
|
-
function pluginName(domain, cls) {
|
|
2000
|
+
function pluginName(domain, cls, category) {
|
|
2001
2001
|
const clsSeg = cls === "overview" ? "overviews" : cls;
|
|
2002
|
-
|
|
2002
|
+
const base = `skills-master-${domain}-${clsSeg}`;
|
|
2003
|
+
return category ? `${base}-${category}` : base;
|
|
2003
2004
|
}
|
|
2004
2005
|
function titleCase(s) {
|
|
2005
2006
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
@@ -2019,33 +2020,50 @@ function listFiles(root, dir, acc = []) {
|
|
|
2019
2020
|
}
|
|
2020
2021
|
function buildOutputs(content, out, version2) {
|
|
2021
2022
|
const groups = /* @__PURE__ */ new Map();
|
|
2022
|
-
|
|
2023
|
-
|
|
2023
|
+
const skills = content.skillDirs().map((dir) => content.loadSkill(dir.split(/[\\/]/).pop()));
|
|
2024
|
+
const categoriesPerClass = /* @__PURE__ */ new Map();
|
|
2025
|
+
for (const skill of skills) {
|
|
2024
2026
|
const xm = skill.frontmatter["x-skills-master"];
|
|
2025
2027
|
const key = `${xm.domain}:${xm.class}`;
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2028
|
+
(categoriesPerClass.get(key) ?? categoriesPerClass.set(key, /* @__PURE__ */ new Set()).get(key)).add(
|
|
2029
|
+
xm.category
|
|
2030
|
+
);
|
|
2031
|
+
}
|
|
2032
|
+
for (const skill of skills) {
|
|
2033
|
+
const xm = skill.frontmatter["x-skills-master"];
|
|
2034
|
+
const splits = (categoriesPerClass.get(`${xm.domain}:${xm.class}`)?.size ?? 0) > 1 ? [void 0, xm.category] : [void 0];
|
|
2035
|
+
for (const category of splits) {
|
|
2036
|
+
const key = `${xm.domain}:${xm.class}:${category ?? ""}`;
|
|
2037
|
+
const name = pluginName(xm.domain, xm.class, category);
|
|
2038
|
+
const ctx = {
|
|
2039
|
+
projectRoot: out,
|
|
2040
|
+
paths: {
|
|
2041
|
+
claude: `${PLUGINS_DIR}/${name}/skills`,
|
|
2042
|
+
cursor: "",
|
|
2043
|
+
copilot: "",
|
|
2044
|
+
agents: ""
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
const files = claudeEmitter.emit(skill, ctx);
|
|
2048
|
+
const g = groups.get(key) ?? {
|
|
2049
|
+
domain: xm.domain,
|
|
2050
|
+
cls: xm.class,
|
|
2051
|
+
category,
|
|
2052
|
+
files: [],
|
|
2053
|
+
count: 0
|
|
2054
|
+
};
|
|
2055
|
+
g.files.push(...files);
|
|
2056
|
+
g.count += 1;
|
|
2057
|
+
groups.set(key, g);
|
|
2058
|
+
}
|
|
2041
2059
|
}
|
|
2042
2060
|
const outFiles = /* @__PURE__ */ new Map();
|
|
2043
2061
|
const counts = [];
|
|
2044
2062
|
const plugins = [];
|
|
2045
|
-
for (const { domain, cls, files, count } of groups.values()) {
|
|
2046
|
-
const name = pluginName(domain, cls);
|
|
2063
|
+
for (const { domain, cls, category, files, count } of groups.values()) {
|
|
2064
|
+
const name = pluginName(domain, cls, category);
|
|
2047
2065
|
for (const f of files) outFiles.set(toPosix(f.path), f.contents);
|
|
2048
|
-
const description = `${titleCase(domain)} ${CLASS_LABEL[cls]}.`;
|
|
2066
|
+
const description = category ? `${titleCase(domain)} ${CLASS_LABEL[cls]} \u2014 ${category} only. Smaller install: keeps the agent's always-on skill listing within budget.` : `${titleCase(domain)} ${CLASS_LABEL[cls]}.`;
|
|
2049
2067
|
const manifest = {
|
|
2050
2068
|
name,
|
|
2051
2069
|
version: version2,
|
package/package.json
CHANGED