ワンクリックで
api-integration
Automate the end-to-end process of handling a new API request, from model generation to Data Source integration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Automate the end-to-end process of handling a new API request, from model generation to Data Source integration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Pull Request (PR) Review skill for reviewing code changes following Flutter/Dart best practices, Clean Architecture, and Security standards.
Merges workspace keybindings into IDE user profile configurations (e.g., ~/antigravity-profile-2/User/keybindings.json).
Parse JSON and create freezed object classes following project conventions.
Merges workspace keybindings (.vscode/keybindings.json) into the user's global IDE configuration (VS Code, Cursor, Windsurf, Antigravity, etc.).
Enforces a checklist to verify that all required secure configuration files (google-services.json, GoogleService-Info.plist, environment-configs.json) are present for all environments (dev, stg, prd).
Copies secure configuration files (google-services.json, GoogleService-Info.plist) from the secureFiles directory to Android and iOS project paths.
| name | api_integration |
| description | Automate the end-to-end process of handling a new API request, from model generation to Data Source integration. |
| conversation_mode | Fast |
IF user provides:
THEN follow this skill (api_integration):
implementation_plan.md creation.This skill automates the process of implementing a new API request, ensuring all layers (models, clients, data sources, and DI) are correctly updated according to project standards.
[!IMPORTANT] Execute Immediately: When this skill is requested, skip the
PLANNINGphase andimplementation_plan.mdcreation. Proceed directly toEXECUTION. This skill requires zero verifications or confirmations before starting work.
[!IMPORTANT] Import Convention: Always use full package paths (e.g.,
import 'package:bloc_digital_wallet/core/network/app_uri.dart';) instead of relative imports (e.g.,import '../../core/network/app_uri.dart';).
[!IMPORTANT] DataSource Formatting: Prefer single-line arrow syntax with wrapped return type:
Future<Either<Failure, BaseResponseObject<List<TokenAccountObject>>>> getTokenAccounts({required String address}) => safeApiCall(() => _client.getTokenAccounts(address));
Use the json_to_freezed_model skill guidelines:
lib/features/{module}/data/models/.abstract class and include @JsonKey for every field.lib/core/network/app_uri.dart.token_client.dart.{module}_client.dart (e.g., wallet_client.dart).lib/features/{module}/data/datasources/.@RestApi() and @GET/@POST/etc. annotations.BaseResponseObject<T>.lib/di/network_module.dart using the @singleton or @LazySingleton annotation.baseUrl explicitly when instantiating the client: Client(dio, baseUrl: AppUri.service.buildAppUri()!). Avoid passing only dio.[!CRITICAL] BaseUrl & Endpoint Path Analysis
Before implementing any new Retrofit client, ALWAYS analyze existing clients to understand the baseUrl pattern:
Step 1: Analyze the CURL/API endpoint
- Example:
GET https://api.example.com/api/v1/d3votion?word=test- Full path:
/api/v1/d3votionStep 2: Determine baseUrl in network_module.dart
- The
baseUrlshould include the complete service path- Example:
baseUrl: AppUri.d3Votion.buildAppUri()!→https://api.example.com/api/v1/d3votionStep 3: Determine endpoint path in client
- If baseUrl already includes the full service path, endpoint should be empty string
''or just the sub-path- DO NOT duplicate the service path in the endpoint
Examples:
// ✅ CORRECT - No path duplication // network_module.dart D3VotionClient(dio, baseUrl: AppUri.d3Votion.buildAppUri()!) // → baseUrl = "https://api.com/api/v1/d3votion" // d3_votion_client.dart @GET('') // Empty string, hits baseUrl directly Future<D3VotionResObject> getD3Votion(@Query("word") String word); // → Final URL: https://api.com/api/v1/d3votion?word=test ✅ // ✅ CORRECT - Sub-path added // network_module.dart TokenClient(dio, baseUrl: AppUri.tokens.buildAppUri()!) // → baseUrl = "https://api.com/api/v1/tokens" // token_client.dart @GET(AppUri.accounts + UriPathParameters.address) // Adds "/accounts/{address}" Future<BaseResponseObject<List<TokenAccountObject>>> getTokenAccounts(@Path("address") String address); // → Final URL: https://api.com/api/v1/tokens/accounts/{address} ✅ // ❌ WRONG - Path duplication // network_module.dart D3VotionClient(dio, baseUrl: AppUri.d3Votion.buildAppUri()!) // → baseUrl = "https://api.com/api/v1/d3votion" // d3_votion_client.dart @GET('/${AppUri.d3Votion}') // Adds "/d3votion" again! Future<D3VotionResObject> getD3Votion(@Query("word") String word); // → Final URL: https://api.com/api/v1/d3votion/d3votion ❌ WRONG!Decision Tree:
- Does the CURL hit the service root directly (e.g.,
/api/v1/service)?
- YES → Use empty string
''as endpoint- NO → Use the sub-path (e.g.,
/accounts/{id})- Does the baseUrl already include the service name?
- YES → Do NOT add it again in the endpoint
- NO → Add it to the endpoint
Always verify by comparing:
- CURL URL:
https://api.com/api/v1/d3votion?word=test- baseUrl:
https://api.com/api/v1/d3votion- Endpoint:
''- Final URL:
https://api.com/api/v1/d3votion?word=test✅ Match!
Future<Either<Failure, BaseResponseObject<T>>>.with SafeCallApiMixin.safeApiCall(() => client.method()).melos genAlls.fvm flutter analyze --no-fatal-infos and ensure zero issues.ai_integration_{retrofit_client_name}.md artifact in the .docs/ folder showing the changes and verification proof.