[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M737MVN0J9PFAFMP0ME3M7PZ":3,"skill-same:01M737MVN0J9PFAFMP0ME3M7PZ":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M737MVN0J9PFAFMP0ME3M7PZ","skill-051",null,"Helps developers configure API-triggered campaigns in the Clix console and","legendtkl\u002Fagentic-skill-router","legendtkl","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2370761?v=4","01M71RR3WRQC40G964Q2GVDMND","01M737GJZQ9TF1VE3VM255EDAK",8,"MIT","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-051\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: skill-051\ndescription: \"Helps developers configure API-triggered campaigns in the Clix console and\"\n---\n\n# API-Triggered Campaigns (Backend → Clix)\n\nUse this skill to set up **API-triggered campaigns** in the Clix console and\ntrigger them from your backend with dynamic data (`trigger.*`) for:\n\n- Transactional notifications (orders, password reset, receipts)\n- Workflow messages (assignments, approvals)\n- System alerts (moderation, support tickets)\n- Programmatic sends where marketers\u002Fops should control content + targeting\n\n## What the official docs guarantee (high-signal)\n\n- API-triggered campaigns are configured in the console, then triggered via:\n  `POST \u002Fapi\u002Fv1\u002Fcampaigns\u002F{campaign_id}:trigger`\n- Authentication uses **secret** headers:\n  - `X-Clix-Project-ID`\n  - `X-Clix-API-Key`\n- Request `properties` become **`trigger.*`** for:\n  - **Dynamic audience filtering** (console audience rules)\n  - **Personalization** in templates (title\u002Fbody\u002Fdeep links)\n- `audience.broadcast=true` sends to all users eligible under the campaign’s\n  segment definition; `audience.targets` narrows to specific users\u002Fdevices\n  (still filtered by the segment definition).\n- Dynamic audience filters are intentionally constrained for performance: **max\n  3 attributes** in the audience definition.\n\n## MCP-first (source of truth)\n\nIf Clix MCP tools are available, treat them as the **source of truth**:\n\n- Use `clix-mcp-server:search_docs` to confirm the latest API contract + limits:\n  - query examples:\n    - `\"API-triggered campaign trigger endpoint\"`\n    - `\"campaigns\u002F{campaign_id}:trigger audience targets broadcast\"`\n    - `\"trigger.* dynamic audience filters limitations\"`\n\nIf MCP tools are not available, use the bundled references:\n\n- API contract → `references\u002Fapi-contract.md`\n- Console setup + dynamic filters → `references\u002Fconsole-setup.md`\n- Backend patterns (auth, retries, timeouts) → `references\u002Fbackend-patterns.md`\n- Security\u002Fkey handling → `references\u002Fsecurity-and-keys.md`\n- Personalization + dynamic filters →\n  `references\u002Fpersonalization-and-dynamic-filters.md`\n- Debugging checklist → `references\u002Fdebugging.md`\n\n## Workflow (copy + check off)\n\n```\nAPI-triggered campaign progress:\n- [ ] 1) Confirm goals + trigger source (what backend event sends the message?)\n- [ ] 2) Define campaign contract (properties keys\u002Ftypes; PII policy)\n- [ ] 3) Configure campaign in console (API-triggered + audience rules + templates)\n- [ ] 4) Implement backend trigger wrapper (auth, timeout, retries, logging)\n- [ ] 5) Validate trigger plan JSON (schema + naming + safety)\n- [ ] 6) Verify in Clix (test payloads, Message Logs, segment matching)\n```\n\n## 1) Confirm the minimum inputs\n\nAsk only what’s needed:\n\n- **Campaign**: where is it in the console? do you already have `campaign_id`?\n- **Channel**: push \u002F in-app \u002F email \u002F etc. (affects message template fields)\n- **Audience mode**: broadcast vs explicit targets\n- **Dynamic filter keys**: which `trigger.*` keys are used in audience rules\n- **Properties**: list of keys + types + example values (avoid PII by default)\n- **Backend**: runtime and HTTP client (Node\u002FFetch, Axios, Python, Go, etc.)\n\n## 2) Create a “Trigger Plan” (before touching backend code)\n\nCreate `api-trigger-plan.json` in `.clix\u002F` (recommended) or project root.\n\n**Recommended location**: `.clix\u002Fapi-trigger-plan.json`\n\n**Plan schema (high-level):**\n\n- `campaign_id` (string)\n- `audience.mode`: `\"broadcast\" | \"targets\" | \"default\"`\n- `audience.targets` (if mode is `\"targets\"`)\n- `dynamic_filter_keys` (array of up to 3 snake_case keys)\n- `properties` (map of snake_case keys → `{ type, required?, example?, pii? }`)\n\nExample:\n\n```json\n{\n  \"campaign_id\": \"019aa002-1d0e-7407-a0c5-5bfa8dd2be30\",\n  \"audience\": {\n    \"mode\": \"broadcast\"\n  },\n  \"dynamic_filter_keys\": [\"store_location\"],\n  \"properties\": {\n    \"store_location\": {\n      \"type\": \"string\",\n      \"required\": true,\n      \"example\": \"San Francisco\"\n    },\n    \"order_id\": { \"type\": \"string\", \"required\": true, \"example\": \"ORD-12345\" },\n    \"item_count\": { \"type\": \"number\", \"required\": true, \"example\": 3 },\n    \"pickup_time\": { \"type\": \"string\", \"required\": false, \"example\": \"2:30 PM\" }\n  }\n}\n```\n\n## 3) Configure campaign in the console (API-triggered)\n\n- Set the campaign type to **API-Triggered**.\n- Build audience rules using `{{ trigger.* }}` for dynamic filters.\n- Use `{{ trigger.* }}` in message templates + deep links.\n\nSee: `references\u002Fconsole-setup.md` for exact guidance and limitations.\n\n## 4) Implement backend trigger wrapper (best practices)\n\nBackend wrapper responsibilities:\n\n- **Auth**: load `X-Clix-Project-ID` and `X-Clix-API-Key` from\n  environment\u002Fsecret store (never commit).\n- **Timeout**: set a short timeout (e.g., 3–10s) and fail fast.\n- **Retries**: retry only on transient failures (network\u002F5xx), with backoff; do\n  not retry blindly on 4xx.\n- **Dedupe**: prevent double-sends in your system (e.g., unique key per order\n  event) since the API call is “send-like”.\n- **Logging**: log `campaign_id`, your correlation id (order id), and the Clix\n  response (e.g., `trigger_id`).\n\nCopy\u002Fpaste examples:\n\n- Node: `examples\u002Ftrigger-campaign-node.js`\n- Python: `examples\u002Ftrigger-campaign-python.py`\n\n## 5) Validate the plan (fast feedback loop)\n\nRun:\n\n```bash\nbash \u003Cskill-dir>\u002Fscripts\u002Fvalidate-api-trigger-plan.sh .clix\u002Fapi-trigger-plan.json\n```\n\nThis validator checks:\n\n- valid JSON\n- `campaign_id` present\n- `dynamic_filter_keys` is ≤ 3 and snake_case\n- `properties` keys are snake_case and have valid types\n- example values match declared types\n- `targets` entries specify exactly one of `project_user_id` or `device_id`\n\n## 6) Verify (Clix + end-to-end)\n\nMinimum verification:\n\n- Campaign is **API-Triggered** and `campaign_id` matches.\n- If using dynamic audience filters, the `trigger.*` keys exist in the API call\n  and match audience rules exactly.\n- Trigger once with a known-good payload; confirm delivery + inspect Message\n  Logs for rendering errors.\n\nSee `references\u002Fdebugging.md`.\n\n## Progressive Disclosure\n\n- **Level 1**: This `SKILL.md` (always loaded)\n- **Level 2**: `references\u002F` (load when implementing details)\n- **Level 3**: `examples\u002F` (load when copy\u002Fpasting backend code)\n- **Level 4**: `scripts\u002F` (execute directly; do not load into context)\n\n## References\n\n- `references\u002Fapi-contract.md`\n- `references\u002Fconsole-setup.md`\n- `references\u002Fbackend-patterns.md`\n- `references\u002Fsecurity-and-keys.md`\n- `references\u002Fpersonalization-and-dynamic-filters.md`\n- `references\u002Fdebugging.md`","# API-Triggered Campaigns (Backend → Clix)\n\nUse this skill to set up **API-triggered campaigns** in the Clix console and\ntrigger them from your backend with dynamic data (`trigger.*`) for:\n\n- Transactional notifications (orders, password reset, receipts)\n- Workflow messages (assignments, approvals)\n- System alerts (moderation, support tickets)\n- Programmatic sends where marketers\u002Fops should control content + targeting\n\n## What the official docs guarantee (high-signal)\n\n- API-triggered campaigns are configured in the console, then triggered via:\n  `POST \u002Fapi\u002Fv1\u002Fcampaigns\u002F{campaign_id}:trigger`\n- Authentication uses **secret** headers:\n  - `X-Clix-Project-ID`\n  - `X-Clix-API-Key`\n- Request `properties` become **`trigger.*`** for:\n  - **Dynamic audience filtering** (console audience rules)\n  - **Personalization** in templates (title\u002Fbody\u002Fdeep links)\n- `audience.broadcast=true` sends to all users eligible under the campaign’s\n  segment definition; `audience.targets` narrows to specific users\u002Fdevices\n  (still filtered by the segment definition).\n- Dynamic audience filters are intentionally constrained for performance: **max\n  3 attributes** in the audience definition.\n\n## MCP-first (source of truth)\n\nIf Clix MCP tools are available, treat them as the **source of truth**:\n\n- Use `clix-mcp-server:search_docs` to confirm the latest API contract + limits:\n  - query examples:\n    - `\"API-triggered campaign trigger endpoint\"`\n    - `\"campaigns\u002F{campaign_id}:trigger audience targets broadcast\"`\n    - `\"trigger.* dynamic audience filters limitations\"`\n\nIf MCP tools are not available, use the bundled references:\n\n- API contract → `references\u002Fapi-contract.md`\n- Console setup + dynamic filters → `references\u002Fconsole-setup.md`\n- Backend patterns (auth, retries, timeouts) → `references\u002Fbackend-patterns.md`\n- Security\u002Fkey handling → `references\u002Fsecurity-and-keys.md`\n- Personalization + dynamic filters →\n  `references\u002Fpersonalization-and-dynamic-filters.md`\n- Debugging checklist → `references\u002Fdebugging.md`\n\n## Workflow (copy + check off)\n\n```\nAPI-triggered campaign progress:\n- [ ] 1) Confirm goals + trigger source (what backend event sends the message?)\n- [ ] 2) Define campaign contract (properties keys\u002Ftypes; PII policy)\n- [ ] 3) Configure campaign in console (API-triggered + audience rules + templates)\n- [ ] 4) Implement backend trigger wrapper (auth, timeout, retries, logging)\n- [ ] 5) Validate trigger plan JSON (schema + naming + safety)\n- [ ] 6) Verify in Clix (test payloads, Message Logs, segment matching)\n```\n\n## 1) Confirm the minimum inputs\n\nAsk only what’s needed:\n\n- **Campaign**: where is it in the console? do you already have `campaign_id`?\n- **Channel**: push \u002F in-app \u002F email \u002F etc. (affects message template fields)\n- **Audience mode**: broadcast vs explicit targets\n- **Dynamic filter keys**: which `trigger.*` keys are used in audience rules\n- **Properties**: list of keys + types + example values (avoid PII by default)\n- **Backend**: runtime and HTTP client (Node\u002FFetch, Axios, Python, Go, etc.)\n\n## 2) Create a “Trigger Plan” (before touching backend code)\n\nCreate `api-trigger-plan.json` in `.clix\u002F` (recommended) or project root.\n\n**Recommended location**: `.clix\u002Fapi-trigger-plan.json`\n\n**Plan schema (high-level):**\n\n- `campaign_id` (string)\n- `audience.mode`: `\"broadcast\" | \"targets\" | \"default\"`\n- `audience.targets` (if mode is `\"targets\"`)\n- `dynamic_filter_keys` (array of up to 3 snake_case keys)\n- `properties` (map of snake_case keys → `{ type, required?, example?, pii? }`)\n\nExample:\n\n```json\n{\n  \"campaign_id\": \"019aa002-1d0e-7407-a0c5-5bfa8dd2be30\",\n  \"audience\": {\n    \"mode\": \"broadcast\"\n  },\n  \"dynamic_filter_keys\": [\"store_location\"],\n  \"properties\": {\n    \"store_location\": {\n      \"type\": \"string\",\n      \"required\": true,\n      \"example\": \"San Francisco\"\n    },\n    \"order_id\": { \"type\": \"string\", \"required\": true, \"example\": \"ORD-12345\" },\n    \"item_count\": { \"type\": \"number\", \"required\": true, \"example\": 3 },\n    \"pickup_time\": { \"type\": \"string\", \"required\": false, \"example\": \"2:30 PM\" }\n  }\n}\n```\n\n## 3) Configure campaign in the console (API-triggered)\n\n- Set the campaign type to **API-Triggered**.\n- Build audience rules using `{{ trigger.* }}` for dynamic filters.\n- Use `{{ trigger.* }}` in message templates + deep links.\n\nSee: `references\u002Fconsole-setup.md` for exact guidance and limitations.\n\n## 4) Implement backend trigger wrapper (best practices)\n\nBackend wrapper responsibilities:\n\n- **Auth**: load `X-Clix-Project-ID` and `X-Clix-API-Key` from\n  environment\u002Fsecret store (never commit).\n- **Timeout**: set a short timeout (e.g., 3–10s) and fail fast.\n- **Retries**: retry only on transient failures (network\u002F5xx), with backoff; do\n  not retry blindly on 4xx.\n- **Dedupe**: prevent double-sends in your system (e.g., unique key per order\n  event) since the API call is “send-like”.\n- **Logging**: log `campaign_id`, your correlation id (order id), and the Clix\n  response (e.g., `trigger_id`).\n\nCopy\u002Fpaste examples:\n\n- Node: `examples\u002Ftrigger-campaign-node.js`\n- Python: `examples\u002Ftrigger-campaign-python.py`\n\n## 5) Validate the plan (fast feedback loop)\n\nRun:\n\n```bash\nbash \u003Cskill-dir>\u002Fscripts\u002Fvalidate-api-trigger-plan.sh .clix\u002Fapi-trigger-plan.json\n```\n\nThis validator checks:\n\n- valid JSON\n- `campaign_id` present\n- `dynamic_filter_keys` is ≤ 3 and snake_case\n- `properties` keys are snake_case and have valid types\n- example values match declared types\n- `targets` entries specify exactly one of `project_user_id` or `device_id`\n\n## 6) Verify (Clix + end-to-end)\n\nMinimum verification:\n\n- Campaign is **API-Triggered** and `campaign_id` matches.\n- If using dynamic audience filters, the `trigger.*` keys exist in the API call\n  and match audience rules exactly.\n- Trigger once with a known-good payload; confirm delivery + inspect Message\n  Logs for rendering errors.\n\nSee `references\u002Fdebugging.md`.\n\n## Progressive Disclosure\n\n- **Level 1**: This `SKILL.md` (always loaded)\n- **Level 2**: `references\u002F` (load when implementing details)\n- **Level 3**: `examples\u002F` (load when copy\u002Fpasting backend code)\n- **Level 4**: `scripts\u002F` (execute directly; do not load into context)\n\n## References\n\n- `references\u002Fapi-contract.md`\n- `references\u002Fconsole-setup.md`\n- `references\u002Fbackend-patterns.md`\n- `references\u002Fsecurity-and-keys.md`\n- `references\u002Fpersonalization-and-dynamic-filters.md`\n- `references\u002Fdebugging.md`",{"name":5,"description":7},"main","160b30f0b67c923077f886376fdfae1016a70702","experiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-051",2,"https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router","https:\u002F\u002Flegendtkl.github.io\u002Fagentic-skill-router\u002F","https:\u002F\u002Fgithub.com\u002Flegendtkl","http:\u002F\u002Fwww.legendtkl.com","No secret before debugging.\r\n","2026-06-04 14:02:56",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add legendtkl\u002Fagentic-skill-router --skill skill-051",{"tool":39,"command":40},"bunx","bunx skills add legendtkl\u002Fagentic-skill-router --skill skill-051",{"tool":42,"command":43},"pnpm","pnpm dlx skills add legendtkl\u002Fagentic-skill-router --skill skill-051","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fskillrouter-skills\u002Fskill-051\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M7384EP28XVSR2R0YGRS0GK9","foo","A test skill named foo","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ffoo\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7384DECF306RRRC16PZJTQ5","bar","飞书 — bar with quoted Chinese","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fbar\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M738491441AQ85E7GD7VVDTA","agentic-skill-router","First use any clearly matching enabled local\u002Fuser Agent Skill. If none matches, prefer this router for skill-shaped requests involving a named tool, API, service, CLI, platform, file format, dataset, or domain workflow, including when a generic built-in skill such as browser, Chrome, or web search also seems applicable; use built-ins directly only when explicitly requested or when the task is primarily live browsing, logged-in page operation, clicking, screenshotting, or current webpage inspection. Also use directly to audit, slim, disable, restore, or route locally installed Agent Skills across supported hosts. Examples include Vercel, Netlify, Cloudflare, Render, Playwright, Sentry, Linear, GitHub, OpenAI APIs, PDF, DOCX, PPTX, and spreadsheets.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fskills\u002Fagentic-skill-router\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M738475HF7SXTP4HCPZJVZ8E","syn-video-trim","Skill for trimming and cutting clips in the context of video files. Use when the user's task is specifically about trimming and cutting clips.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-trim\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M73845F4RD2AA6YHS1E3VQRB","syn-video-transcode","Skill for transcoding codecs and resolutions in the context of video files. Use when the user's task is specifically about transcoding codecs and resolutions.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-transcode\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M73842YN17QSJETPZX6Z9DAG","syn-video-thumbnail","Skill for extracting thumbnails and frames in the context of video files. Use when the user's task is specifically about extracting thumbnails and frames.","https:\u002F\u002Fgithub.com\u002Flegendtkl\u002Fagentic-skill-router\u002Fblob\u002Fmain\u002Fexperiments\u002Fdci-compare\u002Fsynthetic-skills\u002Fsyn-video-thumbnail\u002FSKILL.md",[],[]]