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.5 $0.00054 $0.00549
Sonnet 5.5 $0.00027 $0.00274
Haiku 4.5 $0.00014 $0.00137

Measured 1mo ago against content hash 86936eeef01f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 1mo ago), licensed MIT. It adds 136 tokens to every session and 1,372 once invoked, about $0.0005 per session on Opus 5.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

uig

Build a User Input Grid (UIG) for an AI product or feature, evaluate existing eval datasets against it, and propose new inputs to fill coverage gaps. Use this skill whenever someone asks to design an eval framework, audit a test set, build a "user input grid", "synthetic query matrix" or "SQM", improve dataset…

Calibre-Labs/reforge-ai-evals · 146 tokens

eval-llm-judge

Write LLM-as-judge evaluator prompts for AI products. Use this skill whenever you need to evaluate semantic properties of AI outputs that cannot be checked programmatically — output quality, tone, factual accuracy, edge case handling, reference alignment. Also use when auditing existing judge prompts for bias…

Calibre-Labs/reforge-ai-evals · 92 tokens

eval-code

Write deterministic, code-based evaluator functions for an AI product. Use this skill whenever you need to write evaluators that check structural properties of AI outputs (format, count, presence, schema compliance) without calling another LLM. Also use when auditing existing code-based evaluators for brittleness…

Calibre-Labs/reforge-ai-evals · 68 tokens

llm-align

Analyze alignment between LLM judge scores and human labels in an eval dataset. Use this skill whenever someone wants to evaluate how well an LLM judge agrees with human reviewers, calculate TPR/TNR, investigate disagreements, or improve a scorer prompt. Trigger on phrases like: "calculate TPR/TNR", "judge alignment"…

Calibre-Labs/reforge-ai-evals · 125 tokens

ticket-to-eval

Strip PII from a customer support ticket or eval trace and convert it into eval dataset rows. Produces two outputs: a regression dataset row (close to the original input, tagged with failuremode) and a generalized dataset row (abstracted for broader coverage). Works with local CSV files or any eval platform. Use this…

Calibre-Labs/reforge-ai-evals · 127 tokens

trace-codes

Turn free-form notes from reading agent traces into trace codes: named, yes/no failure or quality patterns with definitions, examples and counts. Use this skill whenever someone has annotated traces or review notes and asks to "cluster my notes", "create trace codes", "find the failure modes", "do error analysis on…

Calibre-Labs/reforge-ai-evals · 117 tokens