vtrix-skills 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/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # vtrix-skills
2
+
3
+ CLI tool for discovering and installing agent skills from Vtrix SkillHub.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g vtrix-skills
9
+ ```
10
+
11
+ Or use directly with npx:
12
+
13
+ ```bash
14
+ npx vtrix-skills find image
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ### Search for skills
20
+
21
+ ```bash
22
+ # Search by keyword
23
+ vtrix-skills find image
24
+
25
+ # Search within a category
26
+ vtrix-skills find image --category ai-ml
27
+
28
+ # Interactive mode (browse by category)
29
+ vtrix-skills find -i
30
+ ```
31
+
32
+ ### Install a skill
33
+
34
+ ```bash
35
+ # Install to current project (./.agents/skills)
36
+ vtrix-skills add gpt-image-1
37
+
38
+ # Install globally (~/.claude/skills)
39
+ vtrix-skills add gpt-image-1 -g
40
+
41
+ # Install specific version
42
+ vtrix-skills add gpt-image-1 --version 1.0.0
43
+ ```
44
+
45
+ ### List skills
46
+
47
+ ```bash
48
+ # List all skills (sorted by stars)
49
+ vtrix-skills list
50
+
51
+ # List by category
52
+ vtrix-skills list --category development
53
+
54
+ # Sort by downloads
55
+ vtrix-skills list --sort downloads
56
+ ```
57
+
58
+ ### Configuration
59
+
60
+ ```bash
61
+ # View current configuration
62
+ vtrix-skills config --show
63
+
64
+ # Set custom API URL
65
+ vtrix-skills config --set-url https://your-domain.com/api/v1
66
+ ```
67
+
68
+ ## Commands
69
+
70
+ | Command | Description |
71
+ |---------|-------------|
72
+ | `find [query]` | Search for skills by keyword |
73
+ | `find -i` | Browse skills by category (interactive) |
74
+ | `find <query> -c <category>` | Search within a specific category |
75
+ | `add <slug>` | Install a skill |
76
+ | `list` | List all skills |
77
+ | `config --show` | Show current configuration |
78
+ | `config --set-url <url>` | Set API base URL |
79
+
80
+ ## Environment Variables
81
+
82
+ You can override the default API URL using environment variables:
83
+
84
+ ```bash
85
+ export SKILLHUB_API_URL=https://your-custom-domain.com/api/v1
86
+ vtrix-skills find react
87
+ ```
88
+
89
+ ## Examples
90
+
91
+ ```bash
92
+ # Search for image generation skills
93
+ vtrix-skills find image
94
+
95
+ # Search for React skills in development category
96
+ vtrix-skills find react --category development
97
+
98
+ # Browse skills by category
99
+ vtrix-skills find -i
100
+
101
+ # Install a skill globally
102
+ vtrix-skills add gpt-image-1 -g
103
+
104
+ # List top skills by stars
105
+ vtrix-skills list --sort stars
106
+ ```
107
+
108
+ ## License
109
+
110
+ MIT
111
+
112
+ ## Support
113
+
114
+ For issues and feature requests, please visit: https://github.com/vtrix/vtrix-skills/issues
Binary file
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+ const path = require('path');
5
+
6
+ const binPath = path.join(__dirname, 'vtrix-skills');
7
+
8
+ const child = spawn(binPath, process.argv.slice(2), {
9
+ stdio: 'inherit',
10
+ windowsHide: true
11
+ });
12
+
13
+ child.on('exit', (code) => {
14
+ process.exit(code);
15
+ });
package/install.js ADDED
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env node
2
+
3
+ const https = require('https');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const { execSync } = require('child_process');
7
+
8
+ const GITHUB_RELEASE_URL = 'https://github.com/vtrix/vtrix-skills/releases/latest/download';
9
+
10
+ function getPlatform() {
11
+ const platform = process.platform;
12
+ const arch = process.arch;
13
+
14
+ if (platform === 'darwin') {
15
+ if (arch === 'x64') return 'macos-x64';
16
+ if (arch === 'arm64') return 'macos-arm64';
17
+ } else if (platform === 'linux') {
18
+ if (arch === 'x64') return 'linux-x64';
19
+ if (arch === 'arm64') return 'linux-arm64';
20
+ } else if (platform === 'win32') {
21
+ if (arch === 'x64') return 'windows-x64';
22
+ }
23
+
24
+ throw new Error(`Unsupported platform: ${platform}-${arch}`);
25
+ }
26
+
27
+ function downloadBinary() {
28
+ const platformName = getPlatform();
29
+ const binaryName = process.platform === 'win32' ? 'vtrix-skills.exe' : 'vtrix-skills';
30
+ const downloadUrl = `${GITHUB_RELEASE_URL}/vtrix-skills-${platformName}${process.platform === 'win32' ? '.exe' : ''}`;
31
+ const binDir = path.join(__dirname, 'bin');
32
+ const binPath = path.join(binDir, binaryName);
33
+
34
+ console.log(`Downloading vtrix-skills for ${platformName}...`);
35
+ console.log(`From: ${downloadUrl}`);
36
+
37
+ if (!fs.existsSync(binDir)) {
38
+ fs.mkdirSync(binDir, { recursive: true });
39
+ }
40
+
41
+ const file = fs.createWriteStream(binPath);
42
+
43
+ https.get(downloadUrl, (response) => {
44
+ if (response.statusCode === 302 || response.statusCode === 301) {
45
+ // Follow redirect
46
+ https.get(response.headers.location, (res) => {
47
+ res.pipe(file);
48
+ file.on('finish', () => {
49
+ file.close();
50
+ fs.chmodSync(binPath, 0o755);
51
+ console.log('✓ vtrix-skills installed successfully!');
52
+ });
53
+ }).on('error', (err) => {
54
+ fs.unlinkSync(binPath);
55
+ throw err;
56
+ });
57
+ } else if (response.statusCode === 200) {
58
+ response.pipe(file);
59
+ file.on('finish', () => {
60
+ file.close();
61
+ fs.chmodSync(binPath, 0o755);
62
+ console.log('✓ vtrix-skills installed successfully!');
63
+ });
64
+ } else {
65
+ throw new Error(`Failed to download: HTTP ${response.statusCode}`);
66
+ }
67
+ }).on('error', (err) => {
68
+ fs.unlinkSync(binPath);
69
+ console.error('Download failed. Installing local binary...');
70
+ // Fallback: copy local binary if available
71
+ const localBinary = path.join(__dirname, '..', 'target', 'release', binaryName);
72
+ if (fs.existsSync(localBinary)) {
73
+ fs.copyFileSync(localBinary, binPath);
74
+ fs.chmodSync(binPath, 0o755);
75
+ console.log('✓ Local binary installed successfully!');
76
+ } else {
77
+ throw new Error('No binary available');
78
+ }
79
+ });
80
+ }
81
+
82
+ try {
83
+ downloadBinary();
84
+ } catch (error) {
85
+ console.error('Installation failed:', error.message);
86
+ console.error('\nPlease install manually from: https://github.com/vtrix/vtrix-skills/releases');
87
+ process.exit(1);
88
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "vtrix-skills",
3
+ "version": "1.0.0",
4
+ "description": "CLI tool for discovering and installing agent skills from Vtrix SkillHub",
5
+ "keywords": [
6
+ "vtrix",
7
+ "skills",
8
+ "agent",
9
+ "claude",
10
+ "ai",
11
+ "cli"
12
+ ],
13
+ "homepage": "https://github.com/vtrix/vtrix-skills",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/vtrix/vtrix-skills.git"
17
+ },
18
+ "license": "MIT",
19
+ "author": "Vtrix Team",
20
+ "bin": {
21
+ "vtrix-skills": "./bin/vtrix-skills.js"
22
+ },
23
+ "scripts": {
24
+ "postinstall": "node ./install.js"
25
+ },
26
+ "files": [
27
+ "bin/",
28
+ "install.js",
29
+ "README.md"
30
+ ],
31
+ "engines": {
32
+ "node": ">=14.0.0"
33
+ },
34
+ "os": [
35
+ "darwin",
36
+ "linux",
37
+ "win32"
38
+ ],
39
+ "cpu": [
40
+ "x64",
41
+ "arm64"
42
+ ]
43
+ }