Agent skill
flutter-code-quality
Flutter code quality: linting, DCM, analysis_options.yaml, static analysis. Use when setting up code standards or fixing analysis warnings.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/flutter-code-quality
SKILL.md
Flutter Code Quality
Comprehensive guide for maintaining code quality in Flutter through linting and static analysis.
Quick Reference
flutter analyze --no-fatal-infos
dart format --set-exit-if-changed lib test
dart run build_runner build --delete-conflicting-outputs
analysis_options.yaml
include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
- "lib/core/generated/**"
language:
strict-casts: true
strict-inference: true
linter:
rules:
# Error Prevention
avoid_print: true
cancel_subscriptions: true
close_sinks: true
prefer_const_constructors: true
prefer_final_fields: true
unawaited_futures: true
# Style
always_declare_return_types: true
prefer_single_quotes: true
require_trailing_commas: true
Common Fixes
prefer_const_constructors
// BAD
Text('Hello')
// GOOD
const Text('Hello')
cancel_subscriptions
@override
void dispose() {
_subscription.cancel();
super.dispose();
}
unawaited_futures
// Explicit fire-and-forget
unawaited(fetchData());
Related Skills
- flutter-development: General patterns
- flutter-testing: Test patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?