@clix-so/clix-agent-skills 0.2.1 → 0.2.3
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 +23 -27
- package/dist/bin/commands/install.js +9 -0
- package/package.json +1 -1
- package/skills/api-triggered-campaigns/SKILL.md +2 -0
- package/skills/event-tracking/SKILL.md +2 -0
- package/skills/integration/SKILL.md +2 -0
- package/skills/integration/scripts/install-mcp.sh +138 -6
- package/skills/personalization/SKILL.md +2 -0
- package/skills/user-management/SKILL.md +2 -0
package/README.md
CHANGED
|
@@ -3,8 +3,24 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@clix-so/clix-agent-skills)
|
|
4
4
|
[](https://www.npmjs.com/package/@clix-so/clix-agent-skills)
|
|
5
5
|
|
|
6
|
-
This repository contains a collection of
|
|
7
|
-
|
|
6
|
+
This repository contains a collection of Agent Skills for Clix. Each skill is a
|
|
7
|
+
separate module within this package that can be installed and used independently
|
|
8
|
+
by AI clients.
|
|
9
|
+
|
|
10
|
+
## Available Skills
|
|
11
|
+
|
|
12
|
+
- **clix-integration**: Seamlessly integrate Clix Mobile SDK to your mobile
|
|
13
|
+
application with Clix MCP Server
|
|
14
|
+
- **clix-event-tracking**: Implement `Clix.trackEvent` with naming/schema best
|
|
15
|
+
practices and campaign-ready validation
|
|
16
|
+
- **clix-user-management**: Implement `Clix.setUserId` + user properties with
|
|
17
|
+
logout best practices, personalization (`user.*`), and audience targeting
|
|
18
|
+
- **clix-personalization**: Author and debug personalization templates for
|
|
19
|
+
message content, deep links/URLs, and audience targeting rules (`user.*`,
|
|
20
|
+
`event.*`, `trigger.*`, `device.*`)
|
|
21
|
+
- **clix-api-triggered-campaigns**: Configure API-triggered campaigns in the
|
|
22
|
+
console and trigger them from your backend with safe auth, dynamic filters
|
|
23
|
+
(`trigger.*`), and personalization patterns
|
|
8
24
|
|
|
9
25
|
## Installing Skills
|
|
10
26
|
|
|
@@ -35,9 +51,9 @@ The CLI supports two installation modes for skills:
|
|
|
35
51
|
- Skills are available across all projects
|
|
36
52
|
- Best for personal development setup
|
|
37
53
|
|
|
38
|
-
**Note:** MCP (Model Context Protocol) server configuration
|
|
39
|
-
|
|
40
|
-
|
|
54
|
+
**Note:** MCP (Model Context Protocol) server configuration location depends on
|
|
55
|
+
the AI client. Some clients support both project-level and user-level (global)
|
|
56
|
+
configurations. See the "Configuration Locations" section below for details.
|
|
41
57
|
|
|
42
58
|
```bash
|
|
43
59
|
# Install a specific skill (repo root - default)
|
|
@@ -58,21 +74,6 @@ npx @clix-so/clix-agent-skills@latest install --all --client cursor
|
|
|
58
74
|
npx @clix-so/clix-agent-skills@latest install --all --client cursor --global
|
|
59
75
|
```
|
|
60
76
|
|
|
61
|
-
### Available Skills
|
|
62
|
-
|
|
63
|
-
- **clix-integration**: Seamlessly integrate Clix Mobile SDK to your mobile
|
|
64
|
-
application with Clix MCP Server
|
|
65
|
-
- **clix-event-tracking**: Implement `Clix.trackEvent` with naming/schema best
|
|
66
|
-
practices and campaign-ready validation
|
|
67
|
-
- **clix-user-management**: Implement `Clix.setUserId` + user properties with
|
|
68
|
-
logout best practices, personalization (`user.*`), and audience targeting
|
|
69
|
-
- **clix-personalization**: Author and debug personalization templates for
|
|
70
|
-
message content, deep links/URLs, and audience targeting rules (`user.*`,
|
|
71
|
-
`event.*`, `trigger.*`, `device.*`)
|
|
72
|
-
- **clix-api-triggered-campaigns**: Configure API-triggered campaigns in the
|
|
73
|
-
console and trigger them from your backend with safe auth, dynamic filters
|
|
74
|
-
(`trigger.*`), and personalization patterns
|
|
75
|
-
|
|
76
77
|
**Supported Clients:**
|
|
77
78
|
|
|
78
79
|
| Client | Flag | Default Path |
|
|
@@ -88,14 +89,13 @@ npx @clix-so/clix-agent-skills@latest install --all --client cursor --global
|
|
|
88
89
|
| OpenCode | `--client opencode` | `.opencode/skill/` |
|
|
89
90
|
| VS Code | `--client vscode` | `.vscode/skills/` |
|
|
90
91
|
|
|
91
|
-
### Claude Code
|
|
92
|
+
### Claude Code (Alternative setup via plugin marketplace)
|
|
92
93
|
|
|
93
94
|
To register this repository as a plugin marketplace in Claude Code, run the
|
|
94
95
|
following command:
|
|
95
96
|
|
|
96
97
|
```bash
|
|
97
98
|
/plugin marketplace add clix-so/skills
|
|
98
|
-
/plugin install all@clix-agent-skills
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
To install specific skills:
|
|
@@ -111,10 +111,6 @@ Alternatively, you can install a single skill directly by running:
|
|
|
111
111
|
/plugin install <plugin-name>@<marketplace-name>
|
|
112
112
|
# For example
|
|
113
113
|
/plugin install clix-integration@clix-agent-skills
|
|
114
|
-
/plugin install clix-event-tracking@clix-agent-skills
|
|
115
|
-
/plugin install clix-user-management@clix-agent-skills
|
|
116
|
-
/plugin install clix-personalization@clix-agent-skills
|
|
117
|
-
/plugin install clix-api-triggered-campaigns@clix-agent-skills
|
|
118
114
|
```
|
|
119
115
|
|
|
120
116
|
**Note for Claude Code users**: Skills now support automatic hot-reload! Skills
|
|
@@ -122,7 +118,7 @@ created or modified in `~/.claude/skills` or `.claude/skills` are immediately
|
|
|
122
118
|
available without restarting the session. Skills also show real-time progress
|
|
123
119
|
while executing, displaying tool uses as they happen.
|
|
124
120
|
|
|
125
|
-
### Codex
|
|
121
|
+
### Codex (Alternative setup via skill-installer)
|
|
126
122
|
|
|
127
123
|
To manually install skills, save them from this repository into your Codex
|
|
128
124
|
configuration directory:
|
|
@@ -110,6 +110,15 @@ async function installSkill(skillName, options) {
|
|
|
110
110
|
// Determine installation root: repo root (cwd) or system root (home directory)
|
|
111
111
|
const installRoot = options.global ? os_1.default.homedir() : process.cwd();
|
|
112
112
|
const destPath = path_1.default.resolve(installRoot, relativeDest, skillName);
|
|
113
|
+
// Gemini note: by default we install to project scope (.gemini/skills).
|
|
114
|
+
// If the user expects Gemini to see these skills in *any* project, they should use --global.
|
|
115
|
+
if (options.client?.toLowerCase() === "gemini" &&
|
|
116
|
+
!options.global &&
|
|
117
|
+
!options.path &&
|
|
118
|
+
skillName === "integration") {
|
|
119
|
+
console.log(chalk_1.default.yellow("Gemini note: skills were installed to this project's .gemini/skills. " +
|
|
120
|
+
"To make skills available across all projects, re-run with --global (installs to ~/.gemini/skills)."));
|
|
121
|
+
}
|
|
113
122
|
// 3. Copy Files
|
|
114
123
|
try {
|
|
115
124
|
await fs_extra_1.default.ensureDir(destPath);
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clix-api-triggered-campaigns
|
|
3
|
+
display-name: API-Triggered Campaigns
|
|
4
|
+
short-description: API-triggered campaign setup
|
|
3
5
|
description:
|
|
4
6
|
Helps developers configure API-triggered campaigns in the Clix console and
|
|
5
7
|
trigger them from backend services with safe auth, payload schemas, dynamic
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clix-event-tracking
|
|
3
|
+
display-name: Event Tracking
|
|
4
|
+
short-description: Event tracking setup
|
|
3
5
|
description:
|
|
4
6
|
Implements Clix event tracking (Clix.trackEvent) with consistent naming, safe
|
|
5
7
|
property schemas, and campaign-ready validation. Use when adding, reviewing,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clix-integration
|
|
3
|
+
display-name: SDK Integration
|
|
4
|
+
short-description: SDK integration guide
|
|
3
5
|
description:
|
|
4
6
|
Integrates Clix Mobile SDK into iOS, Android, Flutter, and React Native
|
|
5
7
|
projects. Provides step-by-step guidance for installation, initialization, and
|
|
@@ -31,7 +31,7 @@ Usage:
|
|
|
31
31
|
|
|
32
32
|
Options:
|
|
33
33
|
--client <client> Explicitly select the MCP client to configure.
|
|
34
|
-
Supported: claude, claude-code, opencode, amp, codex, cursor, vscode
|
|
34
|
+
Supported: claude, claude-code, gemini, opencode, amp, codex, cursor, vscode
|
|
35
35
|
--help Show this help.
|
|
36
36
|
|
|
37
37
|
Environment:
|
|
@@ -70,7 +70,7 @@ done
|
|
|
70
70
|
|
|
71
71
|
validate_client() {
|
|
72
72
|
case "${1:-}" in
|
|
73
|
-
claude|claude-code|opencode|amp|codex|cursor|vscode) return 0 ;;
|
|
73
|
+
claude|claude-code|gemini|opencode|amp|codex|cursor|vscode) return 0 ;;
|
|
74
74
|
"") return 1 ;;
|
|
75
75
|
*) return 1 ;;
|
|
76
76
|
esac
|
|
@@ -93,6 +93,15 @@ get_config_path() {
|
|
|
93
93
|
local platform=$(detect_platform)
|
|
94
94
|
|
|
95
95
|
case "$client" in
|
|
96
|
+
gemini)
|
|
97
|
+
# Gemini supports project scope (.gemini/settings.json) and user scope (~/.gemini/settings.json).
|
|
98
|
+
# Prefer project config when it exists (Gemini prioritizes project over user).
|
|
99
|
+
if [ -f ".gemini/settings.json" ]; then
|
|
100
|
+
echo ".gemini/settings.json"
|
|
101
|
+
else
|
|
102
|
+
echo "${home}/.gemini/settings.json"
|
|
103
|
+
fi
|
|
104
|
+
;;
|
|
96
105
|
claude-code)
|
|
97
106
|
# Claude Code CLI manages MCP via `claude mcp ...` commands (no direct config file here)
|
|
98
107
|
echo ""
|
|
@@ -145,6 +154,72 @@ get_config_path() {
|
|
|
145
154
|
esac
|
|
146
155
|
}
|
|
147
156
|
|
|
157
|
+
# Returns candidate config paths (one per line) for a client, including both
|
|
158
|
+
# project-level and user-level locations where applicable.
|
|
159
|
+
get_candidate_config_paths() {
|
|
160
|
+
local client=$1
|
|
161
|
+
local home="${HOME:-$HOME}"
|
|
162
|
+
local platform
|
|
163
|
+
platform=$(detect_platform)
|
|
164
|
+
|
|
165
|
+
case "$client" in
|
|
166
|
+
gemini)
|
|
167
|
+
# Gemini supports project scope (.gemini/settings.json) and user scope (~/.gemini/settings.json)
|
|
168
|
+
echo ".gemini/settings.json"
|
|
169
|
+
echo "${home}/.gemini/settings.json"
|
|
170
|
+
;;
|
|
171
|
+
cursor)
|
|
172
|
+
# Cursor supports workspace (.cursor/mcp.json) and user (~/.cursor/mcp.json)
|
|
173
|
+
echo ".cursor/mcp.json"
|
|
174
|
+
echo "${home}/.cursor/mcp.json"
|
|
175
|
+
;;
|
|
176
|
+
amp)
|
|
177
|
+
# Amp can be configured via VS Code workspace/user settings (per this script),
|
|
178
|
+
# and is also commonly stored under ~/.config/amp/settings.json.
|
|
179
|
+
echo ".vscode/settings.json"
|
|
180
|
+
echo "${home}/.vscode/settings.json"
|
|
181
|
+
if [ "$platform" = "win32" ]; then
|
|
182
|
+
echo "${USERPROFILE:-$home}/.config/amp/settings.json"
|
|
183
|
+
else
|
|
184
|
+
echo "${home}/.config/amp/settings.json"
|
|
185
|
+
fi
|
|
186
|
+
;;
|
|
187
|
+
vscode)
|
|
188
|
+
echo "${home}/.vscode/mcp.json"
|
|
189
|
+
;;
|
|
190
|
+
codex)
|
|
191
|
+
echo "${home}/.codex/config.toml"
|
|
192
|
+
;;
|
|
193
|
+
opencode)
|
|
194
|
+
echo "opencode.jsonc"
|
|
195
|
+
echo "opencode.json"
|
|
196
|
+
;;
|
|
197
|
+
*)
|
|
198
|
+
local p
|
|
199
|
+
p="$(get_config_path "$client")"
|
|
200
|
+
[ -n "$p" ] && echo "$p"
|
|
201
|
+
;;
|
|
202
|
+
esac
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
find_existing_clix_mcp_configs() {
|
|
206
|
+
local client=$1
|
|
207
|
+
local any_found=0
|
|
208
|
+
|
|
209
|
+
# Print matching paths to stdout (one per line).
|
|
210
|
+
while IFS= read -r p; do
|
|
211
|
+
[ -z "${p:-}" ] && continue
|
|
212
|
+
[ ! -f "$p" ] && continue
|
|
213
|
+
if grep -q "clix-mcp-server" "$p" 2>/dev/null; then
|
|
214
|
+
echo "$p"
|
|
215
|
+
any_found=1
|
|
216
|
+
fi
|
|
217
|
+
done < <(get_candidate_config_paths "$client" | awk 'NF' | sort -u)
|
|
218
|
+
|
|
219
|
+
# Return 0 if found any, 1 otherwise.
|
|
220
|
+
[ "$any_found" -eq 1 ]
|
|
221
|
+
}
|
|
222
|
+
|
|
148
223
|
# Configure MCP for Claude Code CLI
|
|
149
224
|
configure_claude_code() {
|
|
150
225
|
if ! command -v claude &> /dev/null; then
|
|
@@ -228,11 +303,30 @@ configure_amp() {
|
|
|
228
303
|
log "${GREEN}✔ Created Amp settings file${RESET}"
|
|
229
304
|
fi
|
|
230
305
|
|
|
231
|
-
# Check
|
|
306
|
+
# Check both project + user locations before deciding.
|
|
307
|
+
# If config_path already has it, we can skip. If it's only present elsewhere,
|
|
308
|
+
# we still proceed to configure config_path so the selected scope works.
|
|
232
309
|
if grep -q "clix-mcp-server" "$config_path" 2>/dev/null; then
|
|
233
310
|
log "${GREEN}✔ Clix MCP Server already configured in Amp${RESET}"
|
|
234
311
|
return 0
|
|
235
312
|
fi
|
|
313
|
+
local existing_paths=""
|
|
314
|
+
# NOTE: Use the function's exit status (0 = found elsewhere, 1 = not found) in a way
|
|
315
|
+
# that's safe under `set -e` (conditions don't trigger errexit).
|
|
316
|
+
if existing_paths="$(find_existing_clix_mcp_configs "amp")"; then
|
|
317
|
+
log ""
|
|
318
|
+
log "${YELLOW}⚠️ DUPLICATE CONFIGURATION DETECTED${RESET}"
|
|
319
|
+
log "${YELLOW} Found clix-mcp-server in other config location(s).${RESET}"
|
|
320
|
+
log "${YELLOW} clix-mcp-server is already configured in:${RESET}"
|
|
321
|
+
printf "%s\n" "$existing_paths" | sed 's/^/ /'
|
|
322
|
+
log ""
|
|
323
|
+
log "${YELLOW} Now also adding to: ${config_path}${RESET}"
|
|
324
|
+
log ""
|
|
325
|
+
log "${BLUE} ℹ️ Having multiple configurations may cause confusion.${RESET}"
|
|
326
|
+
log "${BLUE} To avoid duplicates, you can remove the server from other locations.${RESET}"
|
|
327
|
+
log "${BLUE} Amp typically prioritizes workspace (.vscode) over user (~/.vscode) settings.${RESET}"
|
|
328
|
+
log ""
|
|
329
|
+
fi
|
|
236
330
|
|
|
237
331
|
# Use node to safely update JSON/JSONC (VS Code settings often allow comments)
|
|
238
332
|
if command -v node &> /dev/null; then
|
|
@@ -433,7 +527,8 @@ EOF
|
|
|
433
527
|
|
|
434
528
|
# Configure MCP for JSON-based clients
|
|
435
529
|
configure_json_client() {
|
|
436
|
-
local
|
|
530
|
+
local client="$1"
|
|
531
|
+
local config_path="$2"
|
|
437
532
|
local config_dir=$(dirname "$config_path")
|
|
438
533
|
|
|
439
534
|
mkdir -p "$config_dir"
|
|
@@ -443,11 +538,42 @@ configure_json_client() {
|
|
|
443
538
|
log "${GREEN}✔ Created config file${RESET}"
|
|
444
539
|
fi
|
|
445
540
|
|
|
446
|
-
# Check
|
|
541
|
+
# Check both project + user locations before deciding.
|
|
542
|
+
# If config_path already has it, we can skip. If it's only present elsewhere,
|
|
543
|
+
# we still proceed to configure config_path so the selected scope works.
|
|
447
544
|
if grep -q "clix-mcp-server" "$config_path" 2>/dev/null; then
|
|
448
545
|
log "${GREEN}✔ Clix MCP Server already configured${RESET}"
|
|
449
546
|
return 0
|
|
450
547
|
fi
|
|
548
|
+
local existing_paths=""
|
|
549
|
+
# NOTE: Use the function's exit status (0 = found elsewhere, 1 = not found) in a way
|
|
550
|
+
# that's safe under `set -e` (conditions don't trigger errexit).
|
|
551
|
+
if existing_paths="$(find_existing_clix_mcp_configs "$client")"; then
|
|
552
|
+
log ""
|
|
553
|
+
log "${YELLOW}⚠️ DUPLICATE CONFIGURATION DETECTED${RESET}"
|
|
554
|
+
log "${YELLOW} Found clix-mcp-server in other config location(s).${RESET}"
|
|
555
|
+
log "${YELLOW} clix-mcp-server is already configured in:${RESET}"
|
|
556
|
+
printf "%s\n" "$existing_paths" | sed 's/^/ /'
|
|
557
|
+
log ""
|
|
558
|
+
log "${YELLOW} Now also adding to: ${config_path}${RESET}"
|
|
559
|
+
log ""
|
|
560
|
+
log "${BLUE} ℹ️ Having multiple configurations may cause confusion.${RESET}"
|
|
561
|
+
log "${BLUE} To avoid duplicates, you can remove the server from other locations.${RESET}"
|
|
562
|
+
|
|
563
|
+
# Client-specific priority information
|
|
564
|
+
case "$client" in
|
|
565
|
+
cursor)
|
|
566
|
+
log "${BLUE} Cursor prioritizes workspace (.cursor) over user (~/.cursor) configs.${RESET}"
|
|
567
|
+
;;
|
|
568
|
+
gemini)
|
|
569
|
+
log "${BLUE} Gemini prioritizes project (.gemini) over user (~/.gemini) configs.${RESET}"
|
|
570
|
+
;;
|
|
571
|
+
vscode)
|
|
572
|
+
log "${BLUE} VS Code prioritizes workspace over user-level configs.${RESET}"
|
|
573
|
+
;;
|
|
574
|
+
esac
|
|
575
|
+
log ""
|
|
576
|
+
fi
|
|
451
577
|
|
|
452
578
|
# Use node to safely update JSON
|
|
453
579
|
if command -v node &> /dev/null; then
|
|
@@ -483,6 +609,11 @@ detect_clients() {
|
|
|
483
609
|
echo "claude"
|
|
484
610
|
fi
|
|
485
611
|
|
|
612
|
+
# Gemini CLI (user config: ~/.gemini/settings.json)
|
|
613
|
+
if command -v gemini &> /dev/null || [ -f "${HOME}/.gemini/settings.json" ]; then
|
|
614
|
+
echo "gemini"
|
|
615
|
+
fi
|
|
616
|
+
|
|
486
617
|
# OpenCode (project config files or opencode command)
|
|
487
618
|
if [ -f "opencode.json" ] || [ -f "opencode.jsonc" ] || command -v opencode &> /dev/null; then
|
|
488
619
|
echo "opencode"
|
|
@@ -606,7 +737,7 @@ if [ "$detected_client" != "unknown" ]; then
|
|
|
606
737
|
elif [ "$detected_client" = "opencode" ]; then
|
|
607
738
|
configure_opencode "$config_path"
|
|
608
739
|
else
|
|
609
|
-
configure_json_client "$config_path"
|
|
740
|
+
configure_json_client "$detected_client" "$config_path"
|
|
610
741
|
fi
|
|
611
742
|
|
|
612
743
|
log "${GREEN}✅ Successfully configured Clix MCP Server!${RESET}"
|
|
@@ -618,6 +749,7 @@ if [ "$detected_client" != "unknown" ]; then
|
|
|
618
749
|
else
|
|
619
750
|
log "${YELLOW}⚠️ Could not auto-detect MCP client.${RESET}"
|
|
620
751
|
log "${BLUE}The package is ready to use. Configure manually:${RESET}"
|
|
752
|
+
log "${BLUE} - Gemini CLI: Add to ~/.gemini/settings.json${RESET}"
|
|
621
753
|
log "${BLUE} - OpenCode: Add to opencode.json or opencode.jsonc${RESET}"
|
|
622
754
|
log "${BLUE} - Amp: Add to .vscode/settings.json or ~/.vscode/settings.json${RESET}"
|
|
623
755
|
log "${BLUE} - Codex: Add to ~/.codex/config.toml${RESET}"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clix-personalization
|
|
3
|
+
display-name: Personalization
|
|
4
|
+
short-description: Personalization templates
|
|
3
5
|
description:
|
|
4
6
|
Helps developers author and debug Clix personalization templates
|
|
5
7
|
(Liquid-style) for message content, deep links/URLs, and audience targeting.
|