flutter-testing

flutter-testing is a skill for Claude Code from jyotiraditya-chauhan/test-kit. It costs 96 tokens per session (2,842 once invoked), scanned A, original, MIT.

A Flutter testing guide for writing unit tests, widget tests, golden tests, and integration tests. Flutter is Google's framework for building apps from Dart code.

In plain words
What is it for?
It is for adding tests to Flutter widgets, business logic, repositories, BLoCs, or providers, after checking the project's declared packages.
Why use it?
It helps tests follow the project's existing state-management tools and file conventions instead of using assumptions that may not fit the codebase.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents).

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/jyotiraditya-chauhan/test-kit/flutter-testing
Any agent
npx skills add jyotiraditya-chauhan/test-kit --skill flutter-testing
Clone the repo
git clone --depth 1 https://github.com/jyotiraditya-chauhan/test-kit

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jyotiraditya-chauhan/test-kit/flutter-testing.svg)](https://agentmods.dev/skills/jyotiraditya-chauhan/test-kit/flutter-testing)
Your own site
<a href="https://agentmods.dev/skills/jyotiraditya-chauhan/test-kit/flutter-testing"><img src="https://agentmods.dev/badge/skills/jyotiraditya-chauhan/test-kit/flutter-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,842 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.1 $0.00096 $0.02842
Opus 5 $0.00048 $0.01421
Sonnet 5 $0.00019 $0.00568
Haiku 4.5 $0.00010 $0.00284

Measured 5d ago against content hash d4cb67d4d353, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

flutter-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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/detect_stack.sh, scripts/scaffold_test_file.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/flutter-testing/SKILL.md · 217 lines

How it starts

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

Flutter Testing

Writes unit, widget, golden, and integration tests that match this project's existing state-management, mocking, and directory conventions. Writing correct, well-structured test files is the deliverable. Running the suite and verifying it — including the fault-injection self-check — is a separate, optional step this skill offers but never runs without being asked. See Step 6.

Progress checklist

Copy this into your response and check items off as you go:

- [ ] 1. Detect stack (scripts/detect_stack.sh)
- [ ] 2. Audit project structure and existing test conventions
- [ ] 3. Ask the user what to test (layer + scope) — do not assume
- [ ] 4. State the test plan explicitly
- [ ] 5. Generate tests following AAA, boundary-only mocking
- [ ] 6. Report what was written; offer to run + verify — do not run yet
- [ ] 7. Only if asked: run tests, fault-injection self-check, report results

Step 1 — Detect stack

Run scripts/detect_stack.sh from the project root. It confirms this is a Flutter project and reports which state-management package, mocking library, golden-test helper, and Firebase fakes are already declared in pubspec.yaml, plus whether test/ already exists and mirrors lib/.

If a test framework or mocking library is already in use, follow it even if a different tool is this skill's default recommendation. Never introduce a second, competing library into a project that already picked one.

Step 2 — Audit project structure

Before writing anything:

  • Classify the target code: pure business logic (services, repositories, use-cases) vs UI layer (widgets) vs data-access (Firebase, API clients) vs cross-cutting (routing, DI). This decides the test type — don't default to a widget test for logic that's dressed up inside a widget file; if the architecture allows extracting it into a plain testable class/function, say so in the plan (Step 4) rather than testing it in place.
  • Confirm the state-management package via reference/state-management.md and select the matching harness pattern — never generate a BLoC-style test for a Riverpod provider or vice versa.
  • Match the existing test/ naming convention exactly (does it mirror lib/ file-for-file already?). scripts/scaffold_test_file.sh creates a correctly-mirrored, non-destructive stub for a new test file if useful.
  • Flag critical paths — authentication, payment/billing, any data-write operation, anything touching an external paid/rate-limited service — for elevated rigor (more edge cases; these are the tests where, if the user opts into verification in Step 7, the fault-injection check is mandatory rather than optional) even if the user's request was narrower. State this flag out loud; do not silently expand scope beyond what was asked.

Read the full file on GitHub · 217 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. 5d ago First seen · 217 lines · 96 tokens per session scan A d4cb67d4d353

Subscribe to this mod's changes

flutter-testing is a skill published in the GitHub repository jyotiraditya-chauhan/test-kit (4 stars, last pushed 16d ago), licensed MIT. It adds 96 tokens to every session and 2,842 once invoked, about $0.0005 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