metric-contract

metric-contract is a skill for Claude Code, Codex from KimYx0207/Kim_Service. It costs 28 tokens per session (881 once invoked), scanned A, original, MIT.

A metric contract is a written, traceable definition of a business measure, including its people or objects, numerator, denominator, time window, and data sources. It also records how the measure changes over time.

In plain words
What is it for?
Use it to define KPIs, map each value back to events and fields, reconcile differences, and manage versioned changes to reporting logic.
Why use it?
It prevents the same metric name from meaning different things in different reports or queries. It makes data joins, exclusions, late records, and historical comparisons reviewable.

Skill for Claude CodeCodex

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

Good fit Use it to define KPIs, map each value back to events and fields, reconcile differences, and manage versioned changes to reporting logic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kimyx0207/kim_service/metric-contract
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 KimYx0207/Kim_Service --skill metric-contract
Clone the repo
git clone --depth 1 https://github.com/KimYx0207/Kim_Service

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-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimyx0207/kim_service/metric-contract/github.svg)](https://agentmods.dev/skills/kimyx0207/kim_service/metric-contract)
Your own site
<a href="https://agentmods.dev/skills/kimyx0207/kim_service/metric-contract"><img src="https://agentmods.dev/badge/skills/kimyx0207/kim_service/metric-contract/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-contract

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimyx0207/kim_service/metric-contract"><img src="https://agentmods.dev/badge/skills/kimyx0207/kim_service/metric-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 881 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.00028 $0.00881
Opus 5.5 $0.00011 $0.00352
Sonnet 5.5 $0.00006 $0.00176
Haiku 4.5 $0.00003 $0.00088

Measured 19d ago against content hash 16be9a5a7fb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

metric-contract 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 19d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (tests/contract.test.mjs), 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-contract/SKILL.md · 50 lines

What it actually says

业务指标口径契约

将业务问题转换成单一可追溯的指标定义,防止不同页面、SQL和报告使用同名不同义的数据。

开始前

  • question:业务决定、目标人群和拟衡量行为 缺失时:先形成定义草案,不只命名指标
  • dataMap:事件、实体、字段、关联、时间与数据源 缺失时:缺血缘或粒度时禁止给唯一确定值
  • policies:纳排、去重、时间窗、退款/迟到、版本和负责人 缺失时:关键规则待业务确认,不能静默默认

执行

  1. 阅读 工作方法,先确定适用条件与证据范围。
  2. 沿 专业方法 的 steps 执行具体操作,再用 完整交付模板 整理当前产物;诊断问题与空字段不能充当完成。
  3. 按 专业质量规则 中的具体输出规则选择检查方法,保存本次输入/产物定位及未观察项。
  4. 对照 作者正反例 检查常见专业错误;作者预期不算本次评测结果。
  5. 把规则结果、实际产物、未决问题交回调用方;缺口仅影响相关结论。

交付

  • definitions:指标定义和适用解释。
  • lineage:数据血缘与实现约束。
  • reconciliation:可复算对账与差异。
  • changePolicy:指标版本和变更影响。
  • facts:当前输入、来源、期间单位及证据缺口。
  • limitations:未执行、未观察、方法假设和外推边界。
  • handoff:当前产物、规则结果、证据定位与待解决事项交调用方。

关键验收条件

  • definitions:每指标写业务问题、分子/分母、粒度、窗口/时区、纳排和单位。 拒收:同名不同分母,订单数冒充买家数或人数与次数混算。
  • lineage:每输入能定位到实体/事件/字段/过滤与连接,说明基数和迟到处理。 拒收:只给表名,或一对多连接放大度量而无控制。
  • reconciliation:用相同边界按计数/金额/日期核对,差异追到规则和记录。 拒收:总额相同就宣布一致,或把未对上差值塞其他。
  • changePolicy:语义改变有版本、生效日期、受影响消费者与历史可比性说明。 拒收:改分母但沿用旧名称和历史趋势,或多处独立修改失去单源。

全部检查方法、证据要求和阻断标记以 method.json 为准。规则未执行时记录未观察;教学案例不是已经完成的专业评测。

边界

不把指标命名当真实数据正确,也不替代数据所有者批准生产口径或财务披露。

经营结算、对外财务披露、考核奖惩或影响个人权益的指标由相应业务与数据责任人确认。

只读本次指定材料;实际联网、命令、发布、业务变更或外部消息依当前宿主授权。方法不接管跨组件调度、持久记忆或最终验收。合同和示例检查不证明真实宿主或行业效果;无执行证据保留 needs_probe / not_evaluated。

Files

What ships with it

11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 19d ago First seen · 50 lines · 28 tokens per session scan A 16be9a5a7fb4

Subscribe to this mod's changes

metric-contract is a skill published in the GitHub repository KimYx0207/Kim_Service (198 stars, last pushed 12d ago), licensed MIT. It adds 28 tokens to every session and 881 once invoked, about $0.0001 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-11-11.

Related

metric-contract compared with skills from other repositories

metric-contract next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
metric-contractKimYx0207/Kim_ServiceSkill19812d agoMITA28Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14ktodayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code