skills/flutter-test/SKILL.md
Write Flutter tests with auto-triage across Unit, Widget, and Integration modes. Uses AAA (Arrange-Act-Assert) pattern, mocktail for mocking, ProviderContainer for Riverpod providers, and minimum 10 test cases per class. Use when the user says "write tests," "unit test," "widget test," "integration test," "add test coverage," "test this feature," "test this provider," "test this screen," or wants automated verification of any Dart class, widget, or user flow. Do not use for manual QA test plans — use a test-case skill for that.
npx skillsauth add cuozg/oh-my-skills flutter-testInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect test type, pick mode, write comprehensive tests. AAA pattern, mocktail mocking, 10+ tests per class.
| Signal | Mode | |--------|------| | Provider, service, repository, model, utility, pure logic class | Unit | | Widget, screen, component, UI element, form validation display | Widget | | Full app flow, navigation, multi-screen journey, end-to-end | Integration |
State triage: "This is [mode] — [reason]."
Load read_skill_file("flutter-test", "references/unit-mode.md") for patterns.
read_skill_file("flutter-test", "references/mocking-patterns.md")group() by method, setUp/tearDown for isolationlsp_diagnostics on test file; confirm all imports resolveLoad read_skill_file("flutter-test", "references/widget-mode.md") for patterns.
ProviderScope overrides and MaterialApp wrappertestWidgets, finders, pumpAndSettle, interaction gestureslsp_diagnostics on test fileLoad read_skill_file("flutter-test", "references/integration-mode.md") for patterns.
IntegrationTestWidgetsFlutterBinding, mock external serviceslsp_diagnostics on test fileMock, Fake, registerFallbackValueaddTearDown(container.dispose) always'returns User on success' not 'test1'setUp/tearDown for isolation — never share mutable state across testslib/features/auth/data/auth_repo.dart → test/features/auth/data/auth_repo_test.dartprint/debugPrint in tests — use expect assertions only| From | To | When | |------|----|------| | Unit | Widget | Test requires rendering UI to verify behavior | | Widget | Unit | Widget test is testing pure logic — extract to unit test | | Widget | Integration | Test needs navigation or multi-screen state | | Any | Unit+Widget | Feature needs both logic and UI coverage |
Carry forward context; tell user why mode changed.
Load on demand via read_skill_file("flutter-standards", "references/<path>"):
testing-patterns.md — Foundation patterns for all test typesdependency-injection.md — Riverpod DI patterns for testable architecturestate-management-guide.md — Provider patterns relevant to test setuperror-handling.md — Error types and exception testing patternscode-organization.md — Test file placement, feature-first test structuretools
Generate Unity raster image assets through Unity MCP: game sprites, item art, backgrounds, UI icons, portraits, concept images, transparent cutouts, image edits, upscales, background removal, and Unity scene or Game View screenshots. Use when a Unity project needs image files imported under Assets or screenshots captured from the editor. Do not use for meshes, audio, animation, materials, gameplay code, UI Toolkit layout, or generic non-Unity image generation.
tools
Create Unity technical solution documents from user requirements, feature ideas, bug goals, specs, or codebase problems. Use when the user asks for a technical approach, architecture, implementation strategy, solution options, feasibility analysis, system design, or "how should we build/fix this" for Unity runtime, Editor, tools, assets, data, UI, WebGL, SDKs, or production pipelines.
tools
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
development
Convert a spec document into an implementation TODO list in the same spec folder. U se when the user says goal-todo, todo from spec, generate tasks from spec, turn this spec into todos, create implementation checklist, extract tasks, or asks to read a Docs/Specs design doc and produce what must be implemented. Includes UI/UX review and codebase investigation before writing the checklist. Do not use for implementing the tasks, creating new goal files, writing test cases, or verifying completed work.