flutter-mock-gen

Generate mock JSON lists and details from Flutter models and API contracts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates realistic mock data for Flutter modules based on model definitions and API contracts, speeding up testing and UI prototyping.

Core Features & Use Cases

  • Reads module data models and API contracts to automatically generate diverse mock datasets.
  • Produces mock JSON for lists and details, suitable for fixtures and UI previews.
  • Allows locale and quantity customization to cover edge cases and localization needs.

Quick Start

Create mock data for a Flutter module by running the generator in your project and specifying the target module and optional count.

Frequently Asked Questions about flutter-mock-gen

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

FAQPage Schema
How do I generate mock data for Flutter modules from existing models?

To generate mock data for Flutter modules, you need a tool that reads your data models and API contracts to automatically produce realistic JSON datasets for testing and UI prototyping. This skill processes your model definitions to output consistent list and detail JSON sets, speeding up your development workflow by creating diverse test fixtures without manual data entry.

What is the best way to create realistic test fixtures for Flutter UI previews?

Creating realistic test fixtures for Flutter UI previews involves generating mock JSON datasets based on your application's model definitions and API documentation. This approach produces consistent list and detail data sets that accurately reflect your data structure, allowing you to test UI components and localization scenarios across multiple modules with realistic information.

Can I customize the locale and quantity of generated mock data for Flutter testing?

Customizing the locale and quantity of generated mock data for Flutter testing is supported through optional count and locale controls. This allows you to generate specific volumes of mock JSON datasets tailored to your testing requirements, ensuring you can cover edge cases and localization needs across different modules within your application.

Does this mock data generation approach work with specific project directory structures?

This mock data generation approach works by reading from specific project directory structures, namely lib/features/{module}/data/models and docs/api/{module}. It uses these defined paths to understand your data models and API contracts, then writes the generated mock JSON results directly to mock/{module}/{action}.json, integrating seamlessly into your existing Flutter project layout.

How does generating mock data from API contracts speed up Flutter development?

Generating mock data from API contracts speeds up Flutter development by automating the creation of realistic test datasets based on your defined endpoints and model structures. Instead of manually crafting JSON fixtures, the system reads your API documentation and model files to produce diverse, consistent data sets, enabling rapid UI prototyping and testing without waiting for backend availability.

What limitations exist when generating mock JSON for multiple Flutter modules?

Limitations when generating mock JSON for multiple Flutter modules include the strict dependency on predefined directory structures and file formats. The generation process requires your models to be located in lib/features/{module}/data/models and API contracts in docs/api/{module}.md, meaning any deviation from these specified paths will prevent the tool from reading your definitions and producing the expected output files.