@buiducnhat/agent-skills 0.1.0 → 0.1.1

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 (3) hide show
  1. package/README.md +37 -0
  2. package/dist/index.js +13 -2
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @buiducnhat/agent-skills
2
+
3
+ Install AI agent skills and Ruler configuration for coding assistants.
4
+
5
+ `@buiducnhat/agent-skills` bootstraps `.ruler/` and `.claude/` into your repository, configures selected agents, and runs `ruler apply` to generate agent-specific outputs.
6
+
7
+ ## Quick start
8
+
9
+ ### Run with npx
10
+
11
+ ```bash
12
+ npx @buiducnhat/agent-skills
13
+ ```
14
+
15
+ ### Select agents non-interactively
16
+
17
+ ```bash
18
+ npx @buiducnhat/agent-skills --agents claude,cursor,copilot
19
+ ```
20
+
21
+ ## CLI options
22
+
23
+ - `--agents <list>`: comma-separated agent IDs (also enables non-interactive mode)
24
+ - `--non-interactive`: skip prompts and use defaults
25
+ - `-h, --help`: show help
26
+ - `-v, --version`: show version
27
+
28
+ ## Requirements
29
+
30
+ - Node.js `>=18`
31
+ - `git` available in your environment
32
+ - Network access to download templates and run `npx @intellectronica/ruler`
33
+
34
+ ## Repository
35
+
36
+ - Source: https://github.com/buiducnhat/agent-skills
37
+ - Issues: https://github.com/buiducnhat/agent-skills/issues
package/dist/index.js CHANGED
@@ -1557,12 +1557,22 @@ async function copyTemplates(tempDir, projectDir, action) {
1557
1557
  }
1558
1558
  if (fs.existsSync(srcRuler)) {
1559
1559
  copyDirectory(srcRuler, destRuler);
1560
- const scriptsDir = path.join(destRuler, "scripts");
1561
- if (fs.existsSync(scriptsDir)) for (const script of fs.readdirSync(scriptsDir).filter((f) => f.endsWith(".sh"))) fs.chmodSync(path.join(scriptsDir, script), 493);
1560
+ makeScriptsExecutable(path.join(destRuler, "scripts"));
1562
1561
  }
1563
1562
  if (fs.existsSync(srcClaude)) copyDirectory(srcClaude, destClaude);
1564
1563
  s.stop("Copied templates to project");
1565
1564
  }
1565
+ function ensureRulerScripts(tempDir, projectDir) {
1566
+ const srcScripts = path.join(tempDir, "templates", ".ruler", "scripts");
1567
+ const destScripts = path.join(projectDir, ".ruler", "scripts");
1568
+ if (!fs.existsSync(srcScripts)) return;
1569
+ copyDirectory(srcScripts, destScripts);
1570
+ makeScriptsExecutable(destScripts);
1571
+ }
1572
+ function makeScriptsExecutable(scriptsDir) {
1573
+ if (!fs.existsSync(scriptsDir)) return;
1574
+ for (const script of fs.readdirSync(scriptsDir).filter((fileName) => fileName.endsWith(".sh"))) fs.chmodSync(path.join(scriptsDir, script), 493);
1575
+ }
1566
1576
  function printHelp() {
1567
1577
  console.log(`
1568
1578
  @buiducnhat/agent-skills - Install AI agent skills for coding assistants
@@ -1651,6 +1661,7 @@ async function main() {
1651
1661
  await copyTemplates(tempDir, cwd, action);
1652
1662
  configureRulerToml(cwd, selectedAgents);
1653
1663
  await runRulerApply(cwd, selectedAgents);
1664
+ ensureRulerScripts(tempDir, cwd);
1654
1665
  printSummary(selectedAgents, cwd);
1655
1666
  Se(import_picocolors.default.green("Done! Your AI agent skills are ready."));
1656
1667
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buiducnhat/agent-skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Install AI agent skills and ruler configuration for coding assistants",
5
5
  "type": "module",
6
6
  "bin": {