contract-enforcement

Enforce @template/contracts imports and shared Zod schemas across code reviews.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/dtaborda/startup-saas-template --skill contract-enforcement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-enforcement
Source: https://github.com/dtaborda/startup-saas-template/tree/main/skills/contract-enforcement
Command: npx skills add https://github.com/dtaborda/startup-saas-template --skill contract-enforcement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures every cross-package data flow relies on the centralized @template/contracts definitions so inline DTOs and inconsistent schemas are caught early.

Core Features & Use Cases

  • Strict imports: Every API-handling module must import DTOs, schemas, and response types from @template/contracts instead of defining them locally.
  • Validation focus: Server Actions must wrap responses in ActionResult and validate inputs with shared Zod schemas, preventing bypassed checks.
  • Use Case: While reviewing a pull request that adds a new server action and UI component, flag inline interfaces or z.object definitions and require shared contract usage.

Quick Start

Review the latest pull request for inline DTOs or z.object definitions and insist on @template/contracts imports before approving.

Frequently Asked Questions about contract-enforcement

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

FAQPage Schema
How do I prevent schema drift between server actions and UI components in TypeScript?

Prevent schema drift by enforcing mandatory imports of Zod schemas and shared DTOs from a centralized @template/contracts package instead of defining inline interfaces or z.object definitions locally.

What is the best way to enforce shared contracts during a pull request review?

Enforce shared contracts by reviewing cross-package data flows to flag inline DTOs and require imported Zod schemas and ActionResult wrappers before accepting any code changes.

Do I need to wrap server action responses in ActionResult for contract compliance?

Yes, server action responses must be wrapped in ActionResult and inputs must be validated with shared Zod schemas to prevent bypassed checks and ensure contract compliance.

How does centralized schema validation handle data boundaries across root, ui, and packages directories?

Centralized schema validation handles data boundaries by applying compliance reviews across root, ui, and packages directories, requiring shared DTOs without local type duplicates before approving updates.

Why does inline DTO usage break contract enforcement in API-consuming components?

Inline DTO usage breaks contract enforcement because it bypasses the centralized @template/contracts definitions, causing inconsistent schemas and failing the required shared data boundary checks.