skills/flutter/flutter-testing/SKILL.md
Write unit, widget, and integration tests with robot patterns, widget keys, and Patrol in Flutter. Use when writing tests or implementing test automation.
npx skillsauth add hoangnguyen0403/agent-skills-standard flutter-testingInstall 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.
should <behavior> when <condition>.test/shared/ only — no local mocks._integration_test.dart ONLY in integration_test/.CheckoutRobot) — never raw find.*/expect() in test body.TestWrapper.init() in setUpAll and tester.pumpLocalizedWidget(...).setUpAll if created internally. Use blocTest for BLoC logic and whenListen for state transitions.setUp. Prohibit any() / anyNamed().*Robot (e.g., expectFirstOrderVisible()).expectXxxVisible() needs expectXxxNotVisible() pairs.scrollDown, scrollToEnd) and screen visibility assertions (expectScreenVisible, expectScreenNotVisible) into common BaseRobot or parent class to avoid duplication.pumpScreen(bloc:, settle:) helper.lib/core/keys/ — never inline Key('string').$.native.* for native interactions (e.g., system dialogs).final robot = OrdersRobot($.tester) — share same class as widget tests.$.native.* and navigation helpers may remain inline in test body.WidgetKeys constant. No any(): Use typed matchers.test/shared/. No missing bloc stub: Stub state + stream.find.*/expect() to robot. No raw find in integration tests._integration_test.dart in test/: Rename or merge.v_dls when robots handle assertions. Check Material import needs.Edge cases group. No one-sided assertions: Add expectNotVisible pairs..toUpperCase(), .tr() in source.flutter test passes.testing
Infer the requesting operator's technical fluency from message content (never ask directly) and adapt register — business, hybrid, or technical — across SDLC workflow output. Use when starting sdlc, brainstorm-feature, plan-feature, verify-work, publish-notes, or session-report, or whenever a request's phrasing signals a non-technical or cross-stack operator.
documentation
Define transaction boundaries, locking, and consistency guarantees for multi-step writes. Use when designing atomic operations, retries, idempotency, or concurrent write behavior.
development
Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
data-ai
Diagnose database latency with explain plans, index ownership, and query-shape review. Use when a query is slow, an index is missing, or scans and N+1 patterns appear.