SkillMachine
All skills

Metric Calculation Engine

Spreadsheet

Deterministically computes goal-progress metrics (delta, trend, regression, Pareto, exploration budget) and produces a structured score row for each goal.

Live output preview

Input Format: Goal Parameters (goal-card-v2)Output: Computed Metric Rows

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?

You don't "run" a skill — after installing it you just tell the agent your task (e.g. ask for the relevant job), and the skill kicks in by itself when its description matches.

Upload the metric-calculator.zip you downloaded as-is — no packaging needed, the format is already correct (folder at root).

  1. Open Settings → Customize → Skills
  2. Upload → select the metric-calculator.zip you downloaded
  3. Claude reads SKILL.md; the name + description appear. Ready ✅

Scripts run in Anthropic's code-execution environment (sandbox) — not on your machine.