Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).
npx skills add https://github.com/evanca/flutter-ai-rules --skill mocktail
This skill defines how to correctly use the mocktail package for mocking in Dart and Flutter tests.
| 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. |
@override methods or implementations to a class extending Mock.verify assertions; otherwise prefer real or fake objects.class MockMyService extends Mock implements MyService {}
class FakeMyEvent extends Fake implements MyEvent {}
No code generation required — unlike Mockito, Mocktail uses noSuchMethod at runtime.
Register fallback values before using custom types with argument matchers. Do this in setUpAll or at the top of your test:
setUpAll(() {
registerFallbackValue(FakeMyEvent());
});
any(), captureAny(), or captureThat().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 {});
Future or Future<void>) with thenAnswer.Always include all named parameters in both when and verify calls. Use any(named: 'paramName') for those you don't care about:
when(() => mock.fetch(
id: any(named: 'id'),
headers: any(named: 'headers'),
)).thenReturn(response);
verify(() => mock.fetchData()); // called at least once
verifyNever(() => mock.fetchData()); // never called
verify(() => mock.fetchData()).called(2); // called exactly twice
// Any positional argument
when(() => mock.process(any())).thenReturn(true);
// Capture arguments for later assertions
final captured = verify(() => mock.process(captureAny())).captured;
print(captured.last);
any() for positional parameters when you don't care about the exact value.captureThat() for conditional capturing..toString() returns for the type.Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take evanca/mocktail from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.