flutter-add-widget-test

flutter-add-widget-test is a skill for Claude Code, Codex from sutchan/Agent-Skills-Hub. It costs 48 tokens per session (1,488 once invoked), scanned A, a copy of flutter-add-widget-test, MIT.

A guide for writing Flutter widget tests, which check individual interface components and their user interactions. Flutter is a toolkit for building apps from one Dart codebase.

In plain words
What is it for?
Use it to find widgets, simulate actions such as tapping or typing, and verify that the expected interface appears.
Why use it?
It helps catch broken rendering or interactions at the component level before they affect the whole app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find widgets, simulate actions such as tapping or typing, and verify that the expected interface appears.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sutchan/agent-skills-hub/flutter-add-widget-test
Install

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.

Any agent
npx skills add sutchan/Agent-Skills-Hub --skill flutter-add-widget-test
Clone the repo
git clone --depth 1 https://github.com/sutchan/Agent-Skills-Hub

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for flutter-add-widget-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/flutter-add-widget-test/github.svg)](https://agentmods.dev/skills/sutchan/agent-skills-hub/flutter-add-widget-test)
Your own site
<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.

agentmods 80×15 button for flutter-add-widget-test

Your own site · 80×15
<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>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured today against content hash 6c449ebd844e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

Origin

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.

skills/flutter-add-widget-test/SKILL.md · 155 lines

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

Ensure the testing environment is properly configured before authoring widget tests.

  1. Add the flutter_test dependency to the dev_dependencies section of pubspec.yaml.
  2. Place all test files in the test/ directory at the root of the project.
  3. 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 the testWidgets() 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 a Finder (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 a MaterialApp or Directionality widget if it requires inherited directional or theme data.
  • Step 3: Locate elements. Instantiate Finder objects 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() or await 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.

Read the full file on GitHub · 155 lines

Changes

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.

  1. today Changed · -4 lines · +23 tokens per session 6c449ebd844e
  2. 6d ago First seen · 159 lines · 25 tokens per session scan A 577a5f46d334

Subscribe to this mod's changes

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.

Related

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…

shennawardana23/skillme · 87 tokens

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…

shennawardana23/skillme · 92 tokens

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…

shennawardana23/skillme · 69 tokens

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…

MADTeacher/mad-agents-skills · 93 tokens

Android Testing

JUnit + Robolectric unit tests, Compose UI tests, screenshot tests, and Espresso for legacy views.

niels-emmer/myace · 23 tokens

iOS Testing

XCTest unit tests, XCUITest UI tests, snapshot testing, and performance baselines for iOS apps.

niels-emmer/myace · 27 tokens