metric-change-attribution

metric-change-attribution is a skill for Claude Code, Codex from aaronartistzhang-afk/DailyWork. It costs 136 tokens per session (1,372 once invoked), scanned A, original, MIT.

A method for explaining why a metric changed between two comparable periods, such as this month versus last month. It ranks the categories or factors that contributed to the change and can examine ratio metrics such as conversion rate or click-through rate.

In plain words
What is it for?
Use it to analyze period-over-period changes in rates, totals, retention, reach, clicks, conversions, wins, or revenue per user using a configuration file.
Why use it?
It replaces a vague statement that a number went up or down with a breakdown of which segments or factors account for the observed difference.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to analyze period-over-period changes in rates, totals, retention, reach, clicks, conversions, wins, or revenue per user using a configuration file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aaronartistzhang-afk/dailywork/metric-change-attribution
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aaronartistzhang-afk/DailyWork --skill metric-change-attribution
Clone the repo
git clone --depth 1 https://github.com/aaronartistzhang-afk/DailyWork

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for metric-change-attribution

README.md
[![agentmods](https://agentmods.dev/badge/skills/aaronartistzhang-afk/dailywork/metric-change-attribution/github.svg)](https://agentmods.dev/skills/aaronartistzhang-afk/dailywork/metric-change-attribution)
Your own site
<a href="https://agentmods.dev/skills/aaronartistzhang-afk/dailywork/metric-change-attribution"><img src="https://agentmods.dev/badge/skills/aaronartistzhang-afk/dailywork/metric-change-attribution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for metric-change-attribution

Your own site · 80×15
<a href="https://agentmods.dev/skills/aaronartistzhang-afk/dailywork/metric-change-attribution"><img src="https://agentmods.dev/badge/skills/aaronartistzhang-afk/dailywork/metric-change-attribution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00136 $0.01372
Opus 5 $0.00068 $0.00686
Sonnet 5 $0.00027 $0.00274
Haiku 4.5 $0.00014 $0.00137

Measured 12d ago against content hash 86936eeef01f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

metric-change-attribution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/attribution.py, scripts/run_analysis.py, scripts/selftest.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/metric-change-attribution/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Period-over-Period Metric-Change Attribution

A metric moved between two periods. This skill attributes why: it ranks the dimension members that drove the change (解释度/ep), optionally splits a ratio into multiplicative factors (structure × quality), drills the top contributor level by level to the root, and classifies old/new turnover at the leaf — while guarding against the dual-source denominator trap.

Metric-agnostic and config-driven: the same engine works for ratio metrics (numerator/denominator) and additive totals (a single measure). You declare the metric, dimensions, and sources in a small YAML config; you do not edit code.

When to use

  • Two comparable periods of the same metric, sliceable by ≥1 categorical dimension.
  • You want "which segment/factor/item is responsible", ranked and drilled.
  • NOT for: forecasting, single-series anomaly-point detection, or causal inference beyond decomposition of an observed change.

The 6-step method

  1. Declare a config — period (prev/curr), metric (ratio or additive), the dimension hierarchy, sources + column maps. Copy templates/analysis.config.yaml.
  2. Validate + dual-source check — long-format sanity; confirm the deduplicated source is the denominator truth and any leaf "pool" source is direction-only.
  3. Score the top dimension — ratio: ep / 解释度 (sums to 100%); additive: Δ-share.
  4. (ratio, optional) factor split — log-decompose the rate into structure × quality.
  5. Rank, noise-filter, drill Top-1 — skip near-zero-magnitude noise; recurse into the top contributor to the next level.
  6. Leaf turnover — at the leaf, classify each member expired / shrinking / stable / ramping / new; a pool-backed leaf attributes by the driver's Δ-share.

Quickstart

# run the worked example (bundled synthetic reach-rate sample):
python scripts/run_analysis.py --config examples/reach-rate.config.yaml
# your own analysis:
cp templates/analysis.config.yaml my.yaml   # fill it in
python scripts/run_analysis.py --config my.yaml --json out.json
# verify the engine (synthetic invariants + frozen golden regression):
python scripts/selftest.py

Or import the stateless engine directly: from scripts import attribution as A (see signatures in scripts/attribution.py).

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 100 lines · 136 tokens per session scan A 86936eeef01f

Subscribe to this mod's changes

metric-change-attribution is a skill published in the GitHub repository aaronartistzhang-afk/DailyWork (1 stars, last pushed 14d ago), licensed MIT. It adds 136 tokens to every session and 1,372 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

create-custom-grader

Use when converting an existing benchmark, rubric, verifier, task YAML/JSON, or domain check into SkillEvaluator BYOG/BYOT custom evaluation.

NVIDIA/SkillEvaluator · 35 tokens

ab-test-generator

Generate A/B test variants for affiliate content. Triggers on: "create A/B test", "test my headline", "optimize my CTA", "generate variants", "split test ideas", "improve click-through rate", "test my landing page copy", "headline alternatives", "CTA variations", "which version is better", "optimize conversions"…

Affitor/affiliate-skills · 87 tokens

authoring-ci-workflows

Use when adding or editing a GitHub Actions workflow, composite action, or reusable workflow under .github/ — new CI jobs, triggers, matrices, checkout/clone tuning, action pinning, GitHub App token auth, concurrency groups, timeout-minutes, paths filters, caching, or runner choice. Covers PostHog's workflow-authoring…

PostHog/posthog · 193 tokens

debugging-mcp-analytics

Debug, support, and build PostHog MCP Analytics — product analytics for MCP servers (the @posthog/mcp and posthog.mcp SDKs plus the mcpanalytics product). Use when MCP analytics data looks wrong or missing ("events aren't showing", "intent clusters are empty", "sessions are missing", "per-tool numbers look wrong")…

PostHog/posthog · 211 tokens

debugging-ci-failures

Debugs failing GitHub Actions CI runs for PostHog PRs, commits, and branches, and answers broad CI-health questions ("is CI red?", "is master green today?", "what's broken right now?"). Use when the user asks why CI is red, asks for the current CI or master status, or mentions a failing check, GitHub Actions run…

PostHog/posthog · 198 tokens

monitoring-capture-service

Guide for using the Grafana MCP to monitor and diagnose the capture service (rust/capture) in production. Use when investigating latency, event loss, Kafka backpressure, Redis issues, rate limiting, Envoy proxy issues, or any capture health question. Covers prod-us and prod-eu environments.

PostHog/posthog · 66 tokens