create-test

create-test is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 44 tokens per session (1,131 once invoked), scanned A, original, MIT.

A process for writing unit and widget tests in Flutter projects, with test files mirroring the application’s source folders. It uses Mockito to create stand-ins for external services and dependencies.

In plain words
What is it for?
Use it to create and run Dart tests for Flutter code, including tests that mock infrastructure or external clients.
Why use it?
It gives tests a consistent location and structure and explains how to generate the mock objects they need.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create and run Dart tests for Flutter code, including tests that mock infrastructure or external clients.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anoopsg/agent_rules/create-test
Install

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.

Any agent
npx skills add anoopsg/agent_rules --skill create-test
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for create-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-test/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/create-test)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-test"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-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.

agentmods 80×15 button for create-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-test"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01131
Opus 5.5 $0.00018 $0.00452
Sonnet 5.5 $0.00009 $0.00226
Haiku 4.5 $0.00004 $0.00113

Measured 22d ago against content hash f0bc7631369d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-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 22d 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.

src/exclusive/skills/create-test/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Skill

This skill defines the process for writing and running unit and widget tests in the project.

1. Directory Structure

Test files must mirror the lib/src/ directory hierarchy under test/:

lib/src/
└── features/
    └── auth/
        └── _self/
            └── data/
                └── auth_repository.dart

test/src/
└── features/
    └── auth/
        └── _self/
            └── data/
                └── auth_repository_test.dart

All test files must end with the _test.dart suffix. Internal packages have their own test/ folder (e.g. packages/app_ui/test/).

1.1 Test Configuration

test/flutter_test_config.dart runs before every app test and registers the dart_mappable mappers, as the app does at startup. Never register mappers inside a test, and never replace this file — extend it (e.g. for Alchemist, see the flutter-golden-testing skill).

2. Mocking Guidelines

  • Mocking Tool: Use the mockito package for mocking repositories and external client dependencies.
  • Generator: Annotate test files with @GenerateMocks to auto-generate mocks using build_runner.
  • Mock Dependencies, Not the Subject: List the dependencies of the class under test (e.g. ApiClient for a repository, the repository for a notifier), never the class itself.

2.1 Generating Mocks Example

Annotate your test file's main() method with the dependencies to mock. A repository test mocks the single ApiClient (in lib/src/infrastructure/api/), which returns feature models as Result. Mockito can't build a Result on its own, so register a dummy for each Result type the mock returns:

import 'package:flutter_test/flutter_test.dart';
import 'package:framework/framework.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:<project_name>/src/features/features.dart';
import 'package:<project_name>/src/infrastructure/infrastructure.dart';

// Import the generated mock file (ends with .mocks.dart)
import 'notifications_repository_test.mocks.dart';

@GenerateMocks([ApiClient])
void main() {
  provideDummy<Result<int, Failure>>(const Ok(0));

  // Test code goes here
}

Read the full file on GitHub · 146 lines

Changes

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.

  1. 22d ago Changed · +40 lines · +16 tokens per session f0bc7631369d
  2. 1mo ago Changed · +4 lines 21ab554a4fec
  3. 3mo ago First seen · 102 lines · 28 tokens per session scan A 603807dd0ffb

Subscribe to this mod's changes

create-test is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 44 tokens to every session and 1,131 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

create-test compared with skills from other repositories

create-test next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-testanoopsg/agent_rulesSkill223d agoMITA44Claude Code, Codex
laravel-testingAsyrafHussin/agent-skillsSkill111todayMITA62Claude Code, Codex
testing-best-practicesAsyrafHussin/agent-skillsSkill111todayMITA58Claude Code, Codex
refactoring-guruciembor/agent-rules-booksSkill3.4k2mo agoMITA29Claude Code, Codex
refactoringciembor/agent-rules-booksSkill3.4k2mo agoMITA20Claude Code, Codex
working-effectively-with-legacy-codeciembor/agent-rules-booksSkill3.4k2mo agoMITA37Claude Code, Codex
zod-testinganivar/zod-testingSkill28d agoMITA148Claude Code, Codex