field-consistency-check

Compare Java backend entity fields with TypeScript frontend interfaces and generate discrepancy reports per module.

Updated Mar 30, 2025
One-click install
npx skills add https://github.com/j4xie/my-prototype-logistics --skill field-consistency-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: field-consistency-check
Source: https://github.com/j4xie/my-prototype-logistics/tree/main/.claude/skills/field-consistency-check
Command: npx skills add https://github.com/j4xie/my-prototype-logistics --skill field-consistency-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill checks field name consistency between backend entities and frontend interfaces to detect missing or mismatched fields.

Core Features & Use Cases

  • Automated Diffing: Compare all backend entity fields against frontend API DTOs and interfaces.
  • Reporting: Generate a clear diff report highlighting fields unique to backend or frontend.
  • Use Case: Before a major UI refresh, verify model consistency to avoid runtime errors.

Quick Start

Run the field consistency check: bash scripts/field-consistency-check.sh

Frequently Asked Questions about field-consistency-check

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

FAQPage Schema
How do I check if backend and frontend fields are in sync?

Field consistency checking compares backend entity definitions against frontend interface definitions to identify missing or mismatched fields. Run the provided bash script to extract fields from Java entities and TypeScript interfaces, then generate a discrepancy report showing which fields exist only on backend or frontend.

What types of field mismatches can this Skill detect?

The Skill identifies fields missing from frontend interfaces, fields missing from backend entities, and type mismatches between corresponding fields. It handles Java types (String, Long, Boolean, Integer, BigDecimal, LocalDateTime) and their TypeScript equivalents, generating a report for each module showing exact discrepancies.

Can I use this to validate data models across multiple modules?

Yes. The Skill operates across modules by extracting and comparing fields systematically, generating a separate discrepancy report for each module. This allows you to verify model consistency at scale before UI changes or deployments that could expose field mismatches at runtime.

How do I automate the field consistency check in my workflow?

Execute the bash script included with the Skill (scripts/field-consistency-check.sh) as part of your build or pre-deployment process. The script extracts fields, performs cross-language comparison, and outputs a structured diff report compatible with macOS and standard Unix environments.

What's the difference between field consistency checking and standard API validation?

Field consistency checking focuses on structural alignment between backend entity definitions and frontend interface definitions before runtime, catching schema drift early. Standard validation typically checks data values at runtime; this catches architectural mismatches that validation cannot detect.

Does this work with Java entities and TypeScript interfaces?

Yes. The Skill explicitly extracts fields from Java backend entities and TypeScript frontend interfaces, supporting explicit field type handling across both languages to enable accurate cross-language field comparison and discrepancy reporting.