01
It starts by itself
PR changes a widget. Runs in GitHub Actions or Claude Code routine.
- ↻ PR changes a widget
pull_request paths: lib/**
Every new widget gets a test.
Install the Flutter Add Widget Test skill and make it a habit: follow https://gethabit.dev/skills/flutter/flutter-add-widget-test.md
39K installs3K starsBSD-3-Clause licenceSource on GitHub ↗

Flutter Add Widget Test
by flutter · 39K installs
The skill
The flutter add widget test skill writes component tests with WidgetTester, finders and matchers to check rendering, taps, scrolling and text input.
Only when you ask.
The habit
Every new widget gets a test.
↻ Runs by itselfPR changes a widget
When does it start? How does it check its work? What does it remember?
Stops after one widget per run and at most two fix rounds.
Make sure flutter_test is a dev dependency and tests live in test/.
Write testWidgets and build the widget with tester.pumpWidget.
Use finders and expect to verify the initial state.
Tap, drag, enterText or scrollUntilVisible as the widget needs.
Call pump or pumpAndSettle and verify the new state.
Run flutter test on the file and fix failing matchers.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Flutter Add Widget Test skill helps.
For animations, transitions or async updates, so all frames finish.
Wrap it in one, or in Directionality, if it needs theme or text direction.
Copy the prompt at the top into your agent. It installs the skill from flutter/agent-plugins and sets up the habit. Or run npx skills add flutter/agent-plugins --skill flutter-add-widget-test.
Yes. It is published under BSD-3-Clause. Habit is free too.
Install the Flutter Add Widget Test skill and make it a habit: follow https://gethabit.dev/skills/flutter/flutter-add-widget-test.md
All flutter skills →More code skills →
Works in
Made by flutter, published under BSD-3-Clause. Habit links to the original and never changes it. Is this your skill?