alxx-agent-skill 1.0.0

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 ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { Command } from "commander";
5
+ import fs from "fs-extra";
6
+ import path from "path";
7
+ import pc from "picocolors";
8
+ var program = new Command();
9
+ program.name("alxx-agent-skill").argument("<name>", "Skill name").description("Create a new Agent Skill").action(async (name) => {
10
+ const root = path.resolve(process.cwd(), name);
11
+ if (await fs.pathExists(root)) {
12
+ console.log(pc.red("Directory already exists."));
13
+ process.exit(1);
14
+ }
15
+ await fs.ensureDir(root);
16
+ await fs.writeFile(
17
+ path.join(root, "SKILL.md"),
18
+ `---
19
+ name: ${name}
20
+ description: Describe what this skill does.
21
+ ---
22
+
23
+ # ${name}
24
+
25
+ ## Instructions
26
+
27
+ Replace these instructions with your workflow.
28
+ `
29
+ );
30
+ await fs.ensureDir(path.join(root, "scripts"));
31
+ await fs.ensureDir(path.join(root, "references"));
32
+ await fs.ensureDir(path.join(root, "assets"));
33
+ await fs.writeFile(
34
+ path.join(root, "README.md"),
35
+ `# ${name}
36
+ Generated by allexx-agent-skill.
37
+ `
38
+ );
39
+ console.log(pc.green("\u2714 Skill created"));
40
+ console.log(pc.cyan(root));
41
+ });
42
+ program.parse();
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "alxx-agent-skill",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "alxx-agent-skill": "./dist/index.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "devEngines": {
13
+ "packageManager": {
14
+ "name": "pnpm",
15
+ "version": "^11.3.0",
16
+ "onFail": "download"
17
+ }
18
+ },
19
+ "type": "module",
20
+ "dependencies": {
21
+ "commander": "^15.0.0",
22
+ "fs-extra": "^11.3.6",
23
+ "picocolors": "^1.1.1"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^26.1.1",
27
+ "tsup": "^8.5.1",
28
+ "typescript": "^7.0.2"
29
+ },
30
+ "scripts": {
31
+ "build": "tsup src/index.ts --format esm --clean",
32
+ "dev": "tsx src/index.ts"
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ allowBuilds:
2
+ esbuild: true
package/src/index.ts ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from "commander";
4
+ import fs from "fs-extra";
5
+ import path from "node:path";
6
+ import pc from "picocolors";
7
+
8
+ const program = new Command();
9
+
10
+ program
11
+ .name("alxx-agent-skill")
12
+ .argument("<name>", "Skill name")
13
+ .description("Create a new Agent Skill")
14
+ .action(async (name: string) => {
15
+ const root = path.resolve(process.cwd(), name);
16
+
17
+ if (await fs.pathExists(root)) {
18
+ console.log(pc.red("Directory already exists."));
19
+ process.exit(1);
20
+ }
21
+
22
+ await fs.ensureDir(root);
23
+
24
+ await fs.writeFile(
25
+ path.join(root, "SKILL.md"),
26
+ `---
27
+ name: ${name}
28
+ description: Describe what this skill does.
29
+ ---
30
+
31
+ # ${name}
32
+
33
+ ## Instructions
34
+
35
+ Replace these instructions with your workflow.
36
+ `
37
+ );
38
+
39
+ await fs.ensureDir(path.join(root, "scripts"));
40
+ await fs.ensureDir(path.join(root, "references"));
41
+ await fs.ensureDir(path.join(root, "assets"));
42
+
43
+ await fs.writeFile(
44
+ path.join(root, "README.md"),
45
+ `# ${name}
46
+ Generated by allexx-agent-skill.
47
+ `
48
+ );
49
+
50
+ console.log(pc.green("✔ Skill created"));
51
+ console.log(pc.cyan(root));
52
+ });
53
+
54
+ program.parse();
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "strict": true,
7
+ "outDir": "dist",
8
+ "rootDir": "src",
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true
11
+ }
12
+ }