/workmagic:attribution-anomaly-diagnosisfrom WorkMagic
Diagnoses why attribution anomalies occur — zero attributed orders, sudden drops, spikes, or retroactive changes. Uses a 5-step diagnostic tree to produce internal reports and client-facing explanations.
Ships in WorkMagic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Diagnose "why" questions about attribution anomalies — specifically attribution = 0 (a tactic shows no attributed orders) and attribution swings (sudden drops / spikes / retroactive changes to historical numbers). 5-step diagnostic tree → internal report + client-facing explanation.
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 (load theattribution-data-queryskill from this plugin if it isn't loaded). Note this skill reads MMM-calibrated measures (calibrated_*) for some checks — a different measure from theattr_*the other skills use; keep them clearly labeled so a $ figure here is never confused with an attributed-sales figure. (Open question flagged to DS — see the team doc.)
Do NOT use this skill for "show me the numbers" queries — those belong to attribution-data-query.
Trigger when user is asking why attribution looks wrong, not just what the numbers are.
Do NOT trigger:
attribution-data-queryattribution-model-comparisonattribution-edge-routing| Field | Required? | Notes |
|---|---|---|
tenant_id | Required | Injected by platform-mcp; never appears in SQL filters |
ads_platform | Required | Meta / Google / TikTok / Pinterest / Snap / Amazon Ads... |
tactic_name | Optional | If not given, scan all and pick biggest contributor to the anomaly |
sales_platform | Required | Amazon Store / Shopify / TikTok Shop. Attribution is computed per sales platform; wrong combo (Amazon Ads → Shopify) always returns 0 by design. |
attribution_model | Optional | idda(32) / dda(31) / last_click(1) / first_click(2) / any_click(21). If unspecified, Step 1 scans all to locate which is broken. SQL dimension: attr_model_name. |
metric | Required | roas / attr_orders / attr_new_customer_orders / cac |
anomaly_period | Required | Window where the user sees the anomaly |
baseline_period | Optional | Comparison window. Default: same-length period immediately before anomaly_period. |
Ask for missing required fields once before running diagnostics.
Step 0: database-query-ask (MANDATORY) — produces the ctx timestamp database-query-run requires. Skipping fails at execution.
Step 1: Lock the scope — pinpoint whose attribution is broken before diagnosing why. If attribution_model is unspecified, compare all models in anomaly vs baseline windows to find which one diverged.
After Step 1: confirm with user which ads_platform + tactic + sales_platform + attribution_model before continuing.
Step 2: Classify — "attribution = 0" or "swing"?
| Type | How to detect | Next |
|---|---|---|
| Attribution = 0 | attr_orders / attr_sales exactly 0, or tactic row missing | Step 3b → 3c → 3d (config / product-design first) |
| Attribution swing | Sharp jump up/down, OR same window returns different numbers on different pull dates | Step 3a (spend check) → Step 5 (model routing) |
Step 3: Basic checks — rule out config / product-design causes before model branches. Detail → references/basic-checks.md
Step 4: Attribution-model quick reference
| Model | model_id | Mechanism |
|---|---|---|
| Last Click | 1 | Last click before conversion gets 100% credit |
| First Click | 2 | First click before conversion gets 100% credit |
| Any Click | 21 | Linear: every click in window gets equal share |
| DDA | 31 | Any Click + handling for Unmatched, VTA, PPS |
| iDDA | 32 | DDA + spend-change weighting + lift-test calibration |
Step 5: Model-specific branches — detail → references/model-branches.md
Step 6: Fallback — campaign-structure shift — if all branches come up clean, check whether campaign mix actually changed (a competing tactic squeezed share, or upper-funnel campaigns flooded delivery). Detail → references/fallback-structure.md
| Tool | Required? | Purpose |
|---|---|---|
database-query-ask | Required (first) | Cube.dev schema patterns + ctx timestamp |
dashboard-metrics-list | Required | Validate field names (e.g., attr_model_name, calibrated_orders) |
database-query-run | Required | Execute Cube.dev SQL. |
lift-test-list / lift-test-get | Conditional | Branch C / C3 — pull lift test metadata when iDDA retroactive change is suspected |
Diagnosis output is customer-facing — a "why did X drop" answer is a report a CSM
forwards to the client, so produce it as a static HTML artifact (a shareable
diagnosis page via the artifacts skill), not just a chat message.
The page:
artifacts chart method.model_id, dws_view_*, Branch A/B/C).Full section template + 7 reusable scenario snippets → references/output-template.md + references/scenario-snippets.md
templates/ before writing SQL — do not write from scratchdatabase-query-ask before SQL — database-query-run requires the ctxmodel_id = 32, no dws_view_* table names, no Branch A/B/C labels in customer outputtenant_id filters in SQL — platform-mcp injects itFull edge case & routing catalog → references/edge-cases.md
attribution-intent-clarification (if the "why" question is too vague to scope)attribution-model-comparison (user wants two models compared, not a diagnosis), attribution-data-query (user just wants numbers, no diagnosis)attribution-edge-routing (out-of-scope channel/tenant)examples/example-A-meta-roas-drop.md (opens in a new tab)references/basic-checks.md (opens in a new tab)references/edge-cases.md (opens in a new tab)references/failure-modes.md (opens in a new tab)references/fallback-structure.md (opens in a new tab)references/model-branches.md (opens in a new tab)references/output-template.md (opens in a new tab)references/scenario-snippets.md (opens in a new tab)templates/01-scope-lookup.txt (opens in a new tab)templates/02-spend-vs-attribution.txt (opens in a new tab)templates/03-measurement-readiness.txt (opens in a new tab)templates/04-utm-health.txt (opens in a new tab)templates/05-click-distribution.txt (opens in a new tab)templates/06-dda-vs-anyclick.txt (opens in a new tab)templates/07-lift-test-results.txt (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub workmagicio/workmagic-agent-plugin --plugin workmagic9 skills in this plugin
/attribution-custom-dimensionHandle attribution queries sliced by a business label ("by audience" / "by region" / "by brand") that is not a native field — it lives in campaign names and only becomes queryable once a Naming Convention (NC) rule is configured./attribution-data-queryTranslate explicit data requests into Cube.dev SQL and return results. Default skill for query-type asks in the Attribution domain. No estimation, no fabrication, no proactive dashboards./attribution-edge-routingRecognize when a user request falls outside attribution's capability boundary and route it gracefully — to another WM product (MBO / Lift Test / Creative Magic / Ads Magic / Audience Magic), to a human (CSM / DS / Eng), or to a clean decline that bridges back to what attribution can answer.Other plugins' skills for the same job