@clix-so/clix-agent-skills 0.1.6 → 0.1.8

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 CHANGED
@@ -16,9 +16,9 @@ you can install skills in different ways.
16
16
 
17
17
  ### Universal CLI (Recommended)
18
18
 
19
- For **Cursor**, **VS Code**, **Claude Desktop**, **OpenCode**, **Goose**,
20
- **GitHub Copilot**, **Amp**, and **Letta**, use our CLI tool to install skills
21
- and configure the Clix MCP Server automatically:
19
+ For Amp, Claude Code, Codex, Copilot, Cursor, Goose, Letta, OpenCode, and VS
20
+ Code, we recommend using our installer to set up the skills and automatically
21
+ configure the Clix MCP Server.
22
22
 
23
23
  #### Installation Modes
24
24
 
@@ -50,7 +50,7 @@ npx @clix-so/clix-agent-skills@latest install integration --client cursor --glob
50
50
 
51
51
  # Install all available skills at once (repo root)
52
52
  npx @clix-so/clix-agent-skills@latest install --all --client cursor
53
- # This will install: integration, event-tracking, user-management
53
+ # This will install: integration, event-tracking, user-management, personalization
54
54
 
55
55
  # Install all available skills globally (system root)
56
56
  npx @clix-so/clix-agent-skills@latest install --all --client cursor --global
@@ -63,19 +63,22 @@ npx @clix-so/clix-agent-skills@latest install --all --client cursor --global
63
63
  practices and campaign-ready validation
64
64
  - **clix-user-management**: Implement `Clix.setUserId` + user properties with
65
65
  logout best practices, personalization (`user.*`), and audience targeting
66
+ - **clix-personalization**: Author and debug personalization templates for
67
+ message content, deep links/URLs, and audience targeting rules (`user.*`,
68
+ `event.*`, `trigger.*`, `device.*`)
66
69
 
67
70
  **Supported Clients:**
68
71
 
69
- | Client | Flag | Default Path |
70
- | :------------- | :------------------ | :----------------- |
71
- | Amp | `--client amp` | `.amp/skills/` |
72
- | Claude | `--client claude` | `.claude/skills/` |
73
- | Codex | `--client codex` | `.codex/skills/` |
74
- | Cursor | `--client cursor` | `.cursor/skills/` |
75
- | GitHub Copilot | `--client github` | `.github/skills/` |
76
- | Goose | `--client goose` | `.goose/skills/` |
77
- | Letta | `--client letta` | `.skills/` |
78
- | OpenCode | `--client opencode` | `.opencode/skill/` |
72
+ | Client | Flag | Default Path |
73
+ | :------------- | :----------------------------------- | :----------------- |
74
+ | Amp | `--client amp` | `.amp/skills/` |
75
+ | Claude Code | `--client claude` (or `claude-code`) | `.claude/skills/` |
76
+ | Codex | `--client codex` | `.codex/skills/` |
77
+ | Cursor | `--client cursor` | `.cursor/skills/` |
78
+ | GitHub Copilot | `--client github` | `.github/skills/` |
79
+ | Goose | `--client goose` | `.goose/skills/` |
80
+ | Letta | `--client letta` | `.skills/` |
81
+ | OpenCode | `--client opencode` | `.opencode/skill/` |
79
82
 
80
83
  ### Claude Code
81
84
 
@@ -101,6 +104,7 @@ Alternatively, you can install a single skill directly by running:
101
104
  /plugin install clix-integration@clix-agent-skills
102
105
  /plugin install clix-event-tracking@clix-agent-skills
103
106
  /plugin install clix-user-management@clix-agent-skills
107
+ /plugin install clix-personalization@clix-agent-skills
104
108
  ```
105
109
 
106
110
  Remember to restart Claude Code after installation to load the new skills.
package/dist/bin/cli.js CHANGED
@@ -25,7 +25,7 @@ program
25
25
  program
26
26
  .command("install [skill]")
27
27
  .description("Install agent skill(s)")
28
- .option("-c, --client <client>", "Target AI client (cursor, claude, vscode, amp, kiro, amazonq, codex, opencode, manual)")
28
+ .option("-c, --client <client>", "Target AI client (cursor, claude|claude-code, vscode, amp, kiro, amazonq, codex, opencode, manual)")
29
29
  .option("-p, --path <path>", "Custom installation path (default: .clix/skills)")
30
30
  .option("-a, --all", "Install all available skills")
31
31
  .option("-g, --global", "Install globally to system root (default: installs to repo root)")
@@ -64,6 +64,8 @@ async function installSkill(skillName, options) {
64
64
  else if (options.client) {
65
65
  switch (options.client.toLowerCase()) {
66
66
  case "claude":
67
+ case "claude-code":
68
+ // Claude Code uses the .claude/ folder convention, but MCP is configured via `claude mcp ...`
67
69
  relativeDest = ".claude/skills";
68
70
  break;
69
71
  case "cursor":
@@ -43,6 +43,7 @@ const os_1 = __importDefault(require("os"));
43
43
  const chalk_1 = __importDefault(require("chalk"));
44
44
  const inquirer_1 = __importDefault(require("inquirer"));
45
45
  const TOML = __importStar(require("@iarna/toml"));
46
+ const child_process_1 = require("child_process");
46
47
  // ============================================================================
47
48
  // Constants
48
49
  // ============================================================================
@@ -50,6 +51,17 @@ const CLIX_MCP_SERVER_ENTRY = {
50
51
  command: "npx",
51
52
  args: ["-y", "@clix-so/clix-mcp-server@latest"],
52
53
  };
54
+ const CLAUDE_CODE_MCP_ADD_ARGS = [
55
+ "mcp",
56
+ "add",
57
+ "--transport",
58
+ "stdio",
59
+ "clix-mcp-server",
60
+ "--",
61
+ "npx",
62
+ "-y",
63
+ "@clix-so/clix-mcp-server@latest",
64
+ ];
53
65
  // ============================================================================
54
66
  // Helper Functions
55
67
  // ============================================================================
@@ -62,6 +74,47 @@ function getErrorMessage(error) {
62
74
  }
63
75
  return String(error);
64
76
  }
77
+ function hasClixServerInClaudeMcpListOutput(output) {
78
+ return output.toLowerCase().includes("clix-mcp-server");
79
+ }
80
+ /**
81
+ * Configure MCP for Claude Code using the `claude` CLI (no config file editing).
82
+ */
83
+ async function configureClaudeCode() {
84
+ console.log(chalk_1.default.blue("Checking MCP config via Claude Code CLI (`claude mcp`)..."));
85
+ // Verify Claude CLI exists and supports MCP.
86
+ const helpRes = (0, child_process_1.spawnSync)("claude", ["mcp", "--help"], { encoding: "utf8" });
87
+ if (helpRes.error) {
88
+ console.log(chalk_1.default.yellow(`Could not run Claude CLI (${getErrorMessage(helpRes.error)}). Skipping MCP configuration.`));
89
+ return;
90
+ }
91
+ if (helpRes.status !== 0) {
92
+ console.log(chalk_1.default.yellow("Claude CLI does not appear to support `claude mcp`. Skipping MCP configuration."));
93
+ return;
94
+ }
95
+ // Best-effort idempotency: if list works and already contains the server, skip.
96
+ const listRes = (0, child_process_1.spawnSync)("claude", ["mcp", "list"], { encoding: "utf8" });
97
+ const listOut = `${listRes.stdout ?? ""}\n${listRes.stderr ?? ""}`;
98
+ if (!listRes.error && listRes.status === 0 && hasClixServerInClaudeMcpListOutput(listOut)) {
99
+ console.log(chalk_1.default.green("✔ Clix MCP Server is already configured."));
100
+ return;
101
+ }
102
+ const addRes = (0, child_process_1.spawnSync)("claude", CLAUDE_CODE_MCP_ADD_ARGS, { encoding: "utf8" });
103
+ if (addRes.error || addRes.status !== 0) {
104
+ const out = `${addRes.stdout ?? ""}\n${addRes.stderr ?? ""}`.trim();
105
+ console.log(chalk_1.default.yellow(`Failed to configure MCP via Claude Code CLI. ${out ? `Output:\n${out}` : "No output captured."}`));
106
+ return;
107
+ }
108
+ console.log(chalk_1.default.green("✔ Added Clix MCP Server to configuration. Please restart claude."));
109
+ }
110
+ function isClaudeCodeClient(client) {
111
+ const c = client.toLowerCase();
112
+ return (c === "claude" ||
113
+ c === "claude_code" ||
114
+ c === "claude-code" ||
115
+ c === "claudecode" ||
116
+ c === "claude code");
117
+ }
65
118
  /**
66
119
  * Gets the MCP servers object from JSON config based on client type
67
120
  */
@@ -106,19 +159,6 @@ function getClientConfig(client) {
106
159
  format: "json",
107
160
  };
108
161
  }
109
- case "claude": {
110
- let configPath = null;
111
- if (process.platform === "darwin") {
112
- configPath = path_1.default.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
113
- }
114
- else if (process.platform === "win32") {
115
- configPath = path_1.default.join(process.env.APPDATA || "", "Claude", "claude_desktop_config.json");
116
- }
117
- else if (process.platform === "linux") {
118
- configPath = path_1.default.join(home, ".config", "Claude", "claude_desktop_config.json");
119
- }
120
- return configPath ? { path: configPath, configKey: "mcpServers", format: "json" } : null;
121
- }
122
162
  case "vscode":
123
163
  return {
124
164
  path: path_1.default.join(home, ".vscode", "mcp.json"),
@@ -306,7 +346,7 @@ async function configureMCP(client) {
306
346
  message: "Which AI client are you using?",
307
347
  choices: [
308
348
  { name: "Cursor", value: "cursor" },
309
- { name: "Claude Desktop", value: "claude" },
349
+ { name: "Claude Code", value: "claude" },
310
350
  { name: "VS Code", value: "vscode" },
311
351
  { name: "Amp", value: "amp" },
312
352
  { name: "Kiro", value: "kiro" },
@@ -322,10 +362,19 @@ async function configureMCP(client) {
322
362
  ]);
323
363
  targetClient = answers.client;
324
364
  }
365
+ if (!targetClient) {
366
+ console.log(chalk_1.default.yellow("No client selected. Skipping MCP configuration."));
367
+ return;
368
+ }
325
369
  if (targetClient === "manual") {
326
370
  console.log(chalk_1.default.blue("Skipping automatic MCP configuration."));
327
371
  return;
328
372
  }
373
+ // Claude Code is configured via the `claude` CLI (no file editing).
374
+ if (targetClient && isClaudeCodeClient(targetClient)) {
375
+ await configureClaudeCode();
376
+ return;
377
+ }
329
378
  // Handle OpenCode separately (different JSON structure)
330
379
  if (targetClient === "opencode") {
331
380
  await configureOpenCode();
package/llms.txt CHANGED
@@ -54,6 +54,24 @@ Integrates Clix Mobile SDK into iOS, Android, Flutter, and React Native projects
54
54
 
55
55
  ---
56
56
 
57
+ ## clix-personalization
58
+
59
+ Helps developers author and debug Clix personalization templates (Liquid-style) for message content, deep links/URLs, and audience targeting. Use when the user mentions personalization variables, Liquid, templates, conditional logic, loops, filters, deep links, message logs, or when the user types `clix-personalization`.
60
+
61
+ - [clix-personalization](https://raw.githubusercontent.com/clix-so/skills/refs/heads/main/skills/personalization/SKILL.md): Helps developers author and debug Clix personalization templates (Liquid-style) for message content, deep links/URLs, and audience targeting. Use when the user mentions personalization variables, Liquid, templates, conditional logic, loops, filters, deep links, message logs, or when the user types `clix-personalization`.
62
+
63
+ ### References
64
+
65
+ - [Common Patterns (Reference)](https://raw.githubusercontent.com/clix-so/skills/refs/heads/main/skills/personalization/references/common-patterns.md): Reference documentation for personalization skill
66
+ - [Debugging (Reference)](https://raw.githubusercontent.com/clix-so/skills/refs/heads/main/skills/personalization/references/debugging.md): Reference documentation for personalization skill
67
+ - [Template Syntax (Reference)](https://raw.githubusercontent.com/clix-so/skills/refs/heads/main/skills/personalization/references/template-syntax.md): Reference documentation for personalization skill
68
+
69
+ ### Scripts
70
+
71
+ - [Validate Template (Script)](https://raw.githubusercontent.com/clix-so/skills/refs/heads/main/skills/personalization/scripts/validate-template.sh): Utility script for personalization skill
72
+
73
+ ---
74
+
57
75
  ## clix-user-management
58
76
 
59
77
  Implements Clix user identification and user properties (setUserId, removeUserId, setUserProperty/setUserProperties, removeUserProperty/removeUserProperties) with safe schemas, logout best practices, and campaign-ready personalization/audience usage. Use when the user mentions login/logout, userId, user properties, personalization, audience targeting or when the user types `clix-user-management`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clix-so/clix-agent-skills",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "An open collection of agent skills for Clix.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -97,7 +97,7 @@ bash <skill-dir>/scripts/validate-event-plan.sh event-plan.json
97
97
  The skill directory is typically:
98
98
 
99
99
  - `.cursor/skills/event-tracking/` (Cursor)
100
- - `.claude/skills/event-tracking/` (Claude Desktop)
100
+ - `.claude/skills/event-tracking/` (Claude Code)
101
101
  - `.vscode/skills/event-tracking/` (VS Code/Amp)
102
102
  - Or check where this skill was installed
103
103
 
@@ -38,11 +38,12 @@ latest verified SDK source code.
38
38
  1. **Ask the user**: "The Clix MCP Server is not detected. It provides the
39
39
  latest official SDK code. Would you like me to install it now?"
40
40
  2. **If User says YES**:
41
- - Run: `bash scripts/install-mcp.sh`
41
+ - Run: `bash scripts/install-mcp.sh --client <your-client>`
42
42
  - The script will:
43
43
  - Verify the package is available
44
- - Auto-detect the MCP client (OpenCode, Amp, Codex, Cursor, Claude
45
- Desktop, VS Code, etc.)
44
+ - Configure the MCP server for the specified client
45
+ - (If you omit `--client` and multiple clients are installed, the script
46
+ will stop and ask you to choose.)
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.
@@ -263,26 +263,6 @@ claude mcp add --transport stdio clix-mcp-server -- npx -y @clix-so/clix-mcp-ser
263
263
  }
264
264
  ```
265
265
 
266
- #### Claude Desktop App
267
-
268
- **Setup**
269
-
270
- 1. Open config
271
- (`~/Library/Application Support/Claude/claude_desktop_config.json` or
272
- `%APPDATA%\\Claude\\claude_desktop_config.json`).
273
- 2. Add and restart:
274
-
275
- ```json
276
- {
277
- "mcpServers": {
278
- "clix-mcp-server": {
279
- "command": "npx",
280
- "args": ["-y", "@clix-so/clix-mcp-server@latest"]
281
- }
282
- }
283
- }
284
- ```
285
-
286
266
  #### Amp
287
267
 
288
268
  **Setup**