Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add sutchan/Agent-Skills-Hub --skill flutter-add-widget-testgit clone --depth 1 https://github.com/sutchan/Agent-Skills-HubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sutchan/agent-skills-hub/flutter-add-widget-test)<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/flutter-add-widget-test"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/flutter-add-widget-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/flutter-add-widget-test"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/flutter-add-widget-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01488 |
| Opus 5 | $0.00024 | $0.00744 |
| Sonnet 5 | $0.00010 | $0.00298 |
| Haiku 4.5 | $0.00005 | $0.00149 |
Grade A, and why
flutter-add-widget-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
98% identical to flutter-add-widget-test — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Flutter Widget Tests
Contents
- Setup & Configuration
- Core Components
- Workflow: Implementing a Widget Test
- Interaction & State Management
- Examples
Setup & Configuration
Ensure the testing environment is properly configured before authoring widget tests.
- Add the
flutter_testdependency to thedev_dependenciessection ofpubspec.yaml. - Place all test files in the
test/directory at the root of the project. - Suffix all test file names with
_test.dart(e.g.,widget_test.dart).
Core Components
Utilize the following flutter_test components to interact with and validate the widget tree:
WidgetTester: The primary interface for building and interacting with widgets in the test environment. Provided automatically by thetestWidgets()function.Finder: Locates widgets in the test environment (e.g.,find.text('Submit'),find.byType(TextField),find.byKey(Key('submit_btn'))).Matcher: Verifies the presence or state of widgets located by aFinder(e.g.,findsOneWidget,findsNothing,findsNWidgets(2),matchesGoldenFile).
Workflow: Implementing a Widget Test
Copy the following checklist to track progress when implementing a new widget test.
Task Progress
- Step 1: Define the test. Use
testWidgets('description', (WidgetTester tester) async { ... }). - Step 2: Build the widget. Call
await tester.pumpWidget(MyWidget())to render the UI. Wrap the widget in aMaterialApporDirectionalitywidget if it requires inherited directional or theme data. - Step 3: Locate elements. Instantiate
Finderobjects for the target widgets. - Step 4: Verify initial state. Use
expect(finder, matcher)to validate the initial render. - Step 5: Simulate interactions. Execute gestures or inputs (e.g.,
await tester.tap(buttonFinder)). - Step 6: Rebuild the tree. Call
await tester.pump()orawait tester.pumpAndSettle()to process state changes. - Step 7: Verify updated state. Use
expect()to validate the UI after the interaction. - Step 8: Run and validate. Execute
flutter test test/your_test_file_test.dart. - Step 9: Feedback Loop. Review test output -> identify failing matchers -> adjust widget logic or test assertions -> re-run until passing.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · -4 lines · +23 tokens per session 6c449ebd844e
- 6d ago First seen · 159 lines · 25 tokens per session scan A 577a5f46d334
flutter-add-widget-test is a skill published in the GitHub repository sutchan/Agent-Skills-Hub (2 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,488 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to flutter-add-widget-test, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
raw-sql-querybuilder-testing-patterns
Guides Go services that use database/sql directly with a lightweight in-house query builder (not an ORM like GORM or a codegen tool like sqlc), including how to make repositories unit-testable via mock-generated interfaces. Use when writing or reviewing a repository method built on database/sql, adding a new…
tdd-workflow
Runs the full TDD workflow for a TypeScript/JavaScript feature — user journeys to test cases, unit tests (Jest/Vitest + Testing Library), API/integration tests, Playwright E2E, and a coverage gate wired into CI. Use when building a Next.js/React/Node feature end to end, not just a single unit test, or when asked to…
test-generation
Generates comprehensive unit, table-driven, and concurrency tests for a given function or module — happy paths, error paths, boundary values, and mocked dependencies — following Go and TypeScript idioms. Use when a function or file needs test coverage, a bug fix needs a regression test, or existing tests only cover…
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…
Android Testing
JUnit + Robolectric unit tests, Compose UI tests, screenshot tests, and Espresso for legacy views.
iOS Testing
XCTest unit tests, XCUITest UI tests, snapshot testing, and performance baselines for iOS apps.