schemas

Define and enforce form validations using Yup schemas in React and TypeScript.

1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/jorggerojas/next-skeleton-page --skill schemas-jorggerojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schemas
Source: https://github.com/jorggerojas/next-skeleton-page/tree/main/.cursor/skills/schemas
Command: npx skills add https://github.com/jorggerojas/next-skeleton-page --skill schemas-jorggerojas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Yup schemas centralize form validation and type inference for React+TS apps, reducing runtime errors and ensuring consistent data shapes across the codebase.

Core Features & Use Cases

  • Centralized schema definitions in src/schemas for domain-driven validation
  • Yup + TypeScript inference using yup.InferType to derive types
  • Schema composition with concat, pick, and omit for reusability
  • Easy integration with react-hook-form via @hookform/resolvers/yup

Quick Start

Create and use Yup-based schemas in src/schemas to validate and infer types for forms.

Frequently Asked Questions about schemas

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

FAQPage Schema
How do I define Yup schemas for form validation in React and TypeScript?

You define Yup schemas in a central directory to enforce form validation and use yup.InferType to automatically derive TypeScript types, ensuring consistent data shapes across your React application.

Can I use Yup schemas with react-hook-form in TypeScript?

Yes, you can integrate Yup schemas with react-hook-form using the @hookform/resolvers/yup adapter to bridge validation logic and ensure typed form data during submission.

What is the best way to reuse form validation schemas across different domains?

You can reuse form validation schemas by applying composition helpers like concat, pick, and omit to build new schemas from existing ones, maintaining consistent validation rules across domains.

How does Yup schema type inference work for React forms?

Yup schema type inference uses yup.InferType to automatically generate TypeScript interfaces from your validation rules, eliminating manual type definitions and reducing runtime errors in React forms.

Do I need separate TypeScript types if I already have Yup validation schemas?

No, you do not need separate TypeScript types because Yup schemas can automatically infer types using yup.InferType, centralizing both validation rules and type definitions in a single source.

Why should I centralize schema definitions in a React and TypeScript project?

Centralizing schema definitions reduces runtime errors and enforces consistent data shapes across your codebase, providing a single source of truth for validation logic and inferred types.