testing

A testing guide for Flutter applications using Clean Architecture and Riverpod, a Flutter state-management library. It covers unit, widget, golden, and integration tests, along with test doubles and coverage reviews.

In plain words
What is it for?
Use it to write or review tests, test Riverpod providers, create mocks and spies, check coverage, and verify visual layouts.
Why use it?
It helps create tests that show intent, catch regressions, and avoid brittle checks in Flutter code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/launch52-ai/flutter-template/testing
Any agent
npx skills add launch52-ai/flutter-template --skill testing
Clone the repo
git clone --depth 1 https://github.com/launch52-ai/flutter-template

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 772 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00050 $0.00772
Opus 5 $0.00025 $0.00386
Sonnet 5 $0.00010 $0.00154
Haiku 4.5 $0.00005 $0.00077

Measured yesterday against content hash 18216fef2d49, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing 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 yesterday.

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.

.claude/skills/testing/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing - Write & Review Tests

Write high-quality, maintainable tests following Clean Architecture patterns. Every test should clearly express intent and catch regressions without being brittle.

When to Use This Skill

  • Writing new tests (unit, widget, golden, integration)
  • Reviewing test code quality
  • Setting up test infrastructure (helpers, mocks, spies)
  • Testing Riverpod providers and notifiers
  • Auditing test coverage

Quick Reference

Test Types

Type Purpose When to Use
Unit Isolated logic Repositories, services, utils, providers
Widget UI interactions Screens, navigation
Golden Visual regression Layout, themes
Integration Real implementations Storage, cache, API flows

Naming Conventions

Type Pattern Example
File {component}_test.dart auth_repository_impl_test.dart
Test test_{subject}_{scenario}_{expected} test_signIn_withValidCredentials_returnsAuthResult
Factory any{Type}() anyEmail(), anyUserProfile()
SUT makeSUT() Creates System Under Test

Commands

# Run all tests
flutter test

# Run with coverage
flutter test --coverage

# Run specific type
flutter test test/unit/
flutter test test/widget/

# Audit test coverage
dart run .claude/skills/testing/scripts/check.dart

# Generate missing test files
dart run .claude/skills/testing/scripts/check.dart --generate

# Update golden files
flutter test --update-goldens test/golden/

Workflow

1. Create Test File

Mirror source path: test/unit/features/{feature}/data/repositories/{name}_test.dart

2. Write Tests Using Patterns

See patterns-guide.md for:

  • makeSUT() - Factory for System Under Test
  • Spy Pattern - Track method calls
  • Arrange-Act-Assert - Clear structure
  • Disposal Testing - Verify cleanup
  • Inbox Checklist - Infrastructure testing

3. Verify Coverage

Read the full file on GitHub · 118 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. yesterday First seen · 118 lines · 50 tokens per session scan A 18216fef2d49

Subscribe to this mod's changes

testing is a skill published in the GitHub repository launch52-ai/flutter-template (2 stars, last pushed 6mo ago), licensed MIT. It adds 50 tokens to every session and 772 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

merge-seed

Merge upstream React Starter Kit updates (the seed remote) into main, preserving this project's identity, scope, and behavior. Use when asked to sync, pull, or merge the seed / starter kit / upstream template.

kriasoft/react-starter-kit · 49 tokens

django-celery-expert

Expert Django Celery guidance for asynchronous task processing. Use when designing background tasks, configuring Celery workers, handling task retries and errors, optimizing Celery performance, implementing periodic tasks with Celery Beat, or setting up production monitoring for Celery. Do not use for general Django…

wilfredinni/django-starter-template · 115 tokens

django-expert

Expert Django backend development guidance. Use when creating Django models, views, serializers, or APIs; debugging ORM queries or migrations; optimizing database performance; implementing authentication; writing tests; or working with Django REST Framework. Follows Django best practices and modern patterns.

wilfredinni/django-starter-template · 55 tokens

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json…

kriasoft/react-starter-kit · 94 tokens

setup

Interactive project setup from the ai-project-template — replaces the static SETUPGUIDE.md with a guided, multi-step workflow.

TheSmuks/ai-project-template · 26 tokens

template-guide

Navigate template conventions, audit compliance, and guide upgrades for ai-project-template repos.

TheSmuks/ai-project-template · 18 tokens