Metric Calculation Engine
SpreadsheetDeterministically computes goal-progress metrics (delta, trend, regression, Pareto, exploration budget) and produces a structured score row for each goal.
Live output preview
A plan is required to view this content
Choose a plan to access input format, sample outputs, and live previews.
View Plans →About the skill
Metric Calculation Engine
A library skill that performs goal-progress calculations with deterministic (pure-function) logic instead of leaving them to LLM guesswork. It is compatible with the goal-card-v2 schema and reusable for the FAZ 0 (Gap Check) step of automator agents.
What it does
For each goal it runs six operations:
- delta — the distance of the latest measurement from the target (according to the maximize / minimize / maintain direction).
- trend — the tendency of the last N points (least-squares slope; min 3, ideally 5+ points).
- target_check — checks whether the target has been reached.
- regression — whether the last 2-3 measurements run counter to the target direction (regression detection).
- pareto — comparing two actions across multiple goals and finding the Pareto-dominated one.
- exploration_budget — the percentage of the remaining exploration (explore) quota.
When to use
When an agent needs metric delta calculation, trend analysis, a target-reached check, regression detection, or a multi-goal Pareto comparison. It is designed to avoid the "make the LLM do the math" anti-pattern.
Output
One row per goal: structured JSON containing the delta, target_reached, progress_pct, trend slope + direction + confidence level, regression flag, and exploration_budget fields. In this example, the 7 goals of an ad campaign optimization (CPC, conversion rate, budget protection, ROAS, CTR, acquisition cost, bounce rate) are computed — regression is detected in ROAS and acquisition cost.
How do I use this skill?
Upload the metric-calculator.zip you downloaded as-is — no packaging needed, the format is already correct (folder at root).
- Open Settings → Customize → Skills
- Upload → select the
metric-calculator.zipyou downloaded - Claude reads
SKILL.md; the name + description appear. Ready ✅
Scripts run in Anthropic's code-execution environment (sandbox) — not on your machine.