json_to_freezed_model

Generate Freezed data models from JSON structures for Flutter apps.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/DanhDue/bloc_digital_wallet --skill json-to-freezed-model
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: json_to_freezed_model
Source: https://github.com/DanhDue/bloc_digital_wallet/tree/main/.agent/skills/json_to_freezed_model
Command: npx skills add https://github.com/DanhDue/bloc_digital_wallet --skill json-to-freezed-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Parse JSON and generate freezed object classes following project conventions, ensuring proper annotations and clean architecture alignment for Flutter apps.

Core Features & Use Cases

  • Create separate Dart files for root and nested objects following the Object suffix convention (e.g., UserObject).
  • Enforce @JsonKey mappings for snake_case fields and includeNull handling in generated code to preserve nullability semantics.
  • Provide template-ready Freezed models that integrate with foundation.dart and freezed_annotation, streamlining boilerplate generation.

Quick Start

Run melos genAlls and then flutter analyze to verify code generation and type-safety.

Frequently Asked Questions about json_to_freezed_model

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

FAQPage Schema
How do I generate Freezed models from JSON for a Flutter app?▼

To generate Freezed models from JSON, provide the JSON structure to create Dart files with abstract class declarations, separate {ModelName}Object classes for nested objects, and proper freezed_annotation imports.

Does the generated Freezed code handle snake_case fields and null values?▼

Yes, the generated Freezed code applies @JsonKey mappings for snake_case fields and enforces includeIfNull handling to preserve nullability semantics across root and nested objects.

What is the best way to structure nested objects when parsing JSON into Freezed models?▼

The best way to structure nested objects is creating separate Dart files for each root and nested object following the Object suffix convention, ensuring clean architecture alignment and per-object file generation.

Can I integrate generated Freezed models with foundation.dart in my Flutter project?▼

Yes, generated Freezed models integrate directly with foundation.dart and freezed_annotation, providing template-ready data classes that streamline boilerplate generation for Flutter apps.

Why does my generated Freezed model require a private constructor pattern?▼

Generated Freezed models enforce the private constructor pattern to satisfy Freezed model conventions, ensuring immutability and proper data class behavior in Dart and Flutter applications.

What should I run after generating Freezed models to verify code correctness?▼

After generating Freezed models, run melos genAlls to execute code generation and then flutter analyze to verify type-safety and ensure the generated Dart files are error-free.