zod-schema-sync

Synchronize ResearchConfig fields across TypeScript interfaces, Zod schemas, and merge logic.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Norfolk-Group/H-Analytics --skill zod-schema-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zod-schema-sync
Source: https://github.com/Norfolk-Group/H-Analytics/tree/main/.claude/archive/agents-skills-snapshot/zod-schema-sync
Command: npx skills add https://github.com/Norfolk-Group/H-Analytics --skill zod-schema-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams keep the ResearchConfig persisted JSON fields in sync across the TypeScript interface, the server Zod strict schema, and the merge handler. Without this, adding a new field to TypeScript types but not to Zod or merge logic leads to 400 on save.

Core Features & Use Cases

  • Co-locates changes across interface, schema, and merge logic for ResearchConfig to prevent runtime errors.
  • Provides a three-part checklist to ensure all references are updated together.
  • Useful when evolving persisted JSON configurations for research tooling.

Quick Start

Whenever you add or remove a field in ResearchConfig, update the TypeScript interface, the server Zod schema, and the merge handler, then run the compatibility checklist.

Frequently Asked Questions about zod-schema-sync

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

FAQPage Schema
Why does adding a field to a TypeScript interface cause a 400 error on save?

A 400 error on save happens when new fields added to TypeScript interfaces are missing from the server Zod schema or merge handler, causing strict validation to reject the unrecognized persisted JSON configuration data.

How do I keep Zod schemas in sync with TypeScript interfaces for persisted configurations?

Keep Zod schemas in sync by co-locating updates across the TypeScript interface, server Zod strict schema, and merge handler, then running a compatibility checklist to verify all references match the persisted JSON configuration.

What is field-level synchronization for ResearchConfig schemas?

Field-level synchronization for ResearchConfig schemas is the process of enforcing matching field definitions across TypeScript interfaces, server Zod schemas, and merge handlers to prevent runtime validation errors when evolving persisted JSON configurations in research tooling.

When do I need to update nested ContextLlmConfig during schema synchronization?

You need to update nested ContextLlmConfig during schema synchronization when the parent ResearchConfig changes involve nested LLM configuration objects, ensuring corresponding field updates are applied across the TypeScript interface, Zod schema, and merge handler.

Can I use this schema sync approach for backend validation beyond research tooling?

This schema sync approach is designed for evolving persisted JSON configurations in research tooling, specifically enforcing ResearchConfig field synchronization across TypeScript, Zod, and merge logic to prevent server-side 400 validation errors.

What files need to be updated when evolving persisted JSON configurations?

When evolving persisted JSON configurations, update the shared TypeScript interface file (research-types.ts), the server routes Zod schema (research.ts), and the merge handler to ensure field-level synchronization and prevent runtime validation failures.