id: "dart-generate-test-mocks"
kind: "skill"
name: "dart-generate-test-mocks"
title: "Dart Generate Test Mocks"
description: "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."
category: "testing"
source:
  repository: "dart-lang/skills"
  path: "skills/dart-generate-test-mocks/SKILL.md"
  commit: "f84b16872b5d186f4e877511b49b93c204a1c4ef"
  url: "https://github.com/dart-lang/skills/tree/f84b16872b5d186f4e877511b49b93c204a1c4ef/skills/dart-generate-test-mocks"
license:
  spdx: "BSD-3-Clause"
  from: "repository"
  redistributable: true
stars: 560
updated_at: "2026-11-16T22:26:36Z"
score: 0.8385
rank: 165
files_count: 1
bytes: 6339
has_scripts: false
trust_level: "unreviewed"
reviewed_by: "eval-v1"
source_tier: "official"
eval:
  version: "eval-v1"
  date: "2026-11-21T10:39:12Z"
  model: "claude-sonnet-5-5"
  score: 0.8385
  signals:
    tier: 1.0
    rubric: 1.0
    judge: 0.7867
    smoke: "not_run"
    popularity: 0.506
  rubric:
    score: 1.0
    trigger: 1.0
    scope: 1.0
    safety: 1.0
    injection: 1.0
    references: 1.0
    license: 1.0
    risky: []
    broken_references: []
  judge:
    trigger: 4
    scope: 5
    instructions: 4
    safety: 5
    injection: 5
    references: 5
    overall: 7
    verdict: "feature"
    rationale: "Focused on one job: mockito mocks with build_runner in Dart. It gives concrete commands, a clear checklist, a troubleshooting loop, and a full example. It includes the useful thenAnswer-for-Future rule and recommends GenerateNiceMocks. Weaknesses: the example puts the annotation directly above an import, which is awkward and wrong for the part/import form. The note that thenReturn throws ArgumentError is slightly loose. No injection or safety concerns, and no external references."
  smoke:
    status: "not_run"
requires:
  tools: []
  runtimes: []
  network: false
  mcp: []
compat:
  - client: "claude-code"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "codex-cli"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "cursor"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "gemini-cli"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "vscode-copilot"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "opencode"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "claude-desktop"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "chat-mcp"
    status: "full"
    reasons: ["ok"]
    source: "derived"
files:
  - path: "SKILL.md"
    bytes: 6339
    sha256: "ca58b0e0d045595aa99990715bbf48fc75b1c5dca4053bc1940ef289cbcf2f00"
    url: "https://raw.githubusercontent.com/dart-lang/skills/f84b16872b5d186f4e877511b49b93c204a1c4ef/skills/dart-generate-test-mocks/SKILL.md"
alternates:
  - name: "dart-generate-test-mocks"
    repository: "flutter/agent-plugins"
    path: "skills/dart-generate-test-mocks/SKILL.md"
    commit: "ff6d472ee66dbed566c4500edee460c94fde0a02"
    url: "https://github.com/flutter/agent-plugins/tree/ff6d472ee66dbed566c4500edee460c94fde0a02/skills/dart-generate-test-mocks"
    license: "BSD-3-Clause"
    stars: 3199
    score: 0.7093
    similarity: 1.0
    reason: "identical content"
icon: "https://versatile.sh/avatars/dart-lang.png"
