skills-x 0.1.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/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # skills-x
2
+
3
+ AI Agent Skills management tool - Download and manage Claude/AI agent skills.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g skills-x
9
+ ```
10
+
11
+ Or use directly with npx:
12
+
13
+ ```bash
14
+ npx skills-x list
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ # List all available skills
21
+ skills-x list
22
+
23
+ # Download a skill to ~/.claude/skills/
24
+ skills-x init pdf
25
+ skills-x init ui-ux-pro-max
26
+
27
+ # Download all skills
28
+ skills-x init --all
29
+
30
+ # Specify custom target directory
31
+ skills-x init pdf --target ./my-skills
32
+ ```
33
+
34
+ ## Alternative Installation
35
+
36
+ If npm installation fails, you can install via Go:
37
+
38
+ ```bash
39
+ go install github.com/anthropics/skills-x/cmd/skills-x@latest
40
+ ```
41
+
42
+ ## Links
43
+
44
+ - [GitHub Repository](https://github.com/anthropics/skills-x)
45
+ - [Skills Documentation](https://github.com/anthropics/skills-x#readme)
46
+
47
+ ## License
48
+
49
+ MIT
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ // Determine binary path
8
+ const isWindows = process.platform === 'win32';
9
+ const binaryName = isWindows ? 'skills-x.exe' : 'skills-x';
10
+ const binaryPath = path.join(__dirname, binaryName);
11
+
12
+ // Check if binary exists
13
+ if (!fs.existsSync(binaryPath)) {
14
+ console.error('Error: skills-x binary not found.');
15
+ console.error('');
16
+ console.error('Try reinstalling:');
17
+ console.error(' npm uninstall -g skills-x && npm install -g skills-x');
18
+ console.error('');
19
+ console.error('Or install via Go:');
20
+ console.error(' go install github.com/anthropics/skills-x/cmd/skills-x@latest');
21
+ process.exit(1);
22
+ }
23
+
24
+ // Run the binary with all arguments
25
+ const args = process.argv.slice(2);
26
+ const child = spawn(binaryPath, args, {
27
+ stdio: 'inherit',
28
+ env: process.env,
29
+ });
30
+
31
+ child.on('error', (err) => {
32
+ console.error('Failed to start skills-x:', err.message);
33
+ process.exit(1);
34
+ });
35
+
36
+ child.on('exit', (code) => {
37
+ process.exit(code || 0);
38
+ });
package/install.js ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const BINARY_NAME = 'skills-x';
7
+
8
+ // Determine platform and architecture
9
+ function getPlatformArch() {
10
+ const platform = process.platform;
11
+ const arch = process.arch;
12
+
13
+ let os;
14
+ if (platform === 'darwin') os = 'darwin';
15
+ else if (platform === 'linux') os = 'linux';
16
+ else if (platform === 'win32') os = 'windows';
17
+ else throw new Error(`Unsupported platform: ${platform}`);
18
+
19
+ let cpu;
20
+ if (arch === 'x64') cpu = 'amd64';
21
+ else if (arch === 'arm64') cpu = 'arm64';
22
+ else throw new Error(`Unsupported architecture: ${arch}`);
23
+
24
+ return { os, cpu };
25
+ }
26
+
27
+ function main() {
28
+ try {
29
+ const { os, cpu } = getPlatformArch();
30
+ console.log(`Platform: ${os}-${cpu}`);
31
+
32
+ const binDir = path.join(__dirname, 'bin');
33
+ const ext = os === 'windows' ? '.exe' : '';
34
+
35
+ // Source binary (platform-specific)
36
+ const srcBinary = path.join(binDir, `${BINARY_NAME}-${os}-${cpu}${ext}`);
37
+ // Target binary (what skills-x.js expects)
38
+ const dstBinary = path.join(binDir, `${BINARY_NAME}${ext}`);
39
+
40
+ if (!fs.existsSync(srcBinary)) {
41
+ throw new Error(`Binary not found: ${srcBinary}`);
42
+ }
43
+
44
+ // Copy/rename to the expected name
45
+ fs.copyFileSync(srcBinary, dstBinary);
46
+
47
+ // Make executable on Unix
48
+ if (os !== 'windows') {
49
+ fs.chmodSync(dstBinary, 0o755);
50
+ }
51
+
52
+ console.log(`✓ skills-x installed successfully!`);
53
+ } catch (err) {
54
+ console.error(`\n⚠ Installation failed: ${err.message}`);
55
+ console.error('\nYou can install manually:');
56
+ console.error(' go install github.com/anthropics/skills-x/cmd/skills-x@latest');
57
+ process.exit(1);
58
+ }
59
+ }
60
+
61
+ main();
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "skills-x",
3
+ "version": "0.1.0",
4
+ "description": "AI Agent Skills management tool - Download and manage Claude/AI agent skills",
5
+ "keywords": [
6
+ "ai",
7
+ "agent",
8
+ "skills",
9
+ "claude",
10
+ "anthropic",
11
+ "llm",
12
+ "cli"
13
+ ],
14
+ "author": "castle-x",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/anthropics/skills-x.git"
19
+ },
20
+ "homepage": "https://github.com/anthropics/skills-x#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/anthropics/skills-x/issues"
23
+ },
24
+ "bin": {
25
+ "skills-x": "bin/skills-x.js"
26
+ },
27
+ "scripts": {
28
+ "postinstall": "node install.js"
29
+ },
30
+ "engines": {
31
+ "node": ">=14.0.0"
32
+ },
33
+ "files": [
34
+ "bin/",
35
+ "install.js",
36
+ "README.md"
37
+ ]
38
+ }