Chuyển đến nội dung
Skillpedia
Kiểm thử48k · #4287

cross-platform-contract-propagation-audit

Skill này làm gì

Công cụ này giúp kiểm tra xem một thay đổi trong “hợp đồng” (như một trường dữ liệu hoặc một tính năng) có được áp dụng nhất quán ở mọi nơi sử dụng nó hay không, chẳng hạn trong dịch vụ, ứng dụng và bài kiểm thử. Nó đảm bảo mọi bên hiểu và dùng thay đổi đó theo cùng một cách.

Khi nào nên dùng

  • ✓Khi thêm hoặc thay đổi một trường dữ liệu ảnh hưởng đến nhiều hệ thống.
  • ✓Khi các phần khác nhau của hệ thống có thể hiểu một giá trị theo cách khác nhau.
  • ✓Khi cần đảm bảo thay đổi không làm hỏng hệ thống cũ hoặc dữ liệu hiện có.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cross-platform-contract-propagation-audit/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy kiểm tra xem tính năng “dark mode” mới có được áp dụng đúng cho ứng dụng di động, web và hệ thống thu thập dữ liệu sử dụng hay không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Trước tiên, bạn xác định rõ thay đổi có nghĩa gì và phải hoạt động thế nào trong các tình huống khác nhau. Sau đó, bạn liệt kê tất cả các nơi sử dụng thay đổi này, và cuối cùng kiểm tra xem thay đổi đã được áp dụng đúng ở từng nơi hay chưa, đồng thời ghi lại bằng chứng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

…

Câu hỏi thường gặp

“Hợp đồng” trong ngữ cảnh này là gì?

Hợp đồng là sự thống nhất về cách một thông tin (dữ liệu hoặc tính năng) cần hoạt động và được hiểu. Bạn có thể coi đó là bộ quy tắc mà mọi hệ thống phải tuân theo.

Vì sao việc kiểm tra “lan truyền” lại quan trọng?

Lan truyền nghĩa là thay đổi được áp dụng đồng bộ trên mọi hệ thống và nơi sử dụng nó. Nếu không lan truyền đúng, có thể gây lỗi, mâu thuẫn hoặc hành vi bất ngờ.

Công cụ này có tự sửa lỗi không?

Không, công cụ chỉ kiểm tra và đánh dấu. Nó chỉ ra những chỗ không nhất quán để lập trình viên tự sửa.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4287
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự