common-accessibility
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Build type-safe HTTP networking with Dio and Retrofit including auth interceptors in Flutter. Use when integrating REST APIs with Dio or Retrofit.
Claude Code
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking --agent claude-code
Codex
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a codex -y
Cursor
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a cursor -y
Gemini CLI
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a github-copilot -y
OpenCode
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a opencode -y
Windsurf
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-retrofit-networking -a windsurf -y
name: flutter-retrofit-networking
description: Build type-safe HTTP networking with Dio and Retrofit including auth interceptors in Flutter. Use when integrating REST APIs with Dio or Retrofit.
metadata:
triggers:
files:
- '**/data_sources/**'
- '**/api/**'
keywords:
- Retrofit
- Dio
- RestClient
- GET
- POST
- Interceptor
- refreshinginfrastructure/
├── data_sources/
│ ├── remote/ # Retrofit abstract classes
│ └── local/ # Cache/Storage
└── network/
├── dio_client.dart # Custom Dio setup
└── interceptors/ # Auth, Logging, Cache1. **Define Retrofit clients** — Create abstract classes with `@RestApi()` and HTTP annotations (`@GET`, `@POST`). Methods return `Future<DTO>`. 2. **Create DTOs** — Use `@freezed` and `@JsonSerializable` for all request/response bodies. 3. **Map to domain** — Data sources must map DTOs to Domain Entities (e.g., `userDto.toDomain()`). 4. **Guard enums** — Always use `@JsonKey(unknownEnumValue: Status.unknown)` to prevent crashes from new backend values. 5. **Add auth interceptor** — Inject `Authorization: Bearer <token>` in `onRequest`. 6. **Handle token refresh** — On 401, lock Dio, call `refreshToken()`, update stored token, retry via `dio.fetch(err.requestOptions)`. 7. **Map failures** — Convert `DioException` to typed `Failure` objects (ServerFailure, NetworkFailure).
See [implementation examples](references/implementation.md) for RestClient definitions and safe enum DTO patterns.
For RestClient definitions and Auth Interceptor implementation: See [references/REFERENCE.md](references/REFERENCE.md).
feature-based-clean-architecture | error-handling
The portable standards layer for AI coding agents. Sync once, then work in your own runtime.
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Define deterministic guardrails for agent tool calls — protected paths, test-file locks during bug fixes, post-edit formatters,…
Apply REST API conventions — HTTP semantics, status codes, versioning, pagination, and OpenAPI standards for any framework. Use…
Audit structural debt, logic leakage, and monolithic components across Web, Mobile, and Backend codebases. Use when reviewing…
Draws architecture diagrams as editable draw.io files with a fixed house style, C4 levels, evidence-tagged shapes, and optional…
Enforce SOLID principles, guard-clause style, function size limits, and intention-revealing naming across all languages. Use when…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.