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 agentmods add skills/evanca/flutter-ai-rules/mockitonpx skills add evanca/flutter-ai-rules --skill mockitogit clone --depth 1 https://github.com/evanca/flutter-ai-rulesWrote 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/evanca/flutter-ai-rules/mockito)<a href="https://agentmods.dev/skills/evanca/flutter-ai-rules/mockito"><img src="https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/mockito.svg" alt="Measured on agentmods" 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.00032 | $0.00857 |
| Opus 5 | $0.00016 | $0.00428 |
| Sonnet 5 | $0.00006 | $0.00171 |
| Haiku 4.5 | $0.00003 | $0.00086 |
Grade A, and why
mockito scanned grade A with 1 finding 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 6d ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
when(mock.fetch(any, headers: any)).thenReturn(response); How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mockito Skill
This skill defines how to correctly use the mockito package for mocking in Dart and Flutter tests.
1. Mock vs. Fake vs. Real Object
| Use | When |
|---|---|
| Real object | Prefer over mocks when practical. |
Fake (extends Fake) |
Lightweight custom implementation; override only the methods you need. Prefer over mocks when you don't need interaction verification. |
Mock (extends Mock) |
Only when you need to verify interactions (call counts, arguments) or stub dynamic responses. |
- Data models should not be mocked if they can be constructed with stubbed data.
- Only use mocks if your test has
verifyassertions; otherwise prefer real or fake objects.
2. Generating Mocks
@GenerateMocks([MyClass])
// or for nice mocks (return simple legal values for missing stubs):
@GenerateNiceMocks([MockSpec<MyClass>()])
void main() { ... }
dart run build_runner build
- Only annotate files under
test/for mock generation by default. - Use a
build.yamlif you need to generate mocks outside oftest/. - Never add
@overridemethods or implementations to a class extendingMock. - Never stub responses in a mock's constructor or inside the mock class — always stub in your tests.
3. Stubbing
final mock = MockCat();
// Return a value
when(mock.sound()).thenReturn('Meow');
// Throw an error
when(mock.sound()).thenThrow(Exception('No sound'));
// Calculate response at call time
when(mock.sound()).thenAnswer((_) => computedValue);
// Return values in sequence
when(mock.sound()).thenReturnInOrder(['Meow', 'Purr']);
- Always stub methods/getters before using them if you need specific return values.
- Missing stub behavior:
@GenerateMocks→ throws;@GenerateNiceMocks→ returns a simple legal value. - Use
throwOnMissingStub(mock)to throw on any unstubbed call.
4. Verification
verify(mock.sound()); // called at least once
verifyNever(mock.eat(any)); // never called
verify(mock.sound()).called(2); // called exactly twice
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.
- 6d ago First seen · 147 lines · 32 tokens per session scan A 1c50c248c119
mockito is a skill published in the GitHub repository evanca/flutter-ai-rules (632 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 857 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
dart-expert
Expert-level Dart, Flutter, mobile development, and cross-platform apps. Use when the user mentions Flutter, mobile, cross platform, or widgets, or when the task involves Dart Language or Flutter Framework.
Sanad Client Tester
Comprehensive testing and interactive verification protocol for the Sanad Flutter client including unit, widget, E2E, and agent-driven UI testing through the Dart VM Service.
component-creation
Step-by-step workflow for creating accessible, tested UI components. Use when the user asks to create a new UI component.
dart-sdk-changelog
Expert guide and lookup reference for the Dart SDK CHANGELOG, version history, experimental features, macros, and augmentations from Dart 1.x to modern Dart 3.x. Use this skill whenever the user asks "what's new in Dart X", "what's new in 3.13", "what's new in 3.12", asks how to find the minimum SDK version (minSdk)…
flutter-sdk-changelog
Expert guide and lookup reference for Flutter framework versions, widget deprecations, API replacements, Material 3 migrations, and the unbundling of standalone materialui and cupertinoui packages from Flutter 1.0 to modern Flutter (3.44+ / 3.47+). Use this skill whenever the user asks "what's new in Flutter X"…
iterate-agent-harness
Turn an agent failure—premature stop, false completion, gamed check, missed file, broken handoff—into a durable rule/skill/hook/CI guard plus regression test. Use when "the agent stopped early again", "it gamed the test", or "add a guard so this doesn't recur". App bugs → workflow-fix-and-ship.