@buiducnhat/agent-skills 0.5.5 → 0.5.6

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 +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
- import fs, { existsSync, lstatSync, mkdtempSync, readdirSync } from "node:fs";
3
+ import fs, { existsSync, lstatSync, mkdtempSync, readdirSync, rmSync } from "node:fs";
4
4
  import os, { tmpdir } from "node:os";
5
5
  import path, { dirname, join } from "node:path";
6
6
  import N, { stdin, stdout } from "node:process";
@@ -2174,7 +2174,10 @@ async function fetchTemplates() {
2174
2174
  }
2175
2175
  function cleanupTemp(tempDir) {
2176
2176
  try {
2177
- execSync(`rm -rf "${tempDir}"`, { stdio: "pipe" });
2177
+ rmSync(tempDir, {
2178
+ recursive: true,
2179
+ force: true
2180
+ });
2178
2181
  } catch {}
2179
2182
  }
2180
2183
 
@@ -2248,7 +2251,8 @@ async function runSkillsAdd(projectDir, agents, copy = false, global = false) {
2248
2251
  return new Promise((resolve) => {
2249
2252
  const child = spawn("npx", args, {
2250
2253
  cwd: projectDir,
2251
- stdio: "inherit"
2254
+ stdio: "inherit",
2255
+ shell: true
2252
2256
  });
2253
2257
  child.on("close", (code) => {
2254
2258
  resolve({ success: code === 0 });
@@ -2315,7 +2319,15 @@ function setupCursorSkillsDir(baseDir, copy) {
2315
2319
  recursive: true,
2316
2320
  force: true
2317
2321
  });
2318
- else if (!fs.existsSync(destPath)) fs.symlinkSync(srcPath, destPath);
2322
+ else if (!fs.existsSync(destPath)) try {
2323
+ fs.symlinkSync(srcPath, destPath);
2324
+ } catch {
2325
+ R.warn(`Symlink not supported — copying ${name} instead. Use --copy to suppress this warning.`);
2326
+ fs.cpSync(srcPath, destPath, {
2327
+ recursive: true,
2328
+ force: true
2329
+ });
2330
+ }
2319
2331
  }
2320
2332
  }
2321
2333
  function printHelp() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buiducnhat/agent-skills",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Install AI agent workflow skills for coding assistants",
5
5
  "type": "module",
6
6
  "bin": {