Fail-closed Meta Pixel + Conversions API orchestration for Claude Code.
Covers 8 platforms. Enforces SHA-256 hashing, event deduplication, source validation, and security checks. Blocks output if any integrity check fails.
| Platform | Type |
|---|---|
| Next.js | Route handler CAPI |
| React | Backend proxy CAPI |
| Shopify | Native Meta channel + custom CAPI |
| WordPress | Server hook / endpoint CAPI |
| GoHighLevel | Workflow CAPI action |
| ClickFunnels | Native settings + CAPI |
| Webflow | Custom code embed + backend CAPI |
| Static HTML | Manual Pixel + server endpoint |
Unsupported platforms get a structured fallback contract with explicit limitations.
When you ask Claude to implement Meta Pixel + CAPI tracking, this skill:
- Detects the platform from your query
- Validates all source URLs are live and current (14-day max age for Meta docs)
- Loads platform-specific implementation recipe
- Enforces 19 rules covering dedup, hashing, security, and platform requirements
- Outputs a deterministic 7-section implementation plan
- Blocks output if any source is stale, rule is unmapped, or security pattern is violated
The skill will refuse to generate output and return a BLOCKED status with reason codes if:
- Any Meta source document is older than 14 days
- A rule references a source that doesn't exist in the registry
- The configured Graph API version is invalid
- A platform reference file is missing required sections
- Secret patterns or wildcard CORS are detected in fixtures
/plugin add rileyvibecodes/meta-pixel-capi
The skill becomes available as /meta-pixel-capi:meta-pixel-capi.
Copy directly into your project:
cp -r skills/meta-pixel-capi .claude/skills/meta-pixel-capiOr install globally (available in all projects):
cp -r skills/meta-pixel-capi ~/.claude/skills/meta-pixel-capiThis skill follows the Agent Skills open standard. Copy skills/meta-pixel-capi/ into your tool's skill directory:
| Tool | Path |
|---|---|
| Cursor | .cursor/skills/meta-pixel-capi/ |
| Codex | .codex/skills/meta-pixel-capi/ |
| Gemini CLI | .gemini/skills/meta-pixel-capi/ |
Ask Claude to implement Meta tracking on any supported platform:
Set up Meta Pixel and CAPI on my Next.js app
Audit my Shopify Meta tracking because EMQ score is low
My GoHighLevel funnel shows duplicate Lead events in Events Manager
The skill auto-triggers on queries mentioning Meta Pixel, CAPI, Conversions API, EMQ, dedup, or event match quality combined with a supported platform name.
- SHA-256 on all user_data fields:
em,ph,fn,ln,db,ct,st,zp,country,ge,external_id - Never hash:
client_ip_address,client_user_agent,fbp,fbc,event_id - Output: 64-character lowercase hex
| Field | Rule |
|---|---|
| Lowercase + trim | |
| Phone | E.164 (strip non-numeric, add country code) |
| Names | Lowercase + trim |
| ZIP | 5-digit US |
| Country | ISO 3166-1 alpha-2 lowercase |
- Server tokens in environment variables only (never client-side)
- No wildcard CORS (
Access-Control-Allow-Origin: *) - Secret pattern detection across all skill files
- Zero secret echo policy (mask with
****)
Every Purchase event must include value (float), currency (ISO 4217), content_ids (array), and content_type for ROAS optimization.
Shared event_id between browser Pixel (eventID parameter) and server CAPI (event_id field). Both events must fire for the same user action.
Run the built-in validator:
python3 skills/meta-pixel-capi/validator/validate.py --strict --platform allRun the full eval suite (56 tests across 4 groups):
python3 skills/meta-pixel-capi/evals/run-evals.pySkip URL liveness checks (for CI):
python3 skills/meta-pixel-capi/evals/run-evals.py --skip-liveness| Group | Tests | What It Checks |
|---|---|---|
| Trigger Classification | 20 | Correct activation on Meta+CAPI queries, no false positives |
| Scenario Assertions | 20 | Platform references, fixtures, checks, sources, security |
| Fail-Closed Mutations | 4 | Stale sources, missing rules, unsupported platforms, invalid API |
| Source URL Liveness | 12 | All reference URLs return HTTP 200 |
skills/meta-pixel-capi/
├── SKILL.md # Execution contract
├── manifests/
│ ├── platform-matrix.json # 8 Tier-1 platform definitions
│ ├── rule-registry.json # 19 enforcement rules
│ └── source-registry.json # 12 allowlisted source URLs
├── references/
│ ├── core/
│ │ ├── capi-baseline.md # Hashing, normalization, timing
│ │ ├── contract.md # 7-section output contract
│ │ ├── ios-aem-context.md # iOS 14.5+ and AEM context
│ │ └── unsupported-fallback.md # Fallback for non-Tier-1 stacks
│ ├── platforms/ # 8 platform-specific recipes
│ ├── security/ # Secret handling + networking policy
│ └── troubleshooting/ # Common failure modes
├── validator/
│ ├── validate.py # 6-check integrity validator
│ ├── patterns.py # Secret + CORS regex patterns
│ └── fixtures/ # Test data for validator
├── evals/
│ ├── run-evals.py # 56-test eval runner
│ ├── evals.json # Scenario assertions
│ ├── trigger-eval.json # Trigger classification tests
│ └── stress-tests.json # Fail-closed mutation tests
└── reports/
├── verification-report.md # Launch verification (READY)
├── eval-report.json # Structured eval results
└── latest.json # Latest validation run
GitHub Actions workflow included. Add to your repo:
name: meta-pixel-capi-validate
on:
pull_request:
paths:
- '.claude/skills/meta-pixel-capi/**'
push:
paths:
- '.claude/skills/meta-pixel-capi/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python3 .claude/skills/meta-pixel-capi/validator/validate.py --strict --platform all
- run: python3 .claude/skills/meta-pixel-capi/evals/run-evals.py --skip-liveness- Python 3.11+ (for validator and evals)
- No external dependencies (stdlib only)
MIT