skill7 1.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.
@@ -0,0 +1,234 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * One-click setup script for Antigravity Skills MCP Server
4
+ *
5
+ * Usage:
6
+ * node scripts/setup.js --client gemini
7
+ * node scripts/setup.js --client claude
8
+ * node scripts/setup.js --client cursor
9
+ * node scripts/setup.js --client all
10
+ */
11
+
12
+ import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
13
+ import { dirname, join } from 'path';
14
+ import { homedir } from 'os';
15
+ import { fileURLToPath } from 'url';
16
+
17
+ const __dirname = dirname(fileURLToPath(import.meta.url));
18
+ const serverPath = join(__dirname, '..', 'dist', 'index.js');
19
+
20
+ // ============================================================================
21
+ // CONFIG GENERATORS
22
+ // ============================================================================
23
+
24
+ const configs = {
25
+ gemini: {
26
+ path: join(homedir(), '.gemini', 'settings.json'),
27
+ generate: (existingConfig) => {
28
+ const config = existingConfig || { mcpServers: {} };
29
+ config.mcpServers = config.mcpServers || {};
30
+ config.mcpServers['antigravity-skills'] = {
31
+ command: 'node',
32
+ args: [serverPath],
33
+ };
34
+ return config;
35
+ },
36
+ name: 'Gemini CLI',
37
+ },
38
+
39
+ claude: {
40
+ path: join(homedir(), '.config', 'claude', 'mcp_config.json'),
41
+ altPath: join(homedir(), 'AppData', 'Roaming', 'Claude', 'claude_desktop_config.json'),
42
+ generate: (existingConfig) => {
43
+ const config = existingConfig || { mcpServers: {} };
44
+ config.mcpServers = config.mcpServers || {};
45
+ config.mcpServers['antigravity-skills'] = {
46
+ command: 'node',
47
+ args: [serverPath],
48
+ };
49
+ return config;
50
+ },
51
+ name: 'Claude Desktop / Claude Code',
52
+ },
53
+
54
+ cursor: {
55
+ path: join(homedir(), '.cursor', 'mcp.json'),
56
+ generate: (existingConfig) => {
57
+ const config = existingConfig || { mcpServers: {} };
58
+ config.mcpServers = config.mcpServers || {};
59
+ config.mcpServers['antigravity-skills'] = {
60
+ command: 'node',
61
+ args: [serverPath],
62
+ };
63
+ return config;
64
+ },
65
+ name: 'Cursor',
66
+ },
67
+
68
+ vscode: {
69
+ path: join(homedir(), '.vscode', 'mcp.json'),
70
+ generate: (existingConfig) => {
71
+ const config = existingConfig || { servers: {} };
72
+ config.servers = config.servers || {};
73
+ config.servers['antigravity-skills'] = {
74
+ type: 'stdio',
75
+ command: 'node',
76
+ args: [serverPath],
77
+ };
78
+ return config;
79
+ },
80
+ name: 'VS Code',
81
+ },
82
+
83
+ copilot: {
84
+ path: join(homedir(), '.github-copilot', 'mcp.json'),
85
+ generate: (existingConfig) => {
86
+ const config = existingConfig || { mcpServers: {} };
87
+ config.mcpServers = config.mcpServers || {};
88
+ config.mcpServers['antigravity-skills'] = {
89
+ command: 'node',
90
+ args: [serverPath],
91
+ };
92
+ return config;
93
+ },
94
+ name: 'GitHub Copilot',
95
+ },
96
+
97
+ opencode: {
98
+ path: join(homedir(), '.opencode', 'mcp.json'),
99
+ generate: (existingConfig) => {
100
+ const config = existingConfig || { mcpServers: {} };
101
+ config.mcpServers = config.mcpServers || {};
102
+ config.mcpServers['antigravity-skills'] = {
103
+ command: 'node',
104
+ args: [serverPath],
105
+ };
106
+ return config;
107
+ },
108
+ name: 'OpenCode',
109
+ },
110
+ };
111
+
112
+ // ============================================================================
113
+ // SETUP LOGIC
114
+ // ============================================================================
115
+
116
+ function setupClient(clientName) {
117
+ const client = configs[clientName];
118
+ if (!client) {
119
+ console.error(`Unknown client: ${clientName}`);
120
+ console.log('Available clients:', Object.keys(configs).join(', '));
121
+ return false;
122
+ }
123
+
124
+ // Find config path
125
+ let configPath = client.path;
126
+ if (!existsSync(dirname(configPath))) {
127
+ if (client.altPath && existsSync(dirname(client.altPath))) {
128
+ configPath = client.altPath;
129
+ } else {
130
+ // Create directory
131
+ mkdirSync(dirname(configPath), { recursive: true });
132
+ }
133
+ }
134
+
135
+ // Load existing config
136
+ let existingConfig = null;
137
+ if (existsSync(configPath)) {
138
+ try {
139
+ existingConfig = JSON.parse(readFileSync(configPath, 'utf-8'));
140
+ } catch {
141
+ console.warn(`Could not parse existing config at ${configPath}, creating new one`);
142
+ }
143
+ }
144
+
145
+ // Generate new config
146
+ const newConfig = client.generate(existingConfig);
147
+
148
+ // Write config
149
+ writeFileSync(configPath, JSON.stringify(newConfig, null, 2));
150
+ console.log(`✅ ${client.name} configured at: ${configPath}`);
151
+ return true;
152
+ }
153
+
154
+ function showManualInstructions() {
155
+ console.log(`
156
+ ╔═══════════════════════════════════════════════════════════════════════════╗
157
+ ║ 🌌 Antigravity Skills MCP Server - Manual Setup ║
158
+ ╠═══════════════════════════════════════════════════════════════════════════╣
159
+ ║ ║
160
+ ║ Add this to your MCP configuration: ║
161
+ ║ ║
162
+ ║ { ║
163
+ ║ "mcpServers": { ║
164
+ ║ "antigravity-skills": { ║
165
+ ║ "command": "node", ║
166
+ ║ "args": ["${serverPath.replace(/\\/g, '\\\\')}"] ║
167
+ ║ } ║
168
+ ║ } ║
169
+ ║ } ║
170
+ ║ ║
171
+ ║ Config file locations by client: ║
172
+ ║ • Gemini CLI: ~/.gemini/settings.json ║
173
+ ║ • Claude: ~/.config/claude/mcp_config.json (or AppData on Win) ║
174
+ ║ • Cursor: ~/.cursor/mcp.json ║
175
+ ║ • VS Code: ~/.vscode/mcp.json ║
176
+ ║ • Copilot: ~/.github-copilot/mcp.json ║
177
+ ║ ║
178
+ ╚═══════════════════════════════════════════════════════════════════════════╝
179
+ `);
180
+ }
181
+
182
+ // ============================================================================
183
+ // MAIN
184
+ // ============================================================================
185
+
186
+ const args = process.argv.slice(2);
187
+ const clientArg = args.find(a => a.startsWith('--client=') || args[args.indexOf('--client') + 1]);
188
+ const client = clientArg?.replace('--client=', '') || args[args.indexOf('--client') + 1];
189
+
190
+ console.log(`
191
+ ╔═══════════════════════════════════════════════════════════════════════════╗
192
+ ║ 🌌 Antigravity Skills MCP Server Setup ║
193
+ ║ 634+ Skills for AI Agents ║
194
+ ╚═══════════════════════════════════════════════════════════════════════════╝
195
+ `);
196
+
197
+ if (!client || client === 'help') {
198
+ console.log('Usage: node scripts/setup.js --client <client-name>');
199
+ console.log('');
200
+ console.log('Available clients:');
201
+ Object.entries(configs).forEach(([key, val]) => {
202
+ console.log(` • ${key.padEnd(10)} - ${val.name}`);
203
+ });
204
+ console.log(` • all - Setup all clients`);
205
+ console.log('');
206
+ showManualInstructions();
207
+ process.exit(0);
208
+ }
209
+
210
+ if (client === 'all') {
211
+ console.log('Setting up all clients...\n');
212
+ Object.keys(configs).forEach(setupClient);
213
+ console.log('\n✅ All clients configured!');
214
+ } else {
215
+ setupClient(client);
216
+ }
217
+
218
+ console.log(`
219
+ ╔═══════════════════════════════════════════════════════════════════════════╗
220
+ ║ 🎉 Setup Complete! ║
221
+ ╠═══════════════════════════════════════════════════════════════════════════╣
222
+ ║ ║
223
+ ║ Available Tools: ║
224
+ ║ • list_skills - List all skills with filtering ║
225
+ ║ • search_skills - Search by name/description ║
226
+ ║ • get_skill - Get detailed skill info ║
227
+ ║ • get_categories - View skill categories ║
228
+ ║ • suggest_workflow - Get skill-based workflow for a goal ║
229
+ ║ • get_skill_content - Read full SKILL.md content ║
230
+ ║ ║
231
+ ║ Try: "Use antigravity-skills to search for react patterns" ║
232
+ ║ ║
233
+ ╚═══════════════════════════════════════════════════════════════════════════╝
234
+ `);