Claude-skill-registry clix-api-triggered-campaigns
Helps developers configure API-triggered campaigns in the Clix console and
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/api-triggered-campaigns" ~/.claude/skills/majiayu000-claude-skill-registry-clix-api-triggered-campaigns && rm -rf "$T"
manifest:
skills/data/api-triggered-campaigns/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- references API keys
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
API-Triggered Campaigns (Backend → Clix)
Use this skill to set up API-triggered campaigns in the Clix console and trigger them from your backend with dynamic data (
trigger.*) for:
- Transactional notifications (orders, password reset, receipts)
- Workflow messages (assignments, approvals)
- System alerts (moderation, support tickets)
- Programmatic sends where marketers/ops should control content + targeting
What the official docs guarantee (high-signal)
- API-triggered campaigns are configured in the console, then triggered via:
POST /api/v1/campaigns/{campaign_id}:trigger - Authentication uses secret headers:
X-Clix-Project-IDX-Clix-API-Key
- Request
becomeproperties
for:trigger.*- Dynamic audience filtering (console audience rules)
- Personalization in templates (title/body/deep links)
sends to all users eligible under the campaign’s segment definition;audience.broadcast=true
narrows to specific users/devices (still filtered by the segment definition).audience.targets- Dynamic audience filters are intentionally constrained for performance: max 3 attributes in the audience definition.
MCP-first (source of truth)
If Clix MCP tools are available, treat them as the source of truth:
- Use
to confirm the latest API contract + limits:clix-mcp-server:search_docs- query examples:
"API-triggered campaign trigger endpoint""campaigns/{campaign_id}:trigger audience targets broadcast""trigger.* dynamic audience filters limitations"
- query examples:
If MCP tools are not available, use the bundled references:
- API contract →
references/api-contract.md - Console setup + dynamic filters →
references/console-setup.md - Backend patterns (auth, retries, timeouts) →
references/backend-patterns.md - Security/key handling →
references/security-and-keys.md - Personalization + dynamic filters →
references/personalization-and-dynamic-filters.md - Debugging checklist →
references/debugging.md
Workflow (copy + check off)
API-triggered campaign progress: - [ ] 1) Confirm goals + trigger source (what backend event sends the message?) - [ ] 2) Define campaign contract (properties keys/types; PII policy) - [ ] 3) Configure campaign in console (API-triggered + audience rules + templates) - [ ] 4) Implement backend trigger wrapper (auth, timeout, retries, logging) - [ ] 5) Validate trigger plan JSON (schema + naming + safety) - [ ] 6) Verify in Clix (test payloads, Message Logs, segment matching)
1) Confirm the minimum inputs
Ask only what’s needed:
- Campaign: where is it in the console? do you already have
?campaign_id - Channel: push / in-app / email / etc. (affects message template fields)
- Audience mode: broadcast vs explicit targets
- Dynamic filter keys: which
keys are used in audience rulestrigger.* - Properties: list of keys + types + example values (avoid PII by default)
- Backend: runtime and HTTP client (Node/Fetch, Axios, Python, Go, etc.)
2) Create a “Trigger Plan” (before touching backend code)
Create
api-trigger-plan.json in .clix/ (recommended) or project root.
Recommended location:
.clix/api-trigger-plan.json
Plan schema (high-level):
(string)campaign_id
:audience.mode"broadcast" | "targets" | "default"
(if mode isaudience.targets
)"targets"
(array of up to 3 snake_case keys)dynamic_filter_keys
(map of snake_case keys →properties
){ type, required?, example?, pii? }
Example:
{ "campaign_id": "019aa002-1d0e-7407-a0c5-5bfa8dd2be30", "audience": { "mode": "broadcast" }, "dynamic_filter_keys": ["store_location"], "properties": { "store_location": { "type": "string", "required": true, "example": "San Francisco" }, "order_id": { "type": "string", "required": true, "example": "ORD-12345" }, "item_count": { "type": "number", "required": true, "example": 3 }, "pickup_time": { "type": "string", "required": false, "example": "2:30 PM" } } }
3) Configure campaign in the console (API-triggered)
- Set the campaign type to API-Triggered.
- Build audience rules using
for dynamic filters.{{ trigger.* }} - Use
in message templates + deep links.{{ trigger.* }}
See:
references/console-setup.md for exact guidance and limitations.
4) Implement backend trigger wrapper (best practices)
Backend wrapper responsibilities:
- Auth: load
andX-Clix-Project-ID
from environment/secret store (never commit).X-Clix-API-Key - Timeout: set a short timeout (e.g., 3–10s) and fail fast.
- Retries: retry only on transient failures (network/5xx), with backoff; do not retry blindly on 4xx.
- Dedupe: prevent double-sends in your system (e.g., unique key per order event) since the API call is “send-like”.
- Logging: log
, your correlation id (order id), and the Clix response (e.g.,campaign_id
).trigger_id
Copy/paste examples:
- Node:
examples/trigger-campaign-node.js - Python:
examples/trigger-campaign-python.py
5) Validate the plan (fast feedback loop)
Run:
bash <skill-dir>/scripts/validate-api-trigger-plan.sh .clix/api-trigger-plan.json
This validator checks:
- valid JSON
presentcampaign_id
is ≤ 3 and snake_casedynamic_filter_keys
keys are snake_case and have valid typesproperties- example values match declared types
entries specify exactly one oftargets
orproject_user_iddevice_id
6) Verify (Clix + end-to-end)
Minimum verification:
- Campaign is API-Triggered and
matches.campaign_id - If using dynamic audience filters, the
keys exist in the API call and match audience rules exactly.trigger.* - Trigger once with a known-good payload; confirm delivery + inspect Message Logs for rendering errors.
See
references/debugging.md.
Progressive Disclosure
- Level 1: This
(always loaded)SKILL.md - Level 2:
(load when implementing details)references/ - Level 3:
(load when copy/pasting backend code)examples/ - Level 4:
(execute directly; do not load into context)scripts/
References
references/api-contract.mdreferences/console-setup.mdreferences/backend-patterns.mdreferences/security-and-keys.mdreferences/personalization-and-dynamic-filters.mdreferences/debugging.md