/d3nexus:api_integrationfrom d3nexus
Automate the end-to-end process of handling a new API request, from model generation to Data Source integration.
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job