/workmagic-skills:attribution-weekly-reportfrom workmagic-skills
Builds or schedules a recurring attribution performance board at daily, weekly, monthly, or quarterly cadence. Supports optional scheduled delivery and condition-based alerts (Heartbeat).
Ships in workmagic-skills. 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.
Own the recurring view of attribution performance, end to end:
A schedule is not required to be in scope. "Give me a page I can check every Monday" is this skill with step 7 answered "no". That is the common case, not an edge case.
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); the numbers here default to all sales platforms and every surface — board and snapshot — states scope + model.
The board's content is specified in two layers, and this split is load-bearing:
references/board-spine.md holds what every cadence guarantees; board-daily.md /
board-weekly.md / board-monthly.md / board-quarterly.md hold only that cadence's
deltas. Never copy spine content into a cadence file. An alert is not a board —
board-alert.md says why before you build one.
Any request for a recurring view of attribution performance, or for something delivered on a cadence.
Do NOT trigger:
| The user wants | Use instead |
|---|---|
| A one-time number or small table in chat | attribution-data-query |
| A dashboard that is not a periodic business review (a comparison, a funnel study, a one-off exploration) | the host's dashboard skill, picking the archetype that fits |
| To know why a specific number looks wrong | attribution-anomaly-diagnosis |
| A breakdown by a business label that needs a Naming Convention rule | attribution-custom-dimension first, then come back |
| Field | Required? | Default / Notes |
|---|---|---|
cadence | Required (detected) | daily / weekly / monthly / quarterly, or alert. Drives which board spec applies. Default weekly when the user says "recurring" without naming one — it is the cadence people actually review on. |
push | Asked once (step 7) | Whether to also deliver a snapshot on a schedule. Never assumed in either direction. |
schedule | Conditional (push = yes) | Frequency + delivery clock. If only frequency is given: Mon 9:00 user-local (weekly), 1st of month 9:00 (monthly), 9:00 (daily). |
trigger_type | Detected | Cron (fixed schedule) or Heartbeat (condition-based). UI shows both as "scheduled tasks" — don't expose the distinction. |
content | Has default | The board's own KPI set per the cadence spec. Only ask if the user narrows scope (specific channels, a specific dataset). |
delivery | Conditional (push = yes) | in-app (default), email (ask for recipient), Slack (needs connector). Always confirm; never default to email silently. |
recipients | Conditional | Required for email / Slack. For "send to my CMO", ask for the address explicitly — never guess. |
attribution_model | Do not ask | Auto-apply tenant default; the board resolves it live. |
Step 1 — Detect cadence and intent. Fixed time → Cron. Condition ("alert me if") →
Heartbeat, and go read references/board-alert.md; an alert does not get its own board.
Quarterly or "for my CMO" → flag the executive variant.
Step 2 — At most one clarifying question. Lead with the one pivotal missing field — usually content scope. Do not ask about the attribution model, the comparison window (derive from cadence), or the snapshot format.
Step 3 — Skip the schema round trip. The four board queries in templates/ are the
confirmed schema — run them (step 4) instead of asking what to run. The ctx convention is
fixed and stated here: the board cannot call database-query-ask at render time, so it
passes a load-time ISO timestamp as ctx, set once per page load — never per render.
Call database-query-ask ONLY if a probe comes back with a schema error you cannot read
off the failure itself. It is a slow call whose answer you already have.
Step 4 — Probe EVERY query you will need, in ONE message. That means
templates/02-default-model.sql … 05-ads-ad-level.sql and the prior-window runs of
the same SQL — both windows go out together, typically 8 calls in a single message. They
are independent, so the host executes them in parallel: one round trip for all of them,
versus one per batch if you discover the prior window later. 🔴 Do not probe the current
period first and "then see if I need the comparison" — the board ALWAYS compares against
the prior window, so you already know you need it. Read the real results: column names,
the fact that numeric cells arrive as strings, and whether the row count matches the
question (a daily, multi-week, multi-channel query returning one row is a collapsed
aggregate, not data). Record which sales_platform values, ad platforms and tactic names
this account actually has, plus its spend magnitude — all three feed step 5.
Step 5 — Instantiate the board, then adapt it. Create the artifact FROM the skeleton —
bt-artifact-manage with action='save', type='react', a title, and
template: {skill, file: "templates/board.tsx"}, where skill is this skill's name as
the host lists it in its skill directory (on Justin: workmagic.attribution-weekly-report).
The host copies those 77k characters into the artifact itself. 🔴 Do not read
templates/board.tsx back, and do not re-type, paraphrase or "improve on" it: one
prod turn spent eight minutes writing a worse copy of a page that was already on disk.
Then read references/board-spine.md, the one cadence spec, and
references/instantiation.md, and apply that guide's edits to the saved artifact with
action='edit' (exact-string replacements — you send only what changes).
The skeleton already encodes the guarded bridge, per-part error boundaries,
the settled-window walk, period bucketing, length-normalised comparison, calendar alignment
with period-to-date handling, ratio-of-sums, the verdict engine and the action rules. It
ships configured for weekly; other cadences change the PERIOD block plus the deltas
their spec lists (dead bands, KPI additions, what Part 5 may recommend — those are not
config).
🛑 Replace the synthetic seed with values you probed in step 4. The shipped seed is fake by construction. A seed carrying a real account's figures is a data leak the moment the bridge is inert — the page renders another account's revenue as if it were this one's.
Step 6 — Self-review in code, and set the context note. Re-run one query and diff it
against what your edits map into the page; if the page would still show seed values while
the query succeeds, the mapping is wrong. Confirm the status strip says Live data. This
is a code + data review: screenshotting your own board is refused by the host, so do not
plan a look. Full checklist at the end of instantiation.md.
Step 7 — Ask once whether to also push a snapshot. "Want me to also send you a {cadence} snapshot so it lands in your inbox / Slack?" If no — you are done: hand over the board link. Do not treat that as a failure and do not re-ask. (Heartbeat/alert asks skip to step 8 — the trigger is the point.)
Step 8 — Pick the snapshot format by delivery channel. in-app / Slack → short digest +
link. email → rendered HTML (PDF for executive) + link, because the live view can't embed.
Copy from templates/; don't invent a layout. Details + the per-cadence table:
references/output-template.md.
Step 9 — Propose (diff card) → test-run → activate.
**Don't take the bait — never skip the test run** Activating a schedule without running once first looks faster, but the cost when it fails silently is high: the user (or their CMO) gets a broken or empty snapshot on Monday morning with no chance to catch it. Run once, show the output, then activate. Catches data gaps, broken metric names, empty filter sets, NC propertyNames not yet enabled.Test-run query: templates/01-weekly-metrics.sql. On success, activate via
create_scheduled_task and confirm with the next-fire time:
Scheduled. Next run: Monday, [date] at 09:00 (your timezone). You can pause or edit this in Scheduled Tasks*.*
Step 10 — End the turn. You already offered the snapshot in step 7; don't re-ask.
**Don't take the bait — never send to external email without explicit double-confirm** Delivering to an address outside the requester's org is a data-exposure event. Say so plainly — "This will share attribution data externally to [email] every [cadence]. Confirm?" — and proceed only on explicit yes.Tool names are unprefixed here. Justin exposes WorkMagic tools as wm_*; other MCP clients
expose them unprefixed. The board template tries both. The board is a Justin artifact, so
requires: bt-artifact-manage keeps this skill out of clients that don't have it.
| Tool | Required? | Purpose |
|---|---|---|
database-query-ask | Required (first) | Schema patterns + the ctx convention |
database-query-run | Required | Probe the four board queries (step 4); the board's only runtime data source; the snapshot test run |
bt-artifact-manage | Required | Save the board (R1) |
bt-artifact-read | Conditional | Read the current version (and its context note) before revising |
dashboard-metrics-list | Conditional | Validate metric / dimension names for the snapshot |
create_scheduled_task | Conditional (push = yes) | R1 at system level |
list_scheduled_tasks / update_scheduled_task | Conditional | "Update my weekly report" — list first, then edit with the same preview + confirm flow |
Never call dashboard-create / dashboard-section-create — we no longer build native
platform dashboards (attribution-edge-routing §7 rule 9).
One react artifact titled <Account> — <Cadence> Business Review, plus — only if the user
asked — one scheduled task. Record on save: the account, the cadence, the four queries
wired, that the attribution model resolves live, and any account-specific thresholds you
changed. A later edit has to honour those or it silently regresses the board.
Deliver the link with one sentence on what the board says this period. Don't also paste the numbers into chat — the board is the artifact.
attribution-data-query/references/sales-platform-scope.md.board-daily.md).<Guard>.references/edge-cases.md (routing + tenant situations) and references/failure-modes.md
(§A scheduling & delivery, §B board).
attribution-custom-dimension (run first when a requested cut needs a
Naming Convention rule), attribution-intent-clarification (ask is too vague)dashboard skill (render contract, archetypes, chart
primitives) and its artifacts skill (visual design, dark mode, blank-screen checks) —
this skill supplies the WorkMagic domain layer they defer toattribution-anomaly-diagnosis (the board surfaces a watch item → the
user asks why), mbo-create-scenario (the board says scale → the user asks how much),
lift-test-creation (the board can't tell whether a channel is incremental)attribution-edge-routing for unsupported delivery channels or
out-of-scope contentexamples/example-A-meta-google-weekly.md (opens in a new tab)references/board-alert.md (opens in a new tab)references/board-daily.md (opens in a new tab)references/board-monthly.md (opens in a new tab)references/board-quarterly.md (opens in a new tab)references/board-spine.md (opens in a new tab)references/board-weekly.md (opens in a new tab)references/edge-cases.md (opens in a new tab)references/executive-variant.md (opens in a new tab)references/failure-modes.md (opens in a new tab)references/instantiation.md (opens in a new tab)references/output-template.md (opens in a new tab)templates/01-weekly-metrics.sql (opens in a new tab)templates/02-default-model.sql (opens in a new tab)templates/03-ads-channel-daily.sql (opens in a new tab)templates/04-sales-platform-daily.sql (opens in a new tab)templates/05-ads-ad-level.sql (opens in a new tab)templates/board.tsx (opens in a new tab)templates/executive-report.md (opens in a new tab)templates/heartbeat-alert.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub workmagicio/skills --plugin workmagic-skills16 skills in this plugin
/attribution-anomaly-diagnosisDiagnose "why" questions about attribution anomalies — attribution=0 (no attributed orders), and sudden drops, spikes or retroactive changes in attributed numbers. Do NOT use for "show me numbers" — that's attribution-data-query./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.Other plugins' skills for the same job