skills 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,5 +1,31 @@
1
- # SKILLS
1
+ # skills
2
2
 
3
- It's a small package that i'm using for having an array of json objects with a lot of developer related skills.
3
+ The open agent skills ecosystem.
4
4
 
5
- Parsed from [https://archive.org/details/stackexchange](https://archive.org/details/stackexchange), so kudos to them
5
+ ```
6
+ npx skills
7
+ ```
8
+
9
+ ## Commands
10
+
11
+ ### Available
12
+
13
+ | Command | Description |
14
+ |---------|-------------|
15
+ | `skills add <package>` | Add a skill package |
16
+ | `skills a <package>` | Alias for `add` |
17
+ | `skills install <package>` | Alias for `add` |
18
+ | `skills i <package>` | Alias for `add` |
19
+
20
+ ### Planned
21
+
22
+ | Command | Description |
23
+ |---------|-------------|
24
+ | `skills find <query>` | Search for skills |
25
+ | `skills update` | Update installed skills |
26
+
27
+ ## Example
28
+
29
+ ```bash
30
+ npx skills add vercel-labs/react-skills
31
+ ```
package/dist/cli.js ADDED
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli.ts
4
+ import { spawn } from "child_process";
5
+ var RESET = "\x1B[0m";
6
+ var BOLD = "\x1B[1m";
7
+ var DIM = "\x1B[2m";
8
+ var WHITE = "\x1B[97m";
9
+ var LOGO_LINES = [
10
+ "███████╗██╗ ██╗██╗██╗ ██╗ ███████╗",
11
+ "██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝",
12
+ "███████╗█████╔╝ ██║██║ ██║ ███████╗",
13
+ "╚════██║██╔═██╗ ██║██║ ██║ ╚════██║",
14
+ "███████║██║ ██╗██║███████╗███████╗███████║",
15
+ "╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚══════╝"
16
+ ];
17
+ var GRAYS = [
18
+ "\x1B[97m",
19
+ "\x1B[97m",
20
+ "\x1B[37m",
21
+ "\x1B[37m",
22
+ "\x1B[90m",
23
+ "\x1B[90m"
24
+ ];
25
+ function showLogo() {
26
+ console.log();
27
+ LOGO_LINES.forEach((line, i) => {
28
+ console.log(`${GRAYS[i]}${line}${RESET}`);
29
+ });
30
+ }
31
+ function showBanner() {
32
+ showLogo();
33
+ console.log();
34
+ console.log(`${DIM}The open agent skills ecosystem${RESET}`);
35
+ console.log();
36
+ console.log(` ${DIM}$${RESET} ${WHITE}npx skills --help${RESET}`);
37
+ console.log(` ${DIM}$${RESET} ${WHITE}npx skills add ${DIM}[package]${RESET}`);
38
+ console.log();
39
+ console.log(`${DIM}try:${RESET} npx skills add vercel-labs/react-skills`);
40
+ console.log();
41
+ }
42
+ function showHelp() {
43
+ console.log(`
44
+ ${BOLD}Usage:${RESET} skills <command> [options]
45
+
46
+ ${BOLD}Commands:${RESET}
47
+ add <package> Add a skill package
48
+ remove <package> Remove a skill package
49
+ list List installed skills
50
+ search <query> Search for skills
51
+
52
+ ${BOLD}Options:${RESET}
53
+ --help, -h Show this help message
54
+ --version, -v Show version number
55
+
56
+ ${BOLD}Examples:${RESET}
57
+ ${DIM}$${RESET} skills add vercel-labs/react-skills
58
+ ${DIM}$${RESET} skills list
59
+ ${DIM}$${RESET} skills search "react"
60
+ `);
61
+ }
62
+ function runAddSkill(packages) {
63
+ const child = spawn("npx", ["-y", "add-skill", ...packages], {
64
+ stdio: "inherit"
65
+ });
66
+ child.on("close", (code) => {
67
+ process.exit(code ?? 0);
68
+ });
69
+ }
70
+ function main() {
71
+ const args = process.argv.slice(2);
72
+ if (args.length === 0) {
73
+ showBanner();
74
+ return;
75
+ }
76
+ const command = args[0];
77
+ const restArgs = args.slice(1);
78
+ switch (command) {
79
+ case "i":
80
+ case "install":
81
+ case "a":
82
+ case "add":
83
+ showLogo();
84
+ console.log();
85
+ runAddSkill(restArgs);
86
+ break;
87
+ case "--help":
88
+ case "-h":
89
+ showHelp();
90
+ break;
91
+ case "--version":
92
+ case "-v":
93
+ console.log("0.1.0");
94
+ break;
95
+ case "remove":
96
+ console.log(`${DIM}Removing skill:${RESET} ${restArgs[0] || "(no package specified)"}`);
97
+ break;
98
+ case "list":
99
+ console.log(`${DIM}No skills installed yet.${RESET}`);
100
+ break;
101
+ case "search":
102
+ console.log(`${DIM}Searching for:${RESET} ${restArgs[0] || "(no query specified)"}`);
103
+ break;
104
+ default:
105
+ console.log(`Unknown command: ${command}`);
106
+ console.log(`Run ${BOLD}skills --help${RESET} for usage.`);
107
+ }
108
+ }
109
+ main();
package/package.json CHANGED
@@ -1,22 +1,31 @@
1
1
  {
2
2
  "name": "skills",
3
- "version": "1.0.0",
4
- "description": "stackexchange tags in json format",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
3
+ "version": "1.0.2",
4
+ "description": "The open agent skills ecosystem",
5
+ "type": "module",
6
+ "bin": {
7
+ "skills": "./dist/cli.js"
8
8
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/fforres/skills.git"
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "bun build ./src/cli.ts --outdir ./dist --target node",
15
+ "dev": "bun run ./src/cli.ts",
16
+ "prepublishOnly": "bun run build"
12
17
  },
13
- "keywords": [],
14
- "author": "",
18
+ "keywords": [
19
+ "ai",
20
+ "skills",
21
+ "cli",
22
+ "ecosystem"
23
+ ],
15
24
  "license": "MIT",
16
- "main": "./index.js",
17
- "license": "ISC",
18
- "bugs": {
19
- "url": "https://github.com/fforres/skills/issues"
25
+ "devDependencies": {
26
+ "@types/bun": "latest"
20
27
  },
21
- "homepage": "https://github.com/fforres/skills#readme"
28
+ "peerDependencies": {
29
+ "typescript": "^5"
30
+ }
22
31
  }
package/.npmignore DELETED
@@ -1,37 +0,0 @@
1
- # Logs
2
- logs
3
- *.log
4
- npm-debug.log*
5
-
6
- # Runtime data
7
- pids
8
- *.pid
9
- *.seed
10
-
11
- # Directory for instrumented libs generated by jscoverage/JSCover
12
- lib-cov
13
-
14
- # Coverage directory used by tools like istanbul
15
- coverage
16
-
17
- # nyc test coverage
18
- .nyc_output
19
-
20
- # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21
- .grunt
22
-
23
- # node-waf configuration
24
- .lock-wscript
25
-
26
- # Compiled binary addons (http://nodejs.org/api/addons.html)
27
- build/Release
28
-
29
- # Dependency directories
30
- node_modules
31
- jspm_packages
32
-
33
- # Optional npm cache directory
34
- .npm
35
-
36
- # Optional REPL history
37
- .node_repl_history
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- const a = require('./tags.json');
2
- module.exports = a;