common-accessibility
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Implement functional repository error recovery with Either/Failure patterns in Flutter. Use when handling exceptions or dartz Either types in data flows; defer UI-only retry buttons.
Claude Code
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling --agent claude-code
Codex
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a codex -y
Cursor
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a cursor -y
Gemini CLI
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a github-copilot -y
OpenCode
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a opencode -y
Windsurf
$ npx skills add hoangnguyen0403/agent-skills-standard --skill flutter-error-handling -a windsurf -y
name: flutter-error-handling
description: Implement functional repository error recovery with Either/Failure patterns in Flutter. Use when handling exceptions or dartz Either types in data flows; defer UI-only retry buttons.
metadata:
triggers:
files:
- 'lib/domain/**'
- 'lib/infrastructure/**'
keywords:
- Either
- fold
- Left
- Right
- Failure
- dartz1. **Define failures** — Create domain-specific failures using `@freezed` unions (e.g., `UnauthorizedFailure`, `OutOfStockFailure`). 2. **Return Either** — Repositories return `Either<Failure, T>`. No exceptions in UI/BLoC. 3. **Catch in Infrastructure only** — Infrastructure catches exceptions (e.g., `DioException`) and returns `Left(Failure)`. Never rethrow to UI. 4. **Fold in BLoC** — Use `.fold(failure, success)` in BLoC to emit corresponding states. Remove try/catch from BLoC. 5. **Localize messages** — Use `failure.failureMessage` (returns `TRObject` or localized string) for UI-safe text. 6. **Log with stable templates** — Use low-cardinality message templates; pass variable data via metadata/context. 7. **No Silent Catch**: Never swallow errors without logging or documented retry. 8. **Crashlytics Routing**: All UI/BLoC `catch` blocks MUST route errors via `AppLogger.error(AppException.fromException(e).message, error: e, stackTrace: st)` for observability and type-safe UI messages.
See [implementation examples](references/implementation.md) for repository error mapping and BLoC consumption patterns.
For Failure definitions and API error mapping: See [references/REFERENCE.md](references/REFERENCE.md).
layer-based-clean-architecture | bloc-state-management
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.