Flutter Testing
MADTeacher/mad-agents-skills
Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins.
A skill your agent uses when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
$ npx skills add evanca/flutter-ai-rules --skill testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install evanca/flutter-ai-rules testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/testing .claude/skills/testing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .claude/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/evanca/flutter-ai-rules/tree/main/skills/testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add evanca/flutter-ai-rules --skill testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install evanca/flutter-ai-rules testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/testing .agents/skills/testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .agents/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add evanca/flutter-ai-rules --skill testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install evanca/flutter-ai-rules testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/testing .cursor/skills/testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .cursor/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/evanca/flutter-ai-rules.git --path skills/testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add evanca/flutter-ai-rules --skill testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install evanca/flutter-ai-rules testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/testing .gemini/skills/testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .gemini/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install evanca/flutter-ai-rules testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add evanca/flutter-ai-rules --skill testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/testing .github/skills/testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .github/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add evanca/flutter-ai-rules --skill testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install evanca/flutter-ai-rules testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/testing .opencode/skills/testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/testing into .opencode/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
testingA skill your agent uses when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
Testing is an agent skill from evanca/flutter-ai-rules. Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Cross-platform mobile apps, Failing and flaky tests and Unit testing. It works with Flutter and Dart. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Testing loads about 1.1k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 314 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 314 words, ~1,126 tokens.
.claude/skills/testing/SKILL.md (or your agent's skills folder).Write effective, meaningful Flutter and Dart tests that catch real regressions.
Use this skill when:
Before writing or accepting a test, ask:
"Can this test actually fail if the real code is broken?"
// BAD — tests the mock, not real logic
test('should return user', () {
when(() => repo.getUser()).thenReturn(fakeUser);
expect(repo.getUser(), fakeUser); // Only proves the mock works
});
// GOOD — tests the cubit's state transitions driven by the mock
blocTest<UserCubit, UserState>(
'should emit loaded state when getUser succeeds',
build: () {
when(() => repo.getUser()).thenAnswer((_) async => fakeUser);
return UserCubit(repo);
},
act: (cubit) => cubit.fetchUser(),
expect: () => [
const UserState(status: UserStatus.loading),
UserState(status: UserStatus.loaded, user: fakeUser),
],
);Always use group() in test files. Name the group after the class under test:
group('Counter', () {
late Counter counter;
setUp(() {
counter = Counter();
});
test('value should start at 0', () {
expect(counter.value, 0);
});
test('should increment value by 1', () {
counter.increment();
expect(counter.value, 1);
});
});Rules:
setUp for shared object creation; use tearDown for cleanup (closing streams, controllers).group() blocks for sub-features when a class has many methods.Name test cases using "should" to describe expected behavior:
test('should emit updated list when item is added', () { ... });
test('should throw ArgumentError when input is negative', () { ... });| Type | Target | Tools |
|---|---|---|
| Unit test | Pure Dart logic, repositories, cubits/blocs | test, bloc_test, mocktail |
| Widget test | Individual widgets, UI behavior, navigation | flutter_test, WidgetTester |
Default to unit tests for business logic. Use widget tests when verifying UI rendering, gesture handling, or widget interaction.
testWidgets('should display error message on failure', (tester) async {
await tester.pumpWidget(
MaterialApp(
home: BlocProvider<LoginCubit>.value(
value: mockLoginCubit,
child: const LoginView(),
),
),
);
// Simulate failure state
whenListen(
mockLoginCubit,
Stream.fromIterable([const LoginState(status: LoginStatus.failure, errorMessage: 'Invalid')]),
initialState: const LoginState(),
);
await tester.pump();
expect(find.text('Invalid'), findsOneWidget);
});Rules:
MaterialApp (or the app's root widget) to provide MediaQuery, Directionality, etc.pump() for a single frame or pumpAndSettle() when animations must complete.find.byKey over find.text for widgets that may have localized or dynamic text.mocktail for mocks (no code generation required).registerFallbackValue() in setUpAll for custom types passed to any().class MockAuthRepository extends Mock implements AuthRepository {}
void main() {
setUpAll(() {
registerFallbackValue(FakeLoginRequest());
});
// ... tests
}test/
feature_a/
cubit/
feature_a_cubit_test.dart
view/
feature_a_view_test.dart
model/
feature_a_model_test.dartlib/ folder structure under test/.<source_file>_test.dart.© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/testing of evanca/flutter-ai-rules.
Open the folder on GitHubat commit 7b9cce2
Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Testing this skillevanca/flutter-ai-rules | 647 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Flutter TestingMADTeacher/mad-agents-skills | 110 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Test Guidelinesgetsentry/sentry-dart | 873 | — | ~3.1k | Automated safety check: Pass | MIT | |
| BlocVeryGoodOpenSource/vgv-ai-flutter-plugin | 169 | — | ~2k | Automated safety check: Pass | MIT | |
| TestingVeryGoodOpenSource/vgv-ai-flutter-plugin | 169 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Green GateVeryGoodOpenSource/vgv-ai-flutter-plugin | 169 | — | ~4.7k | Automated safety check: Notes | MIT |
MADTeacher/mad-agents-skills
Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins.
getsentry/sentry-dart
Enforce Sentry Dart/Flutter SDK test conventions for naming, structure, and fixtures.
VeryGoodOpenSource/vgv-ai-flutter-plugin
Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…
VeryGoodOpenSource/vgv-ai-flutter-plugin
Best practices for Dart unit tests, Flutter widget tests, and golden file tests, covering group and test naming, setUp lifecycle and isolation, mocking with package:mocktail, and the shared pumpApp…
VeryGoodOpenSource/vgv-ai-flutter-plugin
Drives a Dart or Flutter package fully green through a verify-fix-rerun loop across four gates: analyze, format, test, coverage.
divinevideo/divine-mobile
Fix Dart/Flutter services where calling start() after stop() is a silent no-op because stop() sets a disposed (or similar) flag that start()'s guard short-circuits on.
evanca/flutter-ai-rules
A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
evanca/flutter-ai-rules
A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.
evanca/flutter-ai-rules
A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…
evanca/flutter-ai-rules
A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.
evanca/flutter-ai-rules
A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.
evanca/flutter-ai-rules
A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…
Categories
A skill your agent uses when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests. Testing is an agent skill from evanca/flutter-ai-rules. Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
Testing fits situations like: reviewing Flutter/Dart tests (unit; fixing flaky tests; adding coverage; choosing between unit and widget tests.
Run `npx skills add evanca/flutter-ai-rules --skill testing -a claude-code`. Or copy the skill folder (skills/testing in evanca/flutter-ai-rules) into .claude/skills/testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add evanca/flutter-ai-rules --skill testing -a codex`. Or copy the skill folder (skills/testing in evanca/flutter-ai-rules) into .agents/skills/testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing, .gemini/skills/testing, .github/skills/testing and .opencode/skills/testing in your project.
SKILL.md names no scripts, command-line tools or credentials: Testing is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Testing: Flutter Testing (MADTeacher/mad-agents-skills, 110 stars), Test Guidelines (getsentry/sentry-dart, 873 stars), Bloc (VeryGoodOpenSource/vgv-ai-flutter-plugin, 169 stars) and Testing (VeryGoodOpenSource/vgv-ai-flutter-plugin, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 647 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.
Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.