Attribution model comparison
Skill workmagicio/skills/skills/attribution-model-comparison
Pull attribution numbers under multiple attribution models side-by-side and explain why they differ in business language. Default 4-way comparison (idda / dda / last_click / platform_reported). Includes the canonical diff-pattern playbook so the agent doesn't invent reasons.From its SKILL.md
npx -y skills add workmagicio/skills --skill attribution-model-comparisonAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.1 KB, as published. Nobody here has run it
1. Purpose
Pull attribution numbers under multiple attribution models side-by-side and explain why they differ, using business-language interpretation grounded in how each model works. Exists because users frequently see different numbers in different places (WorkMagic dashboard vs Meta Ads Manager vs Google Ads) and want to understand the discrepancy.
Shared conventions (canonical elsewhere — don't re-derive): attribution model default + aliases and sales-platform scope + measurement identity live in
attribution-data-query(references/attribution-model.md,references/sales-platform-scope.md); follow those (read viaskills_readif not loaded). This skill'sreferences/model-reference.mdowns only the model↔model_idSQL mapping.
This skill is NOT:
- Diagnosis of why a single model dropped →
attribution-anomaly-diagnosis - Judgment of which model is "correct" — give situational guidance only if asked; never push one as the right answer
- A pure data pull — must include the interpretation step
2. When to trigger
Trigger when user wants to compare attribution under different models:
- "Compare Meta under last_click vs iDDA"
- "Why is WorkMagic showing lower ROAS than Meta Ads Manager?"
- "Show me the difference between data_driven and first_click for all channels"
- "How do my channels look across all attribution models?"
- "Which attribution model should I trust for Meta?" (educational variant — answer + optionally pull data)
Do NOT trigger:
- User wants a single model's number →
attribution-data-query - User asks "why did X drop?" on a single model →
attribution-anomaly-diagnosis - Pure educational ("what is iDDA?") → answer from
database-query-askwithout pulling data
3. Inputs
| Field | Required? | Default / Notes |
|---|---|---|
models | Has default | DTC sales platform: [idda, dda, last_click, platform_reported] <br/>Non-DTC sales platform: [idda, dda, platform_reported] (no click-based models — see references/model-reference.md) |
ads_platform | Required | Meta / Google / TikTok / Pinterest / Snap / Amazon Ads / "all" |
sales_platform | Has default | If 1 connected → use it; if multiple → ask once. Never mix sales platforms in one comparison row. |
metric | Has default | attr_orders + roas (most commonly compared). If user specifies one, use it. |
dimension | Has default | By ads_platform (channel level). "All channels" / "across channels" → channel level. Named single channel → drill to tactic_name or campaign_name. |
time_range | Has default | Past 30 days. Model comparison needs enough volume to be stable; 7 days is too noisy. |
Model → model_id mapping + DTC vs non-DTC availability → references/model-reference.md
4. SOP
Step 1: Parse the request
- Identify which models user wants. 0 specified → use default 4-way (DTC) or 3-way (non-DTC). 1 specified → assume comparison against default set; ask once to confirm. 2+ specified → use exactly what they named.
- Check tenant has
iddaavailable by probing forattr_model_name = 'idda'data viadashboard-metrics-listor a quickdatabase-query-runcount on model 32 — not vialift-test-list(a tenant can have ran lift tests historically without having current iDDA data). If no model 32 data, replaceiddawithddain the default set and inform the user. - Cap at 6 models; more than that is unreadable.
Step 2: database-query-ask (MANDATORY)
- How to query multiple models in one SQL via
attr_model_name/attr_model_array - Mechanism diff between the chosen models (powers Step 6 interpretation)
- Whether the tenant has active lift tests affecting the time window (relevant for iDDA interpretation)
Required for the ctx timestamp database-query-run needs.
Step 3: Validate fields via dashboard-metrics-list — confirm metric names + attr_model_name dimension.
Step 4: Build the SQL
<callout emoji="🛑"> **HARD RULE — copy the template, then fill placeholders** Copy `templates/01-multi-model-comparison.sql`. Single `CASE WHEN` query with one branch per model, NOT N separate queries — guarantees comparison is on the same row set (same time range, filters, dedup). Fill: `{ads_platform}` / `{sales_platform}` / `{start_date}` / `{end_date}`, then add the rows for the model variants the user asked for. </callout>Step 5: Compute deltas
- For each row, compute
delta = idda − last_click(or whichever anchor pair makes the user's question clearest) - Express as absolute and percentage: "Meta: 4.8x → 2.3x (−52%)"
- Sort by absolute delta descending — biggest gaps first
Step 6: Interpret using diff patterns — match observed gap to references/diff-patterns.md (10 patterns):
For few channels → 1-2 sentences per row. For many channels → cover the 2-3 most striking rows only.
Step 7: Return — build the comparison artifact (see §6), NO follow-up question
- Output: a live-data Comparison artifact (grouped bars per channel × model + the diff-pattern "why they differ" readout + measurement identity). A tiny 1-channel check may stay a chat table.
- Don't ask "want me to also look at X?" — the artifact exposes drill-down
- Don't append "which model should I use?" guidance unless user explicitly asked
5. Tools used
| Tool | Required? | Purpose |
|---|---|---|
database-query-ask | Required (first) | Model mechanism explanations + Cube.dev schema patterns + ctx timestamp. This skill especially depends on KB for interpretation — never invent model behavior. |
dashboard-metrics-list | Required | Validate attr_orders, attr_roas, attr_model_name and other field names |
database-query-run | Required | Execute the multi-model CASE WHEN SQL in one shot |
lift-test-list | Conditional | Optional context for grounding the dda-vs-idda interpretation (e.g., "iDDA dropped after this lift test"). Do NOT use to check iDDA availability — probe model 32 data via dashboard-metrics-list instead. |
6. Output format
A model comparison is a report-shaped, screenshot-and-share result → produce a
live-data artifact (the dashboard skill, Comparison archetype), not a wall of
table in chat. (A quick 1-channel, single-metric check can stay a chat table — the
simple-pull path in attribution-data-query; a multi-channel / multi-model comparison
is an artifact.)
The artifact:
- Grouped bars per channel × model are the hero (categorical colour, one fixed
slot per model, never cycled — see the
artifactschart method). Sort channels by absolute delta descending; call out the largest gap. - "Why they differ" rendered from the
references/diff-patterns.mdplaybook — name the cause per channel, and on an unrecognized shape fall back to "models close", never invent a reason. - Measurement identity on the view: sales-platform scope + the models compared. One sales platform per comparison — never mix platforms in a single comparison (model validity differs by platform; run separately per platform).
- A table view stays available underneath the chart (accessibility), but the artifact
is the deliverable. Link to
attribution-anomaly-diagnosisfor drill-down.
Full field template + example → references/output-template.md
7. CRITICAL rules (top 9 — full list in references/failure-modes.md)
- Always copy the template SQL (
templates/01-multi-model-comparison.sql) — never run N separate queries; they can drift on filters / dedup and produce non-comparable numbers - Never compare click-based models on a non-DTC sales platform — last_click / first_click / any_click are NOT valid on Amazon Store and similar; only iDDA / DDA / platform_reported are. Dropping click models silently is also wrong — tell user once.
- Never mix multiple sales platforms in one comparison row — attribution is per sales platform AND valid model set differs. Run separately per sales platform.
- Never skip
database-query-askbefore SQL —ctxrequired - Never invent a reason for a diff that doesn't match a known pattern — say "this isn't a typical pattern" instead
- Never push one model as "the right answer" — give situational guidance only when asked
- Never default to a 7-day window — too noisy; use 30 days
- Never compare iDDA when no lift tests exist — surface missing-lift-test and use dda instead
- Never expose internal terminology — use business-language model names (Platform-reported, Last Click, DDA, iDDA), never the raw dimension / DataSet identifiers
attr_model_name/channel_attribution/ads_attribution/model_idas literal strings in the answer. A leaked identifier is a customer-facing defect.
8. Edge cases
Full edge case & routing catalog → references/edge-cases.md
9. Related skills
- Upstream:
attribution-intent-clarification(when "compare attribution" is too vague — which models? which channel?) - Sibling:
attribution-data-query(single-model number),attribution-anomaly-diagnosis(why a single model changed) - Downstream:
attribution-anomaly-diagnosis(if comparison surfaces a one-off anomaly — e.g., iDDA fell off a cliff because a new lift test was applied) - Out of scope:
attribution-edge-routing(MMM, forecasting, non-WM attribution products)