Agent skill

Testing

by evanca in evanca/flutter-ai-rules

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.

MITAuto-check passedTesting & QA

Install Testing

skills CLI
$ npx skills add evanca/flutter-ai-rules --skill testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evanca/flutter-ai-rules testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
testing
GitHub stars
647
Token cost
~1.1k tokens
SKILL.md length
314 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 7 steps: Test Validity → Structure → Naming → …
  • Reviewing Flutter/Dart tests (unit
  • SKILL.md covers When to Use, 1. Test Validity, 2. Structure and 3. Naming, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

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.

When your agent uses it

  • Reviewing Flutter/Dart tests (unit
  • Fixing flaky tests
  • Adding coverage
  • Choosing between unit and widget tests

Example prompts

  • “/testing”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Test Validity
  2. Structure
  3. Naming
  4. Unit Tests vs Widget Tests
  5. Widget Test Patterns
  6. Mocking Best Practices
  7. Test File Organization

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 314 words, ~1,126 tokens.

Download SKILL.mdSave it as .claude/skills/testing/SKILL.md (or your agent's skills folder).
name
testing
description
Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
license
MIT

Testing Skill

Write effective, meaningful Flutter and Dart tests that catch real regressions.

When to Use

Use this skill when:

  • Writing unit tests for business logic, repositories, or utility classes.
  • Writing widget tests for UI components.
  • Reviewing existing tests for correctness and coverage.
  • Fixing flaky or false-positive tests.
  • Deciding between unit tests, widget tests, and integration tests.

1. Test Validity

Before writing or accepting a test, ask:

"Can this test actually fail if the real code is broken?"

  • Avoid tests that only confirm mocked/fake behavior without exercising real logic.
  • Avoid tests that confirm behavior guaranteed by the language or standard library.
  • Every test must be capable of catching a real regression.
dart
// 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),
  ],
);

2. Structure

Always use group() in test files. Name the group after the class under test:

dart
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:

  • Use setUp for shared object creation; use tearDown for cleanup (closing streams, controllers).
  • Keep each test focused on one behavior.
  • Nest group() blocks for sub-features when a class has many methods.

3. Naming

Name test cases using "should" to describe expected behavior:

dart
test('should emit updated list when item is added', () { ... });
test('should throw ArgumentError when input is negative', () { ... });

4. Unit Tests vs Widget Tests

TypeTargetTools
Unit testPure Dart logic, repositories, cubits/blocstest, bloc_test, mocktail
Widget testIndividual widgets, UI behavior, navigationflutter_test, WidgetTester

Default to unit tests for business logic. Use widget tests when verifying UI rendering, gesture handling, or widget interaction.


5. Widget Test Patterns

dart
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:

  • Wrap widgets in MaterialApp (or the app's root widget) to provide MediaQuery, Directionality, etc.
  • Use pump() for a single frame or pumpAndSettle() when animations must complete.
  • Prefer find.byKey over find.text for widgets that may have localized or dynamic text.

6. Mocking Best Practices

  • Use mocktail for mocks (no code generation required).
  • Call registerFallbackValue() in setUpAll for custom types passed to any().
  • Mock at the repository boundary, not at the HTTP/database layer.
dart
class MockAuthRepository extends Mock implements AuthRepository {}

void main() {
  setUpAll(() {
    registerFallbackValue(FakeLoginRequest());
  });

  // ... tests
}

7. Test File Organization

test/
  feature_a/
    cubit/
      feature_a_cubit_test.dart
    view/
      feature_a_view_test.dart
    model/
      feature_a_model_test.dart
  • Mirror the lib/ folder structure under test/.
  • One test file per source file.
  • Name test files <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

Files

Just SKILL.md in skills/testing of evanca/flutter-ai-rules.

Open the folder on GitHubat commit 7b9cce2

Compare with similar skills

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.

Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Testing this skillevanca/flutter-ai-rules647—~1.1kAutomated safety check: PassMIT
Flutter TestingMADTeacher/mad-agents-skills110—~1.5kAutomated safety check: PassMIT
Test Guidelinesgetsentry/sentry-dart873—~3.1kAutomated safety check: PassMIT
BlocVeryGoodOpenSource/vgv-ai-flutter-plugin169—~2kAutomated safety check: PassMIT
TestingVeryGoodOpenSource/vgv-ai-flutter-plugin169—~3.2kAutomated safety check: PassMIT
Green GateVeryGoodOpenSource/vgv-ai-flutter-plugin169—~4.7kAutomated safety check: NotesMIT

Similar skills

  • Flutter Testing

    MADTeacher/mad-agents-skills

    Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins.

    110 GitHub stars~1.5k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Test Guidelines

    getsentry/sentry-dart

    Official

    Enforce Sentry Dart/Flutter SDK test conventions for naming, structure, and fixtures.

    873 GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Bloc

    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…

    169 GitHub stars~2k tokensUpdated yesterday
    MobileAuto-check passed
  • Testing

    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…

    169 GitHub stars~3.2k tokensUpdated yesterday
    MobileAuto-check passed
  • Green Gate

    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.

    169 GitHub stars~4.7k tokensUpdated yesterday
    MobileAuto-check: notes
  • Dart Lifecycle Disposed Flag Overload

    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.

    265 GitHub stars~2k tokensUpdated today
    MobileAuto-check passed

More from evanca/flutter-ai-rules

All 37 skills in this repo
  • Code Review

    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.

    647 GitHub stars~2.4k tokensUpdated 23 days ago
    Auto-check passed
  • Developing Genkit Dart

    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.

    647 GitHub stars~961 tokensUpdated 23 days ago
    Auto-check passed
  • Generate Images With Firebase AI

    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…

    647 GitHub stars~2.3k tokensUpdated 23 days ago
    Auto-check passed
  • Flutter Use Column Row First

    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.

    647 GitHub stars~1.3k tokensUpdated 23 days ago
    Auto-check passed
  • Architecture Feature First

    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.

    647 GitHub stars~1.9k tokensUpdated 23 days ago
    Auto-check passed
  • Bloc

    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…

    647 GitHub stars~2.8k tokensUpdated 23 days ago
    Auto-check passed

Works with

Questions about Testing

What does Testing do?

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.

When should I use Testing?

Testing fits situations like: reviewing Flutter/Dart tests (unit; fixing flaky tests; adding coverage; choosing between unit and widget tests.

How do I install Testing in Claude Code?

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.

How do I install Testing in Codex?

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.

Can I use Testing in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Testing is instructions for the agent only.

Does Testing access the network?

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.

Is Testing safe to install?

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.

What licence does Testing use?

Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Testing use?

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.

What are the alternatives to Testing?

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.

Who maintains Testing?

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.