跳到正文
Skillpedia
测试48k · #4287

cross-platform-contract-propagation-audit

它能做什么

这个工具用于检查某项契约变更(比如数据库字段或一项功能)是否在所有使用它的地方都保持一致,包括服务、应用和测试等环节。它能确保所有系统对这项变更的理解和使用方式相同。

适用场景

  • ✓添加或修改会影响多个系统的字段时。
  • ✓系统的不同部分可能对同一个值有不同理解时。
  • ✓需要确保变更不会影响旧系统或已有数据时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cross-platform-contract-propagation-audit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cross-platform-contract-propagation-audit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我检查新的 “dark mode” 功能是否正确同步到了移动端应用、网页端以及使用数据收集环节。”

每周 5 个新技能,1 分钟读完。

工作原理

首先,你需要清楚地定义这项变更的含义,以及它在不同情况下应该如何表现。然后,列出所有会用到这项变更的地方。最后,逐一验证变更是否在每个地方都正确生效,并记录下验证依据。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Cross-Platform Contract Propagation Audit

Overview

Audit a contract change from its source through every transformation and consumer before release. Treat a field that exists in one schema as incomplete until its meaning, defaults, wire behavior, rollout controls, client handling, analytics, and tests are proven across all relevant paths.

This is a read-only evidence workflow. It reports propagation gaps; it does not implement them.

When to Use This Skill

  • Use when adding or changing a field, enum value, status, capability, or feature flag shared by multiple components.
  • Use when database, backend, API, Web, Android, iOS, jobs, events, or analytics may interpret the same value differently.
  • Use when a change must preserve existing records, older clients, or a default-off rollout.
  • Use when a change looks complete in one endpoint but may be missing from alternate entry points or generated models.

How It Works

Step 1: Write the semantic contract

Before tracing files, state the business invariant and define every observable state. Distinguish values that languages and serializers often collapse:

State Questions to answer
missing Is the property absent on the wire or in an old record?
null Is it unknown, inherited, unsupported, or invalid?
false or zero Is this an explicit disabled value or a default?
true or non-zero What behavior becomes available?
unknown enum Must old consumers ignore, preserve, or reject it?

Record compatibility requirements, ownership, rollout condition, and the exact user-visible or system behavior for each state. Do not accept optional, nullable, and default false as equivalent without evidence.

Step 2: Enumerate the propagation graph

List every relevant node before judging completeness:

source of truth
  -> persistence and migration
  -> domain model and mapper
  -> service or policy computation
  -> every API, event, cache, and job projection
  -> generated or handwritten client model
  -> client state and presentation logic
  -> analytics and operational observability
  -> tests, rollout, and rollback checks

Include alternate read/write endpoints, list/detail projections, background consumers, offline caches, admin surfaces, older app versions, and feature-flag evaluation points when they are in scope. Mark a node not applicable only with a reason.

Step 3: Trace evidence edge by edge

For each edge, cite the producer, transformation, consumer, and test using file paths, symbols, schema names, or other inspectable evidence. Assign one status:

Status Meaning
proven Producer and consumer agree, with direct evidence and relevant test coverage.
partial Some paths or states agree, but coverage is incomplete.
missing A required propagation edge or consumer is absent.
conflict Two layers implement different semantics.
unknown Evidence is unavailable or ambiguous.
not_applicable The layer is outside scope, with a stated reason.

Do not upgrade likely, convention, type compatibility, or a framework default to proven. A declaration proves shape, not runtime mapping or behavior.

Step 4: Check the high-risk boundaries

Inspect these boundaries explicitly:

  • Migration and existing data: default, backfill, nullability, rollback, mixed-version reads and writes.
  • Domain mapping: missing/null coercion, enum fallbacks, validation, derived values, serialization symmetry.
  • Fan-out surfaces: list and detail DTOs, events, caches, jobs, search indexes, SDKs, and alternate API versions.
  • Client compatibility: missing and explicit-null decoding, unknown enums, generated-model drift, cached payloads, release or minified builds.
  • Rollout control: flag default, evaluation location, cohort consistency, kill switch, and behavior when stored data disagrees with the flag.
  • Analytics: offered, rendered, attempted, succeeded, and failed events carry enough contract and version context to join reliably.

Step 5: Build a state-by-path test matrix

Cross the semantic states from Step 1 with every material path from Step 2. At minimum, include existing-data defaults, enabled and disabled values, flag on and off, alternate endpoints, current clients, and representative older clients.

…

常见问题

这里的“契约”是什么意思?

契约是对某项信息(比如数据或功能)应该如何运作、如何被解读的约定,可以理解为所有系统都必须遵守的规则。

为什么要检查“同步传播”?

同步传播指的是确保变更在所有系统和使用它的地方都被统一应用。如果没有正确同步,就可能导致错误、数据不一致或出现意料之外的行为。

这个工具会自动修复问题吗?

不会。它是用于审计和验证的工具,能找出不一致的地方,但不会直接修复,而是为开发者提供所需信息,方便他们自行修正。

详情

作者的原始描述

Use when auditing whether a field, enum, flag, or API contract propagates consistently across storage, services, clients, analytics, and tests.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4287
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能