@buiducnhat/agent-skills 0.5.4 → 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 +21 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2069,7 +2069,6 @@ const AGENT_SKILLS_DIRS = {
2069
2069
  "codex",
2070
2070
  "github-copilot",
2071
2071
  "gemini-cli",
2072
- "cline",
2073
2072
  "kimi-cli",
2074
2073
  "replit",
2075
2074
  "amp"
@@ -2300,6 +2299,25 @@ function detectAgentsFromFilesystem(projectDir) {
2300
2299
  }
2301
2300
  return detected;
2302
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
+ }
2303
2321
  function printHelp() {
2304
2322
  console.log(`
2305
2323
  @buiducnhat/agent-skills - Install AI agent workflow skills for coding assistants
@@ -2372,6 +2390,7 @@ async function main() {
2372
2390
  process.exit(1);
2373
2391
  }
2374
2392
  selectedAgents = detectAgentsFromFilesystem(baseDir);
2393
+ if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, args.copy);
2375
2394
  if (selectedAgents.length === 0) {
2376
2395
  R.warn("No agents detected from filesystem. Skills may have been installed but rules injection was skipped.");
2377
2396
  Le(import_picocolors.default.yellow("Done. No agent rules files were updated."));
@@ -2418,6 +2437,7 @@ async function main() {
2418
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"));
2419
2438
  process.exit(1);
2420
2439
  }
2440
+ if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, copyFlag);
2421
2441
  }
2422
2442
  R.info(`Configuring agents: ${selectedAgents.join(", ")}`);
2423
2443
  let tempDir;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buiducnhat/agent-skills",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Install AI agent workflow skills for coding assistants",
5
5
  "type": "module",
6
6
  "bin": {