Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add sutchan/Agent-Skills-Hub --skill dart-add-unit-testgit clone --depth 1 https://github.com/sutchan/Agent-Skills-HubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sutchan/agent-skills-hub/dart-add-unit-test)<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/dart-add-unit-test"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/dart-add-unit-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/dart-add-unit-test"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/dart-add-unit-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.01083 |
| Opus 5.5 | $0.00009 | $0.00433 |
| Sonnet 5.5 | $0.00005 | $0.00217 |
| Haiku 4.5 | $0.00002 | $0.00108 |
Grade A, and why
dart-add-unit-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
91% identical to dart-add-unit-test — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Dart and Flutter Applications
Contents
Structuring Test Files
Organize test files to mirror the lib directory structure to maintain predictability.
- Place all test code within the
testdirectory at the root of the package. - Append
_test.dartto the end of all test file names (e.g.,lib/src/utils.dartshould be tested intest/src/utils_test.dart). - If writing integration tests, place them in an
integration_testdirectory at the root of the package.
Writing Tests
Utilize package:test as the standard testing library for Dart applications.
- Import
package:test/test.dart(orpackage:flutter_test/flutter_test.dartfor Flutter). - Group related tests using the
group()function to provide shared context. - Define individual test cases using the
test()function. - Validate outcomes using the
expect()function alongside matchers (e.g.,equals(),isTrue,throwsA()). - Write asynchronous tests using standard
async/awaitsyntax. The test runner automatically waits for theFutureto complete. - Manage test setup and teardown using
setUp()andtearDown()callbacks. - If testing code that relies on dependency injection, use
package:mockitoalongsidepackage:testto generate mock objects, configure fixed scenarios, and verify interactions.
Executing Tests
Select the appropriate test runner based on the project type and test location.
- If working on a pure Dart project, execute tests using the
dart testcommand. - If working on a Flutter project, execute tests using the
flutter testcommand. - If running integration tests, explicitly specify the directory path, as the default runner ignores it:
dart test integration_testorflutter test integration_test.
Test Implementation Workflow
Follow this sequential workflow when implementing new test suites. Copy the checklist to track your progress.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +1 lines e85b8a46e200
- 1mo ago Changed · +2 lines · -16 tokens per session f81f0bfac2ac
- 2mo ago Changed · -4 lines · +16 tokens per session 02428fa20c2c
- 2mo ago First seen · 127 lines · 23 tokens per session scan A 87fdd081d9ed
dart-add-unit-test is a skill published in the GitHub repository sutchan/Agent-Skills-Hub (3 stars, last pushed 6d ago), licensed MIT. It adds 23 tokens to every session and 1,083 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to dart-add-unit-test, differing in 11 lines, and is treated as a copy.
dart-add-unit-test compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dart-add-unit-testsutchan/Agent-Skills-Hub | Skill | 3 | 6d ago | MIT | A | 23 | Claude Code, Codex |
| raw-sql-querybuilder-testing-patternsshennawardana23/skillme | Skill | 4 | 1mo ago | Apache-2.0 | A | 87 | Claude Code |
| tdd-workflowshennawardana23/skillme | Skill | 4 | 1mo ago | Apache-2.0 | A | 92 | Claude Code |
| test-generationshennawardana23/skillme | Skill | 4 | 1mo ago | Apache-2.0 | A | 69 | Claude Code |
| receiving-code-reviewobra/superpowers | Skill | 330k | 2d ago | MIT | A | 38 | Claude Code |
| skill-authoringmateaix/mateclaw | Skill | 1.2k | 3d ago | Apache-2.0 | A | 18 | Claude Code, Codex |
| skill-index-updaterluongnv89/asm | Skill | 976 | today | MIT | B | 59 | Claude Code |