CtrlK
BlogDocsLog inGet started
Tessl Logo

dart-generate-test-mocks

Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`. Use when unit testing classes that depend on complex external services like APIs or databases.

74

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

85%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The content is well-structured, concise, and workflow-driven with a strong feedback loop, but the flagship code example contains a part-vs-import directive error that prevents it from compiling as written.

Suggestions

In the test example, replace `import 'api_service_test.mocks.dart';` with `part 'api_service_test.mocks.dart';` (and add the matching `part of` in the generated file) so the `@GenerateNiceMocks` annotation precedes a part directive and the code compiles.

In the workflow checklist step 4, recommend the `part` directive specifically for `.mocks.dart` rather than offering '`part` or `import`', since the generated mocks file is a part file and `import` will fail.

Add a one-line note that `@GenerateNiceMocks`/`MockSpec` annotations must sit directly above the `part` directive, to prevent the misplacement shown in the example.

DimensionReasoningScore

Conciseness

The body is lean action-oriented bullets and executable code without explaining concepts Claude already knows (e.g., what Dart or libraries are); every section earns its place.

3 / 3

Actionability

Most guidance is concrete with specific commands and API calls, but the example is not fully executable as written: `@GenerateNiceMocks([...])` precedes an `import` of a `.mocks.dart` file, which should be a `part` directive since generated mocks are part files, so the code will not compile.

2 / 3

Workflow Clarity

A 10-step numbered checklist plus an explicit 'Feedback Loop: Test Failures' (run validator, review errors, fix, repeat) provides a clear sequence with validation checkpoints and error recovery.

3 / 3

Progressive Disclosure

No bundle files exist; the single SKILL.md is well-organized with a table of contents and anchor navigation and no nested external references, satisfying the simple-skill organization bar.

3 / 3

Total

11

/

12

Passed

Description

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is concise, specific, and complete with an explicit use-when trigger and a clear Dart mocking niche. It uses correct third-person voice and avoids vague fluff.

DimensionReasoningScore

Specificity

Names two concrete actions ('Define and generate mock objects') plus the specific tools (mockito, build_runner), matching the multiple-specific-actions anchor rather than the partial-actions level 2.

3 / 3

Completeness

Explicitly answers both 'what' (define and generate mock objects for external dependencies) and 'when' via an explicit 'Use when...' trigger clause, so it is not capped at 2.

3 / 3

Trigger Term Quality

Includes natural user-facing terms ('unit testing', 'APIs', 'databases', 'mock objects') that a user would plausibly say, giving good coverage rather than only jargon.

3 / 3

Distinctiveness Conflict Risk

Targets a clear Dart-specific niche (mockito + build_runner) with distinct triggers, making overlap with other skills unlikely.

3 / 3

Total

12

/

12

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

Repository
flutter/agent-plugins
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.