Best for
- Use when writing Dart code, reviewing for style, refactoring naming, adding doc comments, structuring imports, or enforcing type annotations.
evanca/flutter-ai-rules/skills/effective-dart/SKILL.md
Use when writing Dart code, reviewing for style, refactoring naming, adding doc comments, structuring imports, or enforcing type annotations.
Decision brief
This skill defines how to write idiomatic, high-quality Dart and Flutter code following Effective Dart guidelines.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/evanca/flutter-ai-rules --skill "skills/effective-dart"Inspect the Agent Skill "effective-dart" from https://github.com/evanca/flutter-ai-rules/blob/b294a77b68b5508f8d3151fb93d87ed9622d2ff1/skills/effective-dart/SKILL.md at commit b294a77b68b5508f8d3151fb93d87ed9622d2ff1. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Use whereType() to filter a collection by type.
When reviewing Dart code for Effective Dart compliance, the agent should check:
Capitalize acronyms and abbreviations longer than two letters like words: HttpRequest, not HTTPRequest.
Use class modifiers (final, sealed, interface, base, mixin) to control whether a class can be extended or implemented.
Format code with dart format — don't manually format.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 83/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 604 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
This skill defines how to write idiomatic, high-quality Dart and Flutter code following Effective Dart guidelines.
| Kind | Convention | Example |
|---|---|---|
| Classes, enums, typedefs, type parameters, extensions | UpperCamelCase | MyWidget, UserState |
| Packages, directories, source files | lowercase_with_underscores | user_profile.dart |
| Import prefixes | lowercase_with_underscores | import '...' as my_prefix; |
| Variables, parameters, named parameters, functions | lowerCamelCase | userName, fetchData() |
HttpRequest, not HTTPRequest.E (element), K/V (key/value), T/S/U (generic types).get; prefer removing get and using a getter when the API conceptually exposes a property.final, sealed, interface, base, mixin) to control whether a class can be extended or implemented.dynamic instead of letting inference fail.Future<void> as the return type of async members that do not produce values.// Prefer: explicit class modifier
final class AppConfig {
final String apiUrl;
final int timeout;
const AppConfig({required this.apiUrl, required this.timeout});
}
// Prefer: sealed for exhaustive pattern matching
sealed class Result<T> {}
class Success<T> extends Result<T> { final T value; Success(this.value); }
class Failure<T> extends Result<T> { final Exception error; Failure(this.error); }
dart format .
dart format — don't manually format.final over var when variable values won't change.const for compile-time constants.src directory of another package.lib./lib/ or ../ in import paths.final.const if the class supports it.// Adjacent string concatenation (not +)
final greeting = 'Hello, '
'world!';
// Collection literals
final list = [1, 2, 3];
final map = {'key': 'value'};
// Initializing formals
class Point {
final double x, y;
Point(this.x, this.y);
}
// Empty constructor body
class Empty {
Empty(); // not Empty() {}
}
// rethrow to preserve stack trace
try {
doSomething();
} catch (e) {
log(e);
rethrow;
}
whereType<T>() to filter a collection by type.var and final on local variables.hashCode if you override ==; ensure == obeys mathematical equality rules.on SomeException catch (e) instead of broad catch (e) or .catchError handlers./// Returns the sum of [a] and [b].
///
/// Throws [ArgumentError] if either value is negative.
int add(int a, int b) { ... }
/// doc comments — not /* */ block comments — for types and members.[identifier] in doc comments to refer to in-scope identifiers.group and descriptive test names:import 'package:test/test.dart';
void main() {
group('CartService', () {
late CartService cart;
setUp(() => cart = CartService());
test('addItem increases item count', () {
cart.addItem(Product(id: '1', name: 'Widget', price: 9.99));
expect(cart.items, hasLength(1));
});
test('removeItem decreases total price', () {
final product = Product(id: '1', name: 'Widget', price: 9.99);
cart.addItem(product);
cart.removeItem(product.id);
expect(cart.totalPrice, equals(0.0));
});
});
}
testWidgets and WidgetTester:import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('LoginButton shows loading indicator when tapped',
(WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp(home: LoginScreen()));
await tester.tap(find.byType(ElevatedButton));
await tester.pump();
expect(find.byType(CircularProgressIndicator), findsOneWidget);
});
}
When reviewing Dart code for Effective Dart compliance, the agent should check:
final, sealed, or interface is used where appropriate./// doc comments with a single-sentence summary.dart format --output=none --set-exit-if-changed . to verify formatting.dart analyze and confirm zero issues.Alternatives
mgiovani/cc-arsenal
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r
dotnet/skills
Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling. USE FOR: adding new API endpoints (controllers or minimal APIs), wiring up OpenAPI/Swagger, creating .http test files, setting up global error handling middleware. DO NOT USE FOR: general C# coding style, EF Core data access or query optimization (use optimizing-ef-core-queries), frontend/Blazor work, gRPC services, or SignalR hubs.
AI-Unified-Process/marketplace
Reverse-engineers an existing software project into AI Unified Process artifacts: a PlantUML use case diagram, per-use-case specification documents, and an entity model with a Mermaid ER diagram. Use when the user asks to "reverse engineer this codebase", "extract use cases from existing code", "document the system we already have", "generate use case specs from controllers", "derive an entity model from the database", "create AIUP artifacts from a legacy project", or mentions reverse engineerin
Jeffallan/claude-skills
Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentication flows, set up async SQLAlchemy database operations, add JWT authentication, build WebSocket endpoints, or generate OpenAPI documentation. Trigger terms: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python.