schema-reviewer

Enforce Zod schema best practices and backward compatibility in code reviews.

1|Updated Apr 17, 2025
One-click install
npx skills add https://github.com/carrot-foundation/schemas --skill schema-reviewer-carrot-foundation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: schema-reviewer
Source: https://github.com/carrot-foundation/schemas/tree/main/.agents/skills/schema-reviewer
Command: npx skills add https://github.com/carrot-foundation/schemas --skill schema-reviewer-carrot-foundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams ensure Zod schema definitions in the project are consistent, well-documented, and backward-compatible by systematically reviewing patterns, metadata, and composition.

Core Features & Use Cases

  • Enforces strictObject usage, ensures every object schema includes .meta() with title and description, and maintains snake_case for field names.
  • Validates the composition hierarchy (Base → NFT → type-specific) and checks for proper reuse of shared primitives and entities.
  • Use Case: Before merging PRs that modify src/**/*.schema.ts, run this review to catch backward-compatibility risks and naming inconsistencies.

Quick Start

Run a schema-review pass on changed files in src/, focusing on Zod patterns and metadata.

Frequently Asked Questions about schema-reviewer

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

FAQPage Schema
How do I enforce strictObject usage and .meta() presence in Zod schemas?▼

You can enforce strictObject usage and .meta() presence by running a schema review pass that checks every object schema includes required title and description metadata.

How do I check Zod schemas for backward compatibility in a PR?▼

To check Zod schemas for backward compatibility in a PR, run a schema review pass targeting changed files to catch naming inconsistencies and composition hierarchy risks before merging.

What's the best way to validate snake_case field names across Zod schema files?▼

The best way to validate snake_case field names across Zod schema files is to run an automated schema review that systematically checks naming conventions within src/**/*.schema.ts modules.

How does a schema review validate the Zod composition hierarchy?▼

A schema review validates the Zod composition hierarchy by checking the Base to NFT to type-specific structure and verifying proper reuse of shared primitives and entities.

Can I use this schema review for CI checks on modified schema types?▼

Yes, you can use this schema review for CI checks on modified schema types, primitives, or shared entities to systematically enforce consistency and catch backward-compatibility risks.

When do I need to run a Zod schema review?▼

You need to run a Zod schema review before merging PRs that modify src/**/*.schema.ts files to ensure strictObject usage, metadata presence, and backward compatibility are maintained.