@buiducnhat/agent-skills 0.5.3 → 0.5.5

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/dist/index.js +64 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2062,39 +2062,47 @@ const SUPPORTED_AGENTS = [
2062
2062
  }
2063
2063
  ];
2064
2064
  const AGENT_SKILLS_DIRS = {
2065
- ".adal": "adal",
2066
- ".agent": "antigravity",
2067
- ".agents": "opencode",
2068
- ".augment": "augment",
2069
- ".claude": "claude-code",
2070
- ".codebuddy": "codebuddy",
2071
- ".commandcode": "command-code",
2072
- ".continue": "continue",
2073
- ".cortex": "cortex",
2074
- ".crush": "crush",
2075
- ".cursor": "cursor",
2076
- ".factory": "droid",
2077
- ".gemini": "gemini-cli",
2078
- ".goose": "goose",
2079
- ".iflow": "iflow-cli",
2080
- ".junie": "junie",
2081
- ".kilocode": "kilo",
2082
- ".kiro": "kiro-cli",
2083
- ".kode": "kode",
2084
- ".mcpjam": "mcpjam",
2085
- ".mux": "mux",
2086
- ".neovate": "neovate",
2087
- ".openhands": "openhands",
2088
- ".pi": "pi",
2089
- ".pochi": "pochi",
2090
- ".qoder": "qoder",
2091
- ".qwen": "qwen-code",
2092
- ".roo": "roo",
2093
- ".trae": "trae",
2094
- ".vibe": "mistral-vibe",
2095
- ".windsurf": "windsurf",
2096
- ".zencoder": "zencoder",
2097
- skills: "openclaw"
2065
+ ".adal": ["adal"],
2066
+ ".agent": ["antigravity"],
2067
+ ".agents": [
2068
+ "opencode",
2069
+ "codex",
2070
+ "github-copilot",
2071
+ "gemini-cli",
2072
+ "kimi-cli",
2073
+ "replit",
2074
+ "amp"
2075
+ ],
2076
+ ".augment": ["augment"],
2077
+ ".claude": ["claude-code"],
2078
+ ".codebuddy": ["codebuddy"],
2079
+ ".commandcode": ["command-code"],
2080
+ ".continue": ["continue"],
2081
+ ".cortex": ["cortex"],
2082
+ ".crush": ["crush"],
2083
+ ".cursor": ["cursor"],
2084
+ ".factory": ["droid"],
2085
+ ".gemini": ["gemini-cli", "antigravity"],
2086
+ ".goose": ["goose"],
2087
+ ".iflow": ["iflow-cli"],
2088
+ ".junie": ["junie"],
2089
+ ".kilocode": ["kilo"],
2090
+ ".kiro": ["kiro-cli"],
2091
+ ".kode": ["kode"],
2092
+ ".mcpjam": ["mcpjam"],
2093
+ ".mux": ["mux"],
2094
+ ".neovate": ["neovate"],
2095
+ ".openhands": ["openhands"],
2096
+ ".pi": ["pi"],
2097
+ ".pochi": ["pochi"],
2098
+ ".qoder": ["qoder"],
2099
+ ".qwen": ["qwen-code"],
2100
+ ".roo": ["roo"],
2101
+ ".trae": ["trae"],
2102
+ ".vibe": ["mistral-vibe"],
2103
+ ".windsurf": ["windsurf"],
2104
+ ".zencoder": ["zencoder"],
2105
+ skills: ["openclaw"]
2098
2106
  };
2099
2107
  const AGENT_RULES_MAP = {
2100
2108
  "github-copilot": "AGENTS.md",
@@ -2285,12 +2293,31 @@ function parseArgs(argv) {
2285
2293
  }
2286
2294
  function detectAgentsFromFilesystem(projectDir) {
2287
2295
  const detected = [];
2288
- for (const [dirPrefix, agentId] of Object.entries(AGENT_SKILLS_DIRS)) {
2296
+ for (const [dirPrefix, agentIds] of Object.entries(AGENT_SKILLS_DIRS)) {
2289
2297
  const skillsDir = path.join(projectDir, dirPrefix, "skills");
2290
- if (fs.existsSync(skillsDir)) detected.push(agentId);
2298
+ if (fs.existsSync(skillsDir)) detected.push(...agentIds);
2291
2299
  }
2292
2300
  return detected;
2293
2301
  }
2302
+ function setupCursorSkillsDir(baseDir, copy) {
2303
+ const src = path.join(baseDir, ".agents", "skills");
2304
+ const dest = path.join(baseDir, ".cursor", "skills");
2305
+ if (!fs.existsSync(src)) {
2306
+ R.warn("`.agents/skills/` not found — skipping Cursor skills mirror.");
2307
+ return;
2308
+ }
2309
+ fs.mkdirSync(dest, { recursive: true });
2310
+ const entries = fs.readdirSync(src);
2311
+ for (const name of entries) {
2312
+ const srcPath = path.join(src, name);
2313
+ const destPath = path.join(dest, name);
2314
+ if (copy) fs.cpSync(srcPath, destPath, {
2315
+ recursive: true,
2316
+ force: true
2317
+ });
2318
+ else if (!fs.existsSync(destPath)) fs.symlinkSync(srcPath, destPath);
2319
+ }
2320
+ }
2294
2321
  function printHelp() {
2295
2322
  console.log(`
2296
2323
  @buiducnhat/agent-skills - Install AI agent workflow skills for coding assistants
@@ -2363,6 +2390,7 @@ async function main() {
2363
2390
  process.exit(1);
2364
2391
  }
2365
2392
  selectedAgents = detectAgentsFromFilesystem(baseDir);
2393
+ if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, args.copy);
2366
2394
  if (selectedAgents.length === 0) {
2367
2395
  R.warn("No agents detected from filesystem. Skills may have been installed but rules injection was skipped.");
2368
2396
  Le(import_picocolors.default.yellow("Done. No agent rules files were updated."));
@@ -2409,6 +2437,7 @@ async function main() {
2409
2437
  Ne(import_picocolors.default.red("Skills CLI failed. See errors above.\nYou can try running manually: npx skills add buiducnhat/agent-skills --skill '*' -a <agent> -y"));
2410
2438
  process.exit(1);
2411
2439
  }
2440
+ if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, copyFlag);
2412
2441
  }
2413
2442
  R.info(`Configuring agents: ${selectedAgents.join(", ")}`);
2414
2443
  let tempDir;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buiducnhat/agent-skills",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Install AI agent workflow skills for coding assistants",
5
5
  "type": "module",
6
6
  "bin": {