validate-data-contracts

Validates consistency between Supabase schemas, GraphQL mappings, and TypeScript domain contracts before merge.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/marketiv-id/marketiv-web --skill validate-data-contracts-marketiv-id
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-data-contracts
Source: https://github.com/marketiv-id/marketiv-web/tree/main/.github/skills/validate-data-contracts
Command: npx skills add https://github.com/marketiv-id/marketiv-web --skill validate-data-contracts-marketiv-id

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Runtime mismatches between database schemas, GraphQL responses, and TypeScript types cause undefined or null field bugs in the UI that are often discovered only after merge. This Skill catches those contract drifts early by systematically validating the entire data flow from source to presentation layer. ## Core Features & Use Cases - Schema-to-Type Alignment: Checks that queries only select fields existing in the latest Supabase Database types and flags schema drift with a resync recommendation. - GraphQL Mapping Validation: Verifies mappers handle optional and null fields safely and produce output matching the domain types consumed by components. - Server Boundary & Cache Contract Review: Confirms data fetching stays on the server boundary with explicit cache strategies (revalidate/no-store) and request deduplication. - Error Contract Audit: Ensures early-return patterns, stable fallback data shapes, and no sensitive error leakage to the UI. - Use Case: Before merging a PR that changes a Supabase query, run this Skill to receive a pass/warning/fail report listing every contract mismatch per file with prioritized patch recommendations. ## Quick Start Validate the data contracts for the files changed in my current pull request and report any schema, mapping, or error handling mismatches.

Frequently Asked Questions about validate-data-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Supabase types against my queries before merging?

Compare the fields selected in each query against the latest Database type definitions in src/types/supabase.ts. Any selected field missing from the schema or with an incompatible type is flagged as a failure, and a type resync is recommended when drift is detected.

How to check GraphQL response mapping for null safety in TypeScript?

Review each mapper to confirm it handles optional and null fields safely and that the mapped output matches the domain type consumed by components. Missing null handling on critical fields is reported as a warning or failure depending on impact.

When should I run data contract validation?

Run it before merging any PR that changes schemas, queries, or data mapping, after synchronizing Supabase types, and whenever UI bugs appear from undefined or null field mismatches.

Why do undefined field errors appear in my UI after a schema change?

These errors occur when queries select fields removed from the schema or when mappers skip null handling for newly optional fields. Validating schema-to-type alignment and mapper null safety identifies the exact file and field causing the mismatch.

What cache strategy issues does data contract validation catch?

It flags missing explicit cache strategies such as revalidate or no-store for important data, data fetching performed outside the server boundary, and repeated loader calls on the same route without request deduplication.