@clix-so/clix-agent-skills 0.1.1 → 0.1.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/package.json
CHANGED
|
@@ -42,7 +42,8 @@ latest verified SDK source code.
|
|
|
42
42
|
- Run: `bash scripts/install-mcp.sh`
|
|
43
43
|
- The script will:
|
|
44
44
|
- Verify the package is available
|
|
45
|
-
- Auto-detect the MCP client (
|
|
45
|
+
- Auto-detect the MCP client (OpenCode, Amp, Codex, Cursor, Claude
|
|
46
|
+
Desktop, VS Code, etc.)
|
|
46
47
|
- Automatically configure the MCP server in the appropriate config file
|
|
47
48
|
- Provide clear instructions for restart
|
|
48
49
|
- Instruct user to restart their agent/IDE to load the new server.
|
|
@@ -55,8 +56,8 @@ latest verified SDK source code.
|
|
|
55
56
|
|
|
56
57
|
## Interaction Guidelines for Agents
|
|
57
58
|
|
|
58
|
-
When using this skill (for example inside Claude Code, Codex,
|
|
59
|
-
AI IDEs), follow these behaviors:
|
|
59
|
+
When using this skill (for example inside OpenCode, Amp, Claude Code, Codex,
|
|
60
|
+
Cursor, or other AI IDEs), follow these behaviors:
|
|
60
61
|
|
|
61
62
|
- **Start with reconnaissance**
|
|
62
63
|
- Inspect the project structure first (list key files like `package.json`,
|
|
@@ -282,3 +282,65 @@ claude mcp add --transport stdio clix-mcp-server -- npx -y @clix-so/clix-mcp-ser
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
```
|
|
285
|
+
|
|
286
|
+
#### Amp
|
|
287
|
+
|
|
288
|
+
**Setup**
|
|
289
|
+
|
|
290
|
+
Amp uses `amp.mcpServers` in VS Code settings files. Configure in either:
|
|
291
|
+
|
|
292
|
+
- **Workspace settings**: `.vscode/settings.json` (recommended for
|
|
293
|
+
project-specific setup)
|
|
294
|
+
- **User settings**: `~/.vscode/settings.json` (for global setup)
|
|
295
|
+
|
|
296
|
+
1. Open `.vscode/settings.json` (create if it doesn't exist).
|
|
297
|
+
2. Add the configuration:
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"amp.mcpServers": {
|
|
302
|
+
"clix-mcp-server": {
|
|
303
|
+
"command": "npx",
|
|
304
|
+
"args": ["-y", "@clix-so/clix-mcp-server@latest"]
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
3. Restart Amp or reload the VS Code window.
|
|
311
|
+
|
|
312
|
+
**Note**: The server name `clix-mcp-server` ensures tools appear as
|
|
313
|
+
`clix-mcp-server:*` (e.g., `clix-mcp-server:search_sdk`,
|
|
314
|
+
`clix-mcp-server:search_docs`). See
|
|
315
|
+
[Amp MCP documentation](https://ampcode.com/manual#mcp) for more details.
|
|
316
|
+
|
|
317
|
+
#### OpenCode
|
|
318
|
+
|
|
319
|
+
**Setup**
|
|
320
|
+
|
|
321
|
+
OpenCode uses `opencode.json` or `opencode.jsonc` files in your project root.
|
|
322
|
+
See [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers/) for
|
|
323
|
+
details.
|
|
324
|
+
|
|
325
|
+
1. Open `opencode.json` or `opencode.jsonc` (create if it doesn't exist).
|
|
326
|
+
2. Add the configuration:
|
|
327
|
+
|
|
328
|
+
```json
|
|
329
|
+
{
|
|
330
|
+
"$schema": "https://opencode.ai/config.json",
|
|
331
|
+
"mcp": {
|
|
332
|
+
"clix-mcp-server": {
|
|
333
|
+
"type": "local",
|
|
334
|
+
"command": ["npx", "-y", "@clix-so/clix-mcp-server@latest"],
|
|
335
|
+
"enabled": true
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
3. Restart OpenCode or reload the configuration.
|
|
342
|
+
|
|
343
|
+
**Note**: The server name `clix-mcp-server` ensures tools appear as
|
|
344
|
+
`clix-mcp-server:*` (e.g., `clix-mcp-server:search_sdk`,
|
|
345
|
+
`clix-mcp-server:search_docs`). You can reference the server in prompts with
|
|
346
|
+
`use clix-mcp-server` or add it to your `AGENTS.md` file.
|
|
@@ -58,6 +58,30 @@ get_config_path() {
|
|
|
58
58
|
vscode)
|
|
59
59
|
echo "${home}/.vscode/mcp.json"
|
|
60
60
|
;;
|
|
61
|
+
amp)
|
|
62
|
+
# Amp uses VS Code settings.json format
|
|
63
|
+
# Check workspace settings first, then user settings
|
|
64
|
+
if [ -f ".vscode/settings.json" ]; then
|
|
65
|
+
echo ".vscode/settings.json"
|
|
66
|
+
elif [ -f "${home}/.vscode/settings.json" ]; then
|
|
67
|
+
echo "${home}/.vscode/settings.json"
|
|
68
|
+
else
|
|
69
|
+
# Default to workspace settings
|
|
70
|
+
echo ".vscode/settings.json"
|
|
71
|
+
fi
|
|
72
|
+
;;
|
|
73
|
+
opencode)
|
|
74
|
+
# OpenCode uses opencode.json or opencode.jsonc in project root
|
|
75
|
+
# Check for .jsonc first (preferred), then .json
|
|
76
|
+
if [ -f "opencode.jsonc" ]; then
|
|
77
|
+
echo "opencode.jsonc"
|
|
78
|
+
elif [ -f "opencode.json" ]; then
|
|
79
|
+
echo "opencode.json"
|
|
80
|
+
else
|
|
81
|
+
# Default to .jsonc
|
|
82
|
+
echo "opencode.jsonc"
|
|
83
|
+
fi
|
|
84
|
+
;;
|
|
61
85
|
*)
|
|
62
86
|
echo ""
|
|
63
87
|
;;
|
|
@@ -116,6 +140,112 @@ EOF
|
|
|
116
140
|
log "${GREEN}✔ Configured Clix MCP Server in Codex config${RESET}"
|
|
117
141
|
}
|
|
118
142
|
|
|
143
|
+
# Configure MCP for Amp (uses amp.mcpServers in VS Code settings.json)
|
|
144
|
+
configure_amp() {
|
|
145
|
+
local config_path="$1"
|
|
146
|
+
local config_dir=$(dirname "$config_path")
|
|
147
|
+
|
|
148
|
+
mkdir -p "$config_dir"
|
|
149
|
+
|
|
150
|
+
if [ ! -f "$config_path" ]; then
|
|
151
|
+
echo '{}' > "$config_path"
|
|
152
|
+
log "${GREEN}✔ Created Amp settings file${RESET}"
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
# Check if already configured
|
|
156
|
+
if grep -q "clix-mcp-server" "$config_path" 2>/dev/null; then
|
|
157
|
+
log "${GREEN}✔ Clix MCP Server already configured in Amp${RESET}"
|
|
158
|
+
return 0
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# Use node to safely update JSON
|
|
162
|
+
if command -v node &> /dev/null; then
|
|
163
|
+
node <<EOF
|
|
164
|
+
const fs = require('fs');
|
|
165
|
+
const path = '$config_path';
|
|
166
|
+
let config = {};
|
|
167
|
+
try {
|
|
168
|
+
const content = fs.readFileSync(path, 'utf8');
|
|
169
|
+
config = JSON.parse(content);
|
|
170
|
+
} catch (e) {
|
|
171
|
+
config = {};
|
|
172
|
+
}
|
|
173
|
+
if (!config['amp.mcpServers']) config['amp.mcpServers'] = {};
|
|
174
|
+
config['amp.mcpServers']['clix-mcp-server'] = {
|
|
175
|
+
command: 'npx',
|
|
176
|
+
args: ['-y', '@clix-so/clix-mcp-server@latest']
|
|
177
|
+
};
|
|
178
|
+
fs.writeFileSync(path, JSON.stringify(config, null, 2) + '\n');
|
|
179
|
+
EOF
|
|
180
|
+
log "${GREEN}✔ Configured Clix MCP Server in Amp${RESET}"
|
|
181
|
+
else
|
|
182
|
+
log "${YELLOW}⚠️ Node.js not found. Please manually add to $config_path:${RESET}"
|
|
183
|
+
log "${BLUE}{${RESET}"
|
|
184
|
+
log "${BLUE} \"amp.mcpServers\": {${RESET}"
|
|
185
|
+
log "${BLUE} \"clix-mcp-server\": {${RESET}"
|
|
186
|
+
log "${BLUE} \"command\": \"npx\",${RESET}"
|
|
187
|
+
log "${BLUE} \"args\": [\"-y\", \"@clix-so/clix-mcp-server@latest\"]${RESET}"
|
|
188
|
+
log "${BLUE} }${RESET}"
|
|
189
|
+
log "${BLUE} }${RESET}"
|
|
190
|
+
log "${BLUE}}${RESET}"
|
|
191
|
+
fi
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
# Configure MCP for OpenCode (uses opencode.json/jsonc with mcp section)
|
|
195
|
+
configure_opencode() {
|
|
196
|
+
local config_path="$1"
|
|
197
|
+
|
|
198
|
+
if [ ! -f "$config_path" ]; then
|
|
199
|
+
# Create new opencode.jsonc file
|
|
200
|
+
cat > "$config_path" <<'EOF'
|
|
201
|
+
{
|
|
202
|
+
"$schema": "https://opencode.ai/config.json",
|
|
203
|
+
"mcp": {}
|
|
204
|
+
}
|
|
205
|
+
EOF
|
|
206
|
+
log "${GREEN}✔ Created OpenCode config file${RESET}"
|
|
207
|
+
fi
|
|
208
|
+
|
|
209
|
+
# Check if already configured
|
|
210
|
+
if grep -q "clix-mcp-server" "$config_path" 2>/dev/null; then
|
|
211
|
+
log "${GREEN}✔ Clix MCP Server already configured in OpenCode${RESET}"
|
|
212
|
+
return 0
|
|
213
|
+
fi
|
|
214
|
+
|
|
215
|
+
# Use node to safely update JSON/JSONC
|
|
216
|
+
if command -v node &> /dev/null; then
|
|
217
|
+
node <<EOF
|
|
218
|
+
const fs = require('fs');
|
|
219
|
+
const path = '$config_path';
|
|
220
|
+
let content = fs.readFileSync(path, 'utf8');
|
|
221
|
+
// Remove comments for JSONC parsing (simple approach)
|
|
222
|
+
let jsonContent = content.replace(/\/\/.*$/gm, '').replace(/\/\*[\s\S]*?\*\//g, '');
|
|
223
|
+
let config = JSON.parse(jsonContent);
|
|
224
|
+
if (!config.mcp) config.mcp = {};
|
|
225
|
+
config.mcp['clix-mcp-server'] = {
|
|
226
|
+
type: 'local',
|
|
227
|
+
command: ['npx', '-y', '@clix-so/clix-mcp-server@latest'],
|
|
228
|
+
enabled: true
|
|
229
|
+
};
|
|
230
|
+
// Write back as JSONC if original was .jsonc, otherwise JSON
|
|
231
|
+
const isJsonc = path.endsWith('.jsonc');
|
|
232
|
+
fs.writeFileSync(path, JSON.stringify(config, null, 2) + '\n');
|
|
233
|
+
EOF
|
|
234
|
+
log "${GREEN}✔ Configured Clix MCP Server in OpenCode${RESET}"
|
|
235
|
+
else
|
|
236
|
+
log "${YELLOW}⚠️ Node.js not found. Please manually add to $config_path:${RESET}"
|
|
237
|
+
log "${BLUE}{${RESET}"
|
|
238
|
+
log "${BLUE} \"mcp\": {${RESET}"
|
|
239
|
+
log "${BLUE} \"clix-mcp-server\": {${RESET}"
|
|
240
|
+
log "${BLUE} \"type\": \"local\",${RESET}"
|
|
241
|
+
log "${BLUE} \"command\": [\"npx\", \"-y\", \"@clix-so/clix-mcp-server@latest\"],${RESET}"
|
|
242
|
+
log "${BLUE} \"enabled\": true${RESET}"
|
|
243
|
+
log "${BLUE} }${RESET}"
|
|
244
|
+
log "${BLUE} }${RESET}"
|
|
245
|
+
log "${BLUE}}${RESET}"
|
|
246
|
+
fi
|
|
247
|
+
}
|
|
248
|
+
|
|
119
249
|
# Configure MCP for JSON-based clients
|
|
120
250
|
configure_json_client() {
|
|
121
251
|
local config_path="$1"
|
|
@@ -163,6 +293,20 @@ EOF
|
|
|
163
293
|
|
|
164
294
|
# Auto-detect client
|
|
165
295
|
detect_client() {
|
|
296
|
+
# Check for OpenCode (check for opencode.json/jsonc or opencode command)
|
|
297
|
+
if [ -f "opencode.json" ] || [ -f "opencode.jsonc" ] || command -v opencode &> /dev/null; then
|
|
298
|
+
echo "opencode"
|
|
299
|
+
return
|
|
300
|
+
fi
|
|
301
|
+
|
|
302
|
+
# Check for Amp (check for amp.mcpServers in settings.json or amp command)
|
|
303
|
+
if command -v amp &> /dev/null || \
|
|
304
|
+
grep -q "amp.mcpServers" ".vscode/settings.json" 2>/dev/null || \
|
|
305
|
+
grep -q "amp.mcpServers" "${HOME}/.vscode/settings.json" 2>/dev/null; then
|
|
306
|
+
echo "amp"
|
|
307
|
+
return
|
|
308
|
+
fi
|
|
309
|
+
|
|
166
310
|
# Check for Codex
|
|
167
311
|
if [ -f "${HOME}/.codex/config.toml" ] || command -v codex &> /dev/null; then
|
|
168
312
|
echo "codex"
|
|
@@ -222,6 +366,10 @@ if [ "$detected_client" != "unknown" ]; then
|
|
|
222
366
|
|
|
223
367
|
if [ "$detected_client" = "codex" ]; then
|
|
224
368
|
configure_codex "$config_path"
|
|
369
|
+
elif [ "$detected_client" = "amp" ]; then
|
|
370
|
+
configure_amp "$config_path"
|
|
371
|
+
elif [ "$detected_client" = "opencode" ]; then
|
|
372
|
+
configure_opencode "$config_path"
|
|
225
373
|
else
|
|
226
374
|
configure_json_client "$config_path"
|
|
227
375
|
fi
|
|
@@ -235,6 +383,8 @@ if [ "$detected_client" != "unknown" ]; then
|
|
|
235
383
|
else
|
|
236
384
|
log "${YELLOW}⚠️ Could not auto-detect MCP client.${RESET}"
|
|
237
385
|
log "${BLUE}The package is ready to use. Configure manually:${RESET}"
|
|
386
|
+
log "${BLUE} - OpenCode: Add to opencode.json or opencode.jsonc${RESET}"
|
|
387
|
+
log "${BLUE} - Amp: Add to .vscode/settings.json or ~/.vscode/settings.json${RESET}"
|
|
238
388
|
log "${BLUE} - Codex: Add to ~/.codex/config.toml${RESET}"
|
|
239
389
|
log "${BLUE} - Cursor: Add to .cursor/mcp.json or ~/.cursor/mcp.json${RESET}"
|
|
240
390
|
log "${BLUE} - Claude Desktop: Add to config file${RESET}"
|