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 lh17708357536-gif/flutter-cn-overseas-app-skills --skill flutter-testinggit clone --depth 1 https://github.com/lh17708357536-gif/flutter-cn-overseas-app-skillsWrote 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/lh17708357536-gif/flutter-cn-overseas-app-skills/flutter-testing)<a href="https://agentmods.dev/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/flutter-testing"><img src="https://agentmods.dev/badge/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/flutter-testing/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/lh17708357536-gif/flutter-cn-overseas-app-skills/flutter-testing"><img src="https://agentmods.dev/badge/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/flutter-testing.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.00114 | $0.04408 |
| Opus 5 | $0.00057 | $0.02204 |
| Sonnet 5 | $0.00023 | $0.00882 |
| Haiku 4.5 | $0.00011 | $0.00441 |
Grade A, and why
flutter-testing 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flutter + NestJS 测试规范 Skill
适用于多区域 Flutter + NestJS 项目的测试基线。所有
<PLACEHOLDER>替换为项目实际值。本 skill 与 CI 强绑定:测试写完必须进 CI 门禁才有意义,CI 矩阵见
~/.claude/skills/ci-cd-github-actions/SKILL.md。多区域项目最易漏测的就是 flavor 条件编译(第 6 节),必看。
1. 测试金字塔与原则
╱╲ e2e(少)—— 后端 supertest 打真实 HTTP + 测试库;关键业务链路
╱──╲
╱widget╲ widget(中)—— 页面渲染 / 交互 / 空态 / 加载态
╱────────╲
╱ unit ╲ unit(多)—— Notifier 业务逻辑 / util / Service 纯逻辑
╱────────────╲
该测 / 不该测:
- ✅ 必测:业务规则(积分扣费/退款、多租户 where 过滤、切租户重置、语言归一)、flavor 工厂选择、错误分支(余额不足、越权、race 守卫)、数据映射(Freezed ↔ JSON)
- ✅ 建议测:关键 widget 的空态 CTA、加载骨架、向导 exit guard、i18n key 不缺失
- ❌ 不必测:纯 UI 布局像素(golden 覆盖即可)、第三方 SDK 内部、Freezed/json_serializable 生成代码、getter/setter
- ★ 禁止:为了覆盖率写无断言的假测试;测试里连真实生产后端 / 真实第三方 AI(用 mock)
2. Flutter 依赖与目录
pubspec.yaml dev_dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^1.0.0 # mock(不需要 codegen,优于 mockito)
golden_toolkit: ^0.15.0 # golden(可选)
network_image_mock: ^2.1.1 # widget 测试里拦截 CachedNetworkImage
目录(与 lib/ 镜像):
test/
├── unit/
│ ├── providers/ # Notifier / Provider 业务逻辑
│ ├── services/ # API service(mock Dio)
│ ├── utils/ # normalizeBusinessLanguageCode / date / locale
│ └── config/ # ★ flavor 工厂选择(第 6 节)
├── widget/ # 页面 / 组件渲染与交互
├── golden/ # golden 基准图
└── helpers/
├── pump_app.dart # 统一 pumpWidget(注入 ProviderScope + l10n + theme)
└── mocks.dart # 共享 mock 类
3. Notifier / Provider 单元测试(ProviderContainer + override)
核心模式:用 ProviderContainer + overrideWith 注入 mock 依赖,直接驱动 Notifier,不启 UI。
// test/unit/providers/credits_provider_test.dart
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:mocktail/mocktail.dart';
class MockCreditsApi extends Mock implements CreditsApiService {}
void main() {
late MockCreditsApi api;
setUp(() => api = MockCreditsApi());
ProviderContainer makeContainer() => ProviderContainer(
overrides: [creditsApiProvider.overrideWithValue(api)],
);
test('扣费成功后余额减少', () async {
when(() => api.consume(any(), any(), any()))
.thenAnswer((_) async => ConsumeResult(balance: 80));
final c = makeContainer();
addTearDown(c.dispose);
await c.read(creditsProvider.notifier).consume('A1', 'generate', 20);
expect(c.read(creditsProvider).balance, 80);
});
test('★ AI 调用失败必须触发退款(refundWithRetry)', () async {
when(() => api.consume(any(), any(), any()))
.thenAnswer((_) async => ConsumeResult(balance: 80));
when(() => api.callAI(any())).thenThrow(Exception('upstream 500'));
when(() => api.refundWithRetry(any(), any(), maxRetry: any(named: 'maxRetry')))
.thenAnswer((_) async {});
final c = makeContainer();
addTearDown(c.dispose);
await expectLater(
c.read(someToolProvider.notifier).generate(),
throwsA(isA<Exception>()),
);
// ★ 断言退款一定被调用一次(对应 _shared/rules.md §1 双保险)
verify(() => api.refundWithRetry(20, any(), maxRetry: 3)).called(1);
});
}
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.
- 12d ago First seen · 379 lines · 114 tokens per session scan A 06ab7559e5c4
flutter-testing is a skill published in the GitHub repository lh17708357536-gif/flutter-cn-overseas-app-skills (20 stars, last pushed 2mo ago), licensed MIT. It adds 114 tokens to every session and 4,408 once invoked, about $0.0006 per session on Opus 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-30.
Other skills, from other repositories
ios-testing
Testing patterns for Swift and SwiftUI apps.
mobile-testing
Android and JVM testing - JUnit5, MockK, Turbine for Flow, and Compose UI testing for unit, integration, and UI tests; also applies to KMP commonTest running on the JVM/Android target. For iOS/Swift tests (XCTest, Swift Testing, XCUITest) use ios-testing. For TDD methodology and the three-tier test model (fake-first…
Android Testing
JUnit + Robolectric unit tests, Compose UI tests, screenshot tests, and Espresso for legacy views.
android-testing
Android testing for AI agents. Use this skill whenever writing unit tests, integration tests, UI tests, ViewModel tests, Repository tests, DAO tests, Compose UI tests, Hilt testing, @HiltAndroidTest, TestCoroutineDispatcher, runTest, turbine Flow testing, MockK, Mockito, FakeRepository, Robolectric, Espresso, Compose…
testing
Use for Android unit tests, fake repositories, coroutine tests, Flow tests, Compose UI tests, instrumented tests, ADB-driven tests and Firebase Emulator tests.
android-ui-journey-testing
XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.