data-model-reviewer

Analyze TypeScript data models for duplication and type safety issues.

2|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/devstefancho/claude-code-book-sample --skill data-model-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model-reviewer
Source: https://github.com/devstefancho/claude-code-book-sample/tree/main/.claude/skills/data-model-reviewer
Command: npx skills add https://github.com/devstefancho/claude-code-book-sample --skill data-model-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes TypeScript data models to reduce duplication, improve type safety, and clarify relationships between interfaces and types.

Core Features & Use Cases

  • SSOT enforcement: Detects duplicate type definitions and promotes single sources of truth.
  • Type safety enhancement: Flags usage of any, promotes union/enum usage, and verifies optional properties.
  • Relationship validation: Ensures clear, correct references and consistent ID patterns.

Quick Start

Scan the codebase for type-safety issues and generate a refactor plan with concrete type improvements.

Frequently Asked Questions about data-model-reviewer

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

FAQPage Schema
How do I eliminate duplicate TypeScript type definitions in my codebase?

TypeScript data model analysis scans your type files to detect duplicate interface and type definitions, identifies single sources of truth violations, and flags redundant declarations across your project. Run the Skill on targeted type directories or your entire repository to get a refactor plan with concrete consolidation steps.

What's the best way to enforce type safety in TypeScript interfaces?

Enforce type safety by scanning interfaces for unsafe patterns like `any`, promoting literal unions and enums over magic strings, and validating optional properties. The Skill evaluates your models against type-safety rules and outputs a checklist-based review with specific improvements for each interface.

How do I validate ID consistency and nesting depth across TypeScript types?

Validate ID patterns and nesting depth by analyzing type relationships across your project. The Skill ensures ID types remain consistent throughout related interfaces and detects excessive nesting that complicates your data model, then reports violations with refactor recommendations.

Can I scan specific type files or should I analyze my entire repository?

You can target specific type files using glob patterns like `**/types/**/*.ts` and `**/*.d.ts` or analyze your entire repository. The Skill accepts both scoped and project-wide analysis, letting you focus on particular domains or run a comprehensive type audit across all declarations.

What output does a TypeScript data model review produce?

The review produces results in an examples.md format checklist that lists duplication issues, type-safety violations, ID inconsistencies, and nesting problems with concrete refactor suggestions. Each finding includes the affected types and the specific improvement needed.

Do I need prior setup or specific tools before running a type model review?

No external dependencies are required. The Skill uses file reading and grep-based search to analyze your TypeScript types directly. Point it at your type file locations and it scans immediately to generate the safety and duplication review.

Related Skills