Agent skill

Mocktail

by evanca in evanca/flutter-ai-rules

A skill your agent uses when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).

MITAuto-check passedMobile

Install Mocktail

skills CLI
$ npx skills add evanca/flutter-ai-rules --skill mocktail -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evanca/flutter-ai-rules mocktail --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mocktail .claude/skills/mocktail && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mocktail
GitHub stars
649
Token cost
~828 tokens
SKILL.md length
269 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).

  • Works in 7 steps: Mock vs. Fake vs. Real Object → Creating Mocks → Registering Fallback Values → …
  • Stubbing methods
  • SKILL.md covers 1. Mock vs. Fake vs. Real Object, 2. Creating Mocks, 3. Registering Fallback Values and 4. Stubbing, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mocktail is an agent skill from evanca/flutter-ai-rules. Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.

When your agent uses it

  • Stubbing methods
  • Verifying interactions
  • Registering fallback values
  • Choosing between mocks

Example prompts

  • “/mocktail”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Mock vs. Fake vs. Real Object
  2. Creating Mocks
  3. Registering Fallback Values
  4. Stubbing
  5. Named Parameters
  6. Verification
  7. Argument Matchers

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mocktail loads about 828 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~828

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 269 words, ~828 tokens.

Download SKILL.mdSave it as .claude/skills/mocktail/SKILL.md (or your agent's skills folder).
name
mocktail
description
Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).
license
MIT

Mocktail Skill

This skill defines how to correctly use the mocktail package for mocking in Dart and Flutter tests.


1. Mock vs. Fake vs. Real Object

UseWhen
Real objectPrefer 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.
  • Never add @override methods or implementations to a class extending Mock.
  • Only use mocks if your test has verify assertions; otherwise prefer real or fake objects.

2. Creating Mocks

dart
class MockMyService extends Mock implements MyService {}
class FakeMyEvent extends Fake implements MyEvent {}

No code generation required — unlike Mockito, Mocktail uses noSuchMethod at runtime.


3. Registering Fallback Values

Register fallback values before using custom types with argument matchers. Do this in setUpAll or at the top of your test:

dart
setUpAll(() {
  registerFallbackValue(FakeMyEvent());
});
  • Required for non-nullable custom types used with any(), captureAny(), or captureThat().
  • Register fallback values for any custom type used with argument matchers.

4. Stubbing

dart
final mock = MockMyService();

// Return a value
when(() => mock.fetchData()).thenReturn('result');

// Throw an error
when(() => mock.fetchData()).thenThrow(Exception('error'));

// Dynamic/async response
when(() => mock.fetchData()).thenAnswer((_) async => 'result');

// Future<void>
when(() => mock.doWork()).thenAnswer((_) async {});
  • Always stub async methods (returning Future or Future<void>) with thenAnswer.
  • Stub every method you expect to be called, even if it's not the focus of your test.

5. Named Parameters

Always include all named parameters in both when and verify calls. Use any(named: 'paramName') for those you don't care about:

dart
when(() => mock.fetch(
  id: any(named: 'id'),
  headers: any(named: 'headers'),
)).thenReturn(response);
  • If a method has default values for named parameters, Mocktail still expects them all to be matched.

6. Verification

dart
verify(() => mock.fetchData());             // called at least once
verifyNever(() => mock.fetchData());        // never called
verify(() => mock.fetchData()).called(2);   // called exactly twice

7. Argument Matchers

dart
// Any positional argument
when(() => mock.process(any())).thenReturn(true);

// Capture arguments for later assertions
final captured = verify(() => mock.process(captureAny())).captured;
print(captured.last);
  • Use any() for positional parameters when you don't care about the exact value.
  • Use captureThat() for conditional capturing.
  • When matching string output, be aware of what .toString() returns for the type.

References

© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/mocktail of evanca/flutter-ai-rules.

Open the folder on GitHubat commit 7b9cce2

Compare with similar skills

Mocktail next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mocktail compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mocktail this skillevanca/flutter-ai-rules649—~828Automated safety check: PassMIT
React Native Best Practicesvercel-labs/openreview1.7k17 repos~1.1kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.1k2 repos~1.5kAutomated safety check: PassMIT
Kortix Brandkortix-ai/suna20k—~4kAutomated safety check: PassCustom licence
Ip As LogoKartikLabhshetwar/better-shot2.4k1 repos~4.3kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0

Similar skills

  • React Native Best Practices

    vercel-labs/openreview

    Official

    A prioritized rule set for React Native and Expo apps covering list performance, animation, navigation, UI patterns, state, rendering, monorepos and configuration.

    1.7k GitHub starsUsed in 17 repos~1.1k tokens
    MobileAuto-check passed
  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.1k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • Kortix Brand

    kortix-ai/suna

    Load FIRST for anything that carries the Kortix look or voice: product or mobile UI, copy of any kind, decks, social, images, email, CLI output, anything with the logo, and reviews of these.

    20k GitHub stars~4k tokensUpdated today
    MobileAuto-check passed
  • Ip As Logo

    KartikLabhshetwar/better-shot

    Generate extremely simple, cute, personified square character images with rounded heavy forms, two purposeful character colors, one solid background color, and a dominant lower-corner composition.

    2.4k GitHub starsUsed in 1 repo~4.3k tokens
    MobileAuto-check passed
  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Aso Appstore Screenshots

    adamlyttleapps/claude-skill-aso-appstore-screenshots

    Generate high-converting App Store screenshots by analyzing your app's codebase, discovering core benefits, and creating ASO-optimized screenshot images using Nano Banana Pro.

    1.8k GitHub starsUsed in 1 repo~9.6k tokens
    MobileAuto-check passed

More from evanca/flutter-ai-rules

All 37 skills in this repo
  • Code Review

    evanca/flutter-ai-rules

    A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.

    649 GitHub stars~2.4k tokensUpdated 24 days ago
    Auto-check passed
  • Developing Genkit Dart

    evanca/flutter-ai-rules

    A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.

    649 GitHub stars~961 tokensUpdated 24 days ago
    Auto-check passed
  • Generate Images With Firebase AI

    evanca/flutter-ai-rules

    A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…

    649 GitHub stars~2.3k tokensUpdated 24 days ago
    Auto-check passed
  • Flutter Use Column Row First

    evanca/flutter-ai-rules

    A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.

    649 GitHub stars~1.3k tokensUpdated 24 days ago
    Auto-check passed
  • Architecture Feature First

    evanca/flutter-ai-rules

    A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

    649 GitHub stars~1.9k tokensUpdated 24 days ago
    Auto-check passed
  • Bloc

    evanca/flutter-ai-rules

    A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…

    649 GitHub stars~2.8k tokensUpdated 24 days ago
    Auto-check passed

Categories

Questions about Mocktail

What does Mocktail do?

A skill your agent uses when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail). Mocktail is an agent skill from evanca/flutter-ai-rules. Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).

When should I use Mocktail?

Mocktail fits situations like: stubbing methods; verifying interactions; registering fallback values; choosing between mocks.

How do I install Mocktail in Claude Code?

Run `npx skills add evanca/flutter-ai-rules --skill mocktail -a claude-code`. Or copy the skill folder (skills/mocktail in evanca/flutter-ai-rules) into .claude/skills/mocktail in your project. Claude Code loads it when a task matches its description.

How do I install Mocktail in Codex?

Run `npx skills add evanca/flutter-ai-rules --skill mocktail -a codex`. Or copy the skill folder (skills/mocktail in evanca/flutter-ai-rules) into .agents/skills/mocktail in your project. Codex loads it when a task matches its description.

Can I use Mocktail in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill mocktail -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mocktail, .gemini/skills/mocktail, .github/skills/mocktail and .opencode/skills/mocktail in your project.

What does Mocktail need to run?

SKILL.md names no scripts, command-line tools or credentials: Mocktail is instructions for the agent only.

Does Mocktail access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Mocktail safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mocktail use?

Mocktail is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mocktail use?

About 828 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mocktail?

Skills that share tags, products or a category with Mocktail: React Native Best Practices (vercel-labs/openreview, 1.7k stars), Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.1k stars), Kortix Brand (kortix-ai/suna, 20k stars) and Ip As Logo (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mocktail?

evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 649 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.

Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.