flutter-api-gen

Generate GetX-style Repository code and Mock JSON from API contracts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the tedious manual process of implementing data access layers by turning API contracts into ready-to-use Repository classes and Mock data, ensuring consistency with the contract and reducing boilerplate.

Core Features & Use Cases

  • Contract-driven Repository generation (GetX style) and binding
  • Mock JSON generation for all defined endpoints
  • Supports inputs from MD contract docs, JSON samples, curl commands or URLs and outputs into lib/features/{module}/data/repositories and mock folders

Quick Start

Ask Claude Code to generate the repository and mock data from your API contract and review the dry-run output.

Frequently Asked Questions about flutter-api-gen

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

FAQPage Schema
How do I generate a Flutter Repository and Mock data from an API contract?

You can generate a GetX-style Repository and Mock JSON by feeding an MD contract doc, JSON sample, curl command, or URL into the generation process to output repository classes, bindings, and mock assets automatically.

What is the best way to automate boilerplate code generation for a Flutter GetX data layer?

Automating Flutter GetX boilerplate is best handled by contract-driven generation, which reads API definitions and outputs ready-to-use repository classes and mock JSON files directly into configured directory structures.

Can I use curl commands to generate Flutter Repository code?

Yes, curl commands are supported as input to generate Flutter Repository code. The process parses curl commands to produce GetX-style repositories, bindings, and mock JSON assets.

Does the generated Flutter Repository code conform to specific API client path conventions?

Yes, the generated Flutter Repository code ensures ApiClient signature conformance and proper path handling, specifically omitting the /api prefix to maintain consistency with backend contracts.

Where do the generated Repository and Mock files get saved in a Flutter project?

Generated Repository and Mock files are output into configured directories within your Flutter project, specifically targeting lib/features/{module}/data/repositories and corresponding mock folders.

What formats are supported for defining API contracts to generate Mock JSON?

Supported input formats for defining API contracts to generate Mock JSON include Markdown contract documents, JSON samples, curl commands, and direct URLs.