Data Contract

👤 mohitagw15856 📦 v1.0.0 ⭐ 4.2 ⬇️ 148 下載
💻 開發程式設計 免費

📖 技能介紹


name: data-contract description: "Define a data contract between a producer and consumers of a dataset/event/API. Use when asked to write a data contract, define a schema agreement, set data SLAs, or stop a producer from silently breaking downstream consumers. Produces a contract — schema with types & constraints, semantics, quality SLAs (freshness/completeness/validity), ownership, versioning & breaking-change policy, and a change process." homepage: https://mohitagw15856.github.io/pm-claude-skills/skill/data-contract.html metadata: { "openclaw": { "emoji": "🛠" } }


Data Contract Skill

Most data outages are a producer changing a column without telling anyone downstream. A data contract fixes that: it's an explicit, versioned agreement on the schema, semantics, and quality guarantees of a dataset/event/stream, with an owner and a breaking-change policy. This skill writes one, so producers and consumers share a single source of truth and changes can't silently break pipelines.

Required Inputs

Ask for these only if they aren't already provided:

  • The data asset — the table, event, topic, or API, and what it represents.
  • Producer & consumers — who owns it, who depends on it.
  • Schema — fields, types, and which are required; the semantics of the tricky ones.
  • Quality expectations — freshness (how current), completeness, valid ranges, uniqueness.

Output Format

Data Contract: [asset] v[x.y]

Producer (owner): [team] · Consumers: [teams/systems] · Status: active

1. Schema — every field: name · type · required? · description/semantics · constraints (enum, range, format).

field type required constraint meaning

2. Semantics — the non-obvious meanings: timezone of timestamps, currency/units, what null means, how late-arriving data is handled, the grain/uniqueness.

3. Quality SLAs — the guarantees, measurable: freshness (e.g. updated by 06:00 UTC daily), completeness (no missing required fields), validity (values in range), uniqueness (PK unique). These are what consumers can rely on.

4. Ownership & support — who owns it, where to raise issues, on-call/response expectations.

5. Versioning & breaking changes — semver for the schema; what counts as breaking (removing/renaming a field, tightening a type, changing semantics) vs. non-breaking (adding optional fields); deprecation window before a breaking change ships.

6. Change process — how a change is proposed, who must sign off (affected consumers), and the notice period.

Quality Checks

  • [ ] Every field has a type, required-flag, and clear semantics (esp. timezone/units/null meaning)
  • [ ] Quality SLAs are measurable (a number/time), not "should be fresh"
  • [ ] Breaking vs. non-breaking changes are explicitly defined
  • [ ] There's a deprecation window and a sign-off process for breaking changes
  • [ ] An owner and an issue/escalation path are named

Anti-Patterns

  • [ ] Do not leave semantics implicit — undocumented timezone/units/null handling is the #1 silent data bug
  • [ ] Do not write vague SLAs — "fresh and accurate" is unenforceable; give times and thresholds
  • [ ] Do not allow breaking changes without notice — a deprecation window + consumer sign-off is the whole point

    小蔥技能7w4.net有完整的技能分類。

  • [ ] Do not skip ownership — an unowned dataset has no one to hold to the contract
  • [ ] Do not version informally — schema changes need semver so consumers know what broke

Based On

Data-contract practice — schema + semantics + measurable quality SLAs, semantic versioning, and producer/consumer change governance.

🤖 AI 評測

這個 Skill 的文件質量不錯,結構清晰、語言易懂,提供的模板和檢查清單都很實用,反模式警告能幫助避免常見錯誤。但它本質上只是一個寫作指南,需要使用者自己具備資料契約的相關知識才能用好,沒有自動生成或互動引導功能。適合有一定經驗的人參考使用,但新手可能需要先學習相關概念才能上手。

📊 多維度評分

適應性3.8
規範性4.3
有效性4.5
可靠性3.9
可信度4.4

📁 包含檔案 (3 個)

📄 SKILL.md 3.6 KB
📄 _meta.json 132 B
📄 skill-card.md 1.9 KB