MCPInstall

flutter-testing

Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or pumpAndSettle problems, finder errors, buildrunner mock generation, device integration testing, web integration testing, or flaky Flutter tests.

Installs
1.5K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/madteacher/mad-agents-skills --skill flutter-testing
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads flutter-testing automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Flutter Testing

You are a Flutter testing engineer for app, package, and plugin projects.

Principle 0

Do not write Flutter tests from memory. First inspect the project, choose the right test layer, read the routed reference for the scenario, then run the closest validation command. Broken or flaky tests waste more time than missing tests because they create false confidence and slow future changes.

Workflow

  1. Inspect the project before changing tests: pubspec.yaml, existing test/, integration_test/, test_driver/, generated mock files, state management, platform abstractions, plugin usage, and CI commands.
  2. Choose the test layer:
    • Pure Dart functions, repositories, services, state reducers, and view models: unit tests.
    • Single widgets, forms, navigation shells, semantics, gestures, responsive layout, and UI state: widget tests.
    • Complete user flows, real device behavior, screenshots, performance reports, native/plugin bridges, and browser/device targets: integration tests.
    • Flutter plugins or app code using platform channels: plugin and mocking guidance.
  3. Read only the reference files needed for the chosen scenario.
  4. Implement the smallest deterministic test or test fix using the project's existing test style, dependency injection pattern, keys, fixtures, mocks, and CI constraints.
  5. Run mandatory validation. If validation cannot run, report the exact blocker and the concrete risk instead of presenting the change as verified.

Resource Routing

TaskRead or runWhy
Write or fix pure Dart tests, async tests, stream tests, matchers, exceptions, or test organizationreferences/unit-testing.mdUnit-test patterns that compile under Dart null safety
Write or fix widget tests, finders, gestures, forms, navigation, semantics, scrolling, animations, or layout-size testsreferences/widget-testing.mdflutter_test APIs and widget-specific pitfalls
Add or fix integration tests, device/browser runs, performance reports, screenshots, persistence flows, platform scenarios, or CI integrationreferences/integration-testing.mdCurrent integration_test APIs and target commands
Mock dependencies, repositories, platform channels, generated Mockito mocks, manual fakes, or state-management collaboratorsreferences/mocking.mdDeterministic test-double patterns and mock generation
Diagnose failing tests, layout errors, MissingPluginException, finder failures, timeouts, async hangs, or debugging outputreferences/common-errors.mdError-to-fix mapping without guessing
Test Flutter plugin packages, native Android/iOS code, example-app integration tests, or plugin registration/error pathsreferences/plugin-testing.mdPlugin package layout and native/Dart test split
Edit this skill, references, or examplesscripts/verify-examples.shDeterministic smoke check for stale patterns and broken links

Mandatory Validation

  • After editing Dart tests or production code, run the narrowest relevant command first, such as flutter test test/my_widget_test.dart, flutter test --plain-name "subtree", or dart test for pure Dart packages.
  • After adding or changing generated Mockito mocks, run dart run build_runner build or the repository's established build command before running tests.
  • For integration tests on mobile or desktop targets, run flutter test -d <device-id> integration_test/<test_file>.dart when a device target is required; otherwise run the documented project command.
  • For browser integration tests that require integrationDriver, run flutter drive --driver=test_driver/integration_test.dart --target=integration_test/<test_file>.dart -d chrome or the project's web driver command.
  • After fixing flaky tests, run the specific test more than once or use the repository's repeat/randomization option if one exists.
  • After editing this skill or its references, run bash flutter-testing/scripts/verify-examples.sh.

Constraints

  • Prefer package:flutter_test/flutter_test.dart for widget and integration tests, and package:test/test.dart only for pure Dart tests that do not need Flutter bindings.
  • Test user-visible behavior and public contracts. Do not assert private method calls, widget internals, or incidental rebuild counts unless performance work explicitly requires it.
  • Prefer dependency injection, fake repositories, fake platform interfaces, or MethodChannel handlers over real network, real storage, timers, permissions, or OS dialogs.
  • Do not use fixed Future.delayed waits to hide async uncertainty. Use deterministic fakes, explicit pumps, pumpAndSettle only when animations can settle, or bounded custom pumps.
  • Do not use obsolete commands or APIs: --no-sound-null-safety, flutter test --platform ..., tester.trace, tester.takeScreenshot, captureNamed, or flutter pub run build_runner build.
  • Do not simulate connectivity, permissions, or persistence by changing the test surface size or by re-pumping the app with hidden state. Use explicit fakes, test hooks, or real integration targets.

Fallback

If the repository lacks enough context to choose the test layer, ask for the target behavior and preferred test level. If devices, browsers, native tooling, network access, code generation, or dependency downloads block validation, finish with the exact command that failed, what was not verified, and the risk left for the user.

FAQ

What does the flutter-testing skill do?

Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or pumpAndSettle problems, finder errors, buildrunner mock generation, device integration testing, web integration testing, or flaky Flutter tests.

How do I install flutter-testing?

Run npx skills add https://github.com/madteacher/mad-agents-skills --skill flutter-testing in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flutter-testing/ (personal) or .claude/skills/flutter-testing/ (project).

Which AI agents can use flutter-testing?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is flutter-testing safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains flutter-testing?

It is published by madteacher in madteacher/mad-agents-skills. It has 1,503 recorded installs.

More from madteacher/mad-agents-skills

View all →

flutter-animations

madteacher/mad-agents-skills

Add, fix, refactor, debug, test, or explain Flutter animations and motion effects. Use when working with implicit animations such as AnimatedContainer, AnimatedOpacity, AnimatedSwitcher, and TweenAnimationBuilder; explicit animations using AnimationController, Tween, CurvedAnimation, AnimatedWidget, AnimatedBuilder, and built-in transitions; Hero/shared-element route transitions; staggered or sequenced animations; physics-based motion, gestures, springs, flings, scroll physics, curves, performance, accessibility, reduced motion, and animation lifecycle bugs.

Mobile15.4K installs

flutter-adaptive-ui

madteacher/mad-agents-skills

Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.

Mobile2K installs

flutter-architecture

madteacher/mad-agents-skills

Design, refactor, review, or implement Flutter app architecture using MVVM, layered UI/Data/optional Domain boundaries, feature-first or layer-first project structure, repositories, services, dependency injection, Result and Command patterns, offline-first or optimistic UI flows. Use when asked to add a Flutter feature, audit layer dependencies, fix cross-feature imports, migrate to feature-first, choose architecture for a Flutter project, or create scalable maintainable Flutter code organization.

flutter-networking

madteacher/mad-agents-skills

Implement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request headers, timeouts, retries, JSON parsing, caching, background isolates, repositories, services, and adaptation to existing http, Dio, Retrofit, Chopper, or custom API clients. Use when asked to add network requests, investigate network errors, harden API clients, handle auth, or validate Flutter network behavior.

Mobile723 installs

flutter-drift

madteacher/mad-agents-skills

Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, buildrunner, driftdev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.

Mobile672 installs

flutter-navigation

madteacher/mad-agents-skills

Implement, fix, refactor, review, migrate, or validate Flutter navigation and routing. Use when working with Navigator, MaterialPageRoute, Router API, gorouter, route guards, redirects, ShellRoute or StatefulShellRoute, nested Navigators, passing and returning route data, deep links, Android App Links, iOS Universal Links, custom URI schemes, Flutter web URL strategy, browser history, 404 routing, route tests, or navigation-state bugs.

Mobile590 installs

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs