project-api

Generate type-safe Flutter API clients from OpenAPI 3.0 specifications.

2|Updated Jul 3, 2025
One-click install
npx skills add https://github.com/gsmlg-app/flutter-app-template --skill project-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-api
Source: https://github.com/gsmlg-app/flutter-app-template/tree/main/.claude/skills/project-api
Command: npx skills add https://github.com/gsmlg-app/flutter-app-template --skill project-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating type-safe API client packages in Flutter by automating code generation from OpenAPI specifications, reducing manual boilerplate and potential errors.

Core Features & Use Cases

  • Automated Client Generation: Generates Dart code for API clients using OpenAPI specs, Dio, and Retrofit.
  • Type-Safe HTTP Requests: Ensures type safety for API requests and responses.
  • Use Case: When integrating with a new RESTful API, use this Skill to quickly scaffold a robust and maintainable API client package, complete with models and request methods.

Quick Start

Use the project-api skill to create a new API client package named 'github_api' in the 'app_api' directory.

Frequently Asked Questions about project-api

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

FAQPage Schema
How do I generate a Flutter API client from an OpenAPI spec?

To generate a Flutter API client from an OpenAPI spec, this Skill uses the swagger_parser tool and Mason bricks to automate Dart code creation. It produces type-safe Dio and Retrofit clients, DTOs, and barrel export files from your OpenAPI 3.0 definitions.

Does the generated API client support file uploads and nested objects?

Yes, the generated API client supports file uploads and nested objects. The code generation handles various OpenAPI patterns including path parameters, query parameters, request bodies, headers, enums, nullable fields, arrays, and nested objects.

Can I use this to generate type-safe HTTP requests with Dio and Retrofit?

Yes, you can use this to generate type-safe HTTP requests with Dio and Retrofit. It automates the creation of robust API client packages, ensuring type safety for all API requests and responses within your Flutter applications.

What is the best way to scaffold a Dart API client package from a Swagger definition?

The best way to scaffold a Dart API client package from a Swagger definition is using automated code generation. This Skill streamlines the process by reducing manual boilerplate and potential errors, quickly creating a maintainable client with models and request methods.

How do I set up a new API client package named 'github_api' in the 'app_api' directory?

To set up a new API client package named 'github_api' in the 'app_api' directory, apply the project-api skill. It configures the code generation process and applies best practices for API integration from your OpenAPI 3.0 specifications.