@buiducnhat/agent-skills 0.5.9 → 0.5.11
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/index.js +0 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2302,33 +2302,6 @@ function detectAgentsFromFilesystem(projectDir) {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
return detected;
|
|
2304
2304
|
}
|
|
2305
|
-
function setupCursorSkillsDir(baseDir, copy) {
|
|
2306
|
-
const src = path.join(baseDir, ".agents", "skills");
|
|
2307
|
-
const dest = path.join(baseDir, ".cursor", "skills");
|
|
2308
|
-
if (!fs.existsSync(src)) {
|
|
2309
|
-
R.warn("`.agents/skills/` not found — skipping Cursor skills mirror.");
|
|
2310
|
-
return;
|
|
2311
|
-
}
|
|
2312
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
2313
|
-
const entries = fs.readdirSync(src);
|
|
2314
|
-
for (const name of entries) {
|
|
2315
|
-
const srcPath = path.join(src, name);
|
|
2316
|
-
const destPath = path.join(dest, name);
|
|
2317
|
-
if (copy) fs.cpSync(srcPath, destPath, {
|
|
2318
|
-
recursive: true,
|
|
2319
|
-
force: true
|
|
2320
|
-
});
|
|
2321
|
-
else if (!fs.existsSync(destPath)) try {
|
|
2322
|
-
fs.symlinkSync(srcPath, destPath);
|
|
2323
|
-
} catch {
|
|
2324
|
-
R.warn(`Symlink not supported — copying ${name} instead. Use --copy to suppress this warning.`);
|
|
2325
|
-
fs.cpSync(srcPath, destPath, {
|
|
2326
|
-
recursive: true,
|
|
2327
|
-
force: true
|
|
2328
|
-
});
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
2305
|
function printHelp() {
|
|
2333
2306
|
console.log(`
|
|
2334
2307
|
@buiducnhat/agent-skills - Install AI agent workflow skills for coding assistants
|
|
@@ -2401,7 +2374,6 @@ async function main() {
|
|
|
2401
2374
|
process.exit(1);
|
|
2402
2375
|
}
|
|
2403
2376
|
selectedAgents = detectAgentsFromFilesystem(baseDir);
|
|
2404
|
-
if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, args.copy);
|
|
2405
2377
|
if (selectedAgents.length === 0) {
|
|
2406
2378
|
R.warn("No agents detected from filesystem. Skills may have been installed but rules injection was skipped.");
|
|
2407
2379
|
Le(import_picocolors.default.yellow("Done. No agent rules files were updated."));
|
|
@@ -2448,7 +2420,6 @@ async function main() {
|
|
|
2448
2420
|
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"));
|
|
2449
2421
|
process.exit(1);
|
|
2450
2422
|
}
|
|
2451
|
-
if (selectedAgents.includes("cursor")) setupCursorSkillsDir(baseDir, copyFlag);
|
|
2452
2423
|
}
|
|
2453
2424
|
R.info(`Configuring agents: ${selectedAgents.join(", ")}`);
|
|
2454
2425
|
let tempDir;
|