flutter-model-gen

Generate Dart models from JSON or contracts using freezed and json_serializable templates.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/dus2183-commits/flutter-skills --skill flutter-model-gen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-model-gen
Source: https://github.com/dus2183-commits/flutter-skills/tree/main/flutter-model-gen
Command: npx skills add https://github.com/dus2183-commits/flutter-skills --skill flutter-model-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill converts JSON samples or interface contracts into strongly-typed Dart models using freezed and json_serializable templates, accelerating data layer generation and reducing manual coding errors.

Core Features & Use Cases

  • Automated model generation from JSON samples, contract documentation (docs/api), or swagger-like inputs.
  • Nested entity extraction with automatic splitting into separate model files and proper imports.
  • Enum and timestamp support including JsonValue-based enums and ISO/timestamp conversions, plus snake_case key renaming.

Quick Start

Provide a JSON sample or contract document and ask Claude to generate the corresponding freezed Dart models.

Frequently Asked Questions about flutter-model-gen

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

FAQPage Schema
How do I generate freezed Dart models from JSON automatically?▼

The Skill generates freezed Dart models from JSON samples, contract documentation, or swagger-like inputs. It handles nested entity extraction by automatically splitting them into separate model files with proper imports and enum support.

How do I convert a Swagger API contract to Dart models?▼

The Skill processes plain contracts and docs to generate Dart models. It extracts nested entities, splits them into separate files with proper imports, and supports JsonValue-based enums alongside ISO timestamp conversions and snake_case key renaming.

Does this approach handle nested objects and enums in Dart model generation?▼

Yes, this approach handles nested objects and enums by extracting nested entities into separate model files with proper imports. It supports JsonValue-based enums, ISO timestamp conversions, and snake_case key renaming for comprehensive data layer mapping.

What is the best way to automate data layer generation for Flutter?▼

The best way to automate data layer generation for Flutter is converting JSON samples or interface contracts into freezed and json_serializable models. This accelerates data layer generation and reduces manual coding errors by handling nested entities and enums.

Can I generate separate files for nested Dart models from a single JSON sample?▼

Yes, you can generate separate files for nested Dart models from a single JSON sample. The Skill performs nested entity extraction, splitting nested objects into separate files with proper imports to maintain a clean project structure.