dart-add-unit-test

The dart-add-unit-test skill provides a structured workflow and guidelines for writing, organizing, and executing unit tests in Dart and Flutter projects using the package:test library.

8.9K
Installs
5
Use cases
5/10
Quality

Is dart-add-unit-test safe to install?

Review the source first

Review the source first: our audit of dart-add-unit-test's source files found 5 shell commands, 0 external URLs, file reads and writes (high risk). Every command and URL listed appears verbatim in the skill's source. The skill instructs the agent to execute shell commands for running tests and generating mock files, which involves local file system interaction and command execution.

How we audit skills: our security review methodology.

Who is this skill for?

Dart and Flutter developers who need to implement unit tests for functions, methods, and classes.

What can you do with it?

  • Creating new unit tests for Dart functions and classes.
  • Organizing test files to mirror the lib directory structure.
  • Implementing asynchronous tests using async and await.
  • Configuring mock objects with mockito for dependency injection testing.
  • Executing test suites via the command line.

How good is this skill?

Quality score: 5/10. The skill provides clear, actionable instructions and code examples for testing workflows. It adheres to standard Dart testing practices.

What does the skill file contain?

SKILL.md
# Testing Dart and Flutter Applications

## Contents
- [Structuring Test Files](#structuring-test-files)
- [Writing Tests](#writing-tests)
- [Executing Tests](#executing-tests)
- [Test Implementation Workflow](#test-implementation-workflow)
- [Examples](#examples)

## Structuring Test Files
Organize test files to mirror the `lib` directory structure to maintain predictability.

* Place all test code within the `test` directory at the root of the package.
* Append `_test.dart` to the end of all test file names (e.g., `lib/src/utils.dart` should be tested in `test/src/utils_test.dart`).
* If wri...

Frequently asked questions

Where should I place my test files?

Place all test code within the test directory at the root of the package, using the _test.dart suffix for file names.

Which library does this skill use for testing?

The skill uses package:test for standard Dart applications and package:flutter_test for Flutter applications.

How do I handle dependencies in my tests?

Use package:mockito alongside package:test to generate mock objects and configure fixed scenarios.

Data sourced from dart-lang/skills on GitHub. Install counts from skills.sh. The summary and security audit are derived from the skill's source files: every command and URL listed appears verbatim in the source.

Related skills

agent-browser

506.7K

AI agents and developers requiring programmatic web interaction, exploratory testing, or automation of Electron desktop applications

The agent-browser CLI provides browser automation for AI agents using Chrome or Chromium via CDP. It supports page navigation, form interaction, data extraction, and testing. The tool utilizes accessibility-tree snapshots and element references for interaction.

highbrowser-automationclivercel-labs

skill-creator

301.8K

Users who want to create, edit, or optimize AI agent skills, ranging from those new to coding to experienced developers

The skill-creator provides a structured workflow for developing, testing, and refining AI agent skills. It guides users through intent capture, skill drafting, iterative evaluation using subagents, and performance benchmarking.

highdevelopmenttestinganthropics

writing-plans

174.7K

Software engineers and AI agents tasked with implementing complex features from specifications

The writing-plans skill generates structured, task-based implementation plans for software development projects. It enforces a specific markdown format that includes architecture, tech stack, global constraints, and granular, test-driven development steps for each task.

mediumdevelopmentplanningobra

convex-quickstart

78.3K

Developers and AI agents building applications with Convex who need to initialize projects or integrate Convex into existing codebases

This skill automates the setup and configuration of Convex in new or existing web applications. It handles project scaffolding, environment variable generation, provider wiring, and local deployment provisioning.

highconvexbackendget-convex