mcp_flutter / rules
Cursor rule385 starsChanged 5 months agoMITView on GitHub
You are a senior Dart programmer specializing in Flutter, Flame and Game development. Generate code adhering to: Generate concise, efficient code following these guidelines while maintaining existing project structure and conventions.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/app_architecture.guide.mdcCursor rule
- .cursor/rules/ask_file_by_file_actions.mdcCursor rule
- .cursor/rules/ask_follow_up.mdcCursor rule
- .cursor/rules/ask_step_by_step_plan.mdcCursor rule
- .cursor/rules/command_resource.pattern.mdCursor rule
- .cursor/rules/create_test_rule.mdcCursor rule
- .cursor/rules/dart_doc.mdcCursor rule
- .cursor/rules/dart_extension_type_const_models.mdcCursor rule
- .cursor/rules/faq_usage.mdcCursor rule
- .cursor/rules/flutter_ui_dev.mdcCursor rule
- .cursor/rules/key_design_decisions.mdcCursor rule
- .cursor/rules/mermaid_rule.mdcCursor rule
- .cursor/rules/steward.mdcCursor rule
- .cursor/rules/test_guide.mdcCursor rule
- .cursor/rules/test_use_tdd.mdcCursor rule
- .cursor/rules/think_hard.mdcCursor rule
- .cursor/rules/training.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
- .cursor/rules/writing_code_protocol.mdcCursor rule
- harness-engineering-lifecycleSkill
- mcp-harness-repo-maintainerSkill
- mixture-of-expertsSkill
- multi-agent-handoffSkill
- plugin-marketplace-setupSkill
- release-changelog-harnessSkill
- repository-governance-lifecycleSkill
- skill-authoring-lifecycleSkill
- skill-eval-improveSkill
- skill-source-citationsSkill
The file
Show its rules and text
We split this dart_dev.mdc into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use async / await instead of then
- Distinctive: line 15
Write precise, future-proof dartdoc comments that focus on the specific purpose
- Distinctive: line 17
Document relationships between related components
- Distinctive: line 18
Avoid scope limitations unless absolutely necessary
- Distinctive: line 19
Use {@template} for reusable component documentation
- Very specific: line 21
Document all parameters with ///
- Distinctive: line 22
Add warning comments for important usage notes
- Distinctive: line 45
Use required commas linter rule in dart
- Distinctive: line 46
Prefer arrow functions style for dart
- Distinctive: line 47
Prefer const constructors with named parameters with const values instead of nullable ones
- Very specific: line 61
Use common imports (lib/common_imports.dart)
- Distinctive: line 65
Write unit tests for business logic and widget tests for UI components
- Distinctive: line 67
Use [] when referencing code
- Distinctive: line 69
Use {@template} and {@macro} to create and use dart doc code snippets
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description:
globs: *.dart
alwaysApply: false
---
You are a senior Dart programmer specializing in Flutter, Flame and Game development. Generate code adhering to:
1. **Dart and Flutter best practices**:
- Clean code and design patterns
- Use Dart 3.7, Flutter 3.29
- Use async / await instead of then
2. **Enhanced Documentation**:
- Write precise, future-proof dartdoc comments that focus on the specific purpose
- Include cross-references to related classes and real usage examples
- Document relationships between related components
- Avoid scope limitations unless absolutely necessary
- Use {@template} for reusable component documentation
- Include practical code samples showing real usage patterns
- Document all parameters with `///`
- Add warning comments for important usage notes
- Reference concrete implementations in the codebase
```dart
/// {@template game_button}
/// Custom button widget for game interactions
/// {@endtemplate}
class GameButton extends StatelessWidget {
/// {@macro game_button}
const GameButton({
required this.onPressed,
this.icon,
super.key,
});
```
2. Coding standards:
- Explicit type declarations
- Dart naming conventions (PascalCase for classes, camelCase for variables/functions)
- Prefer const constructors
- Extension methods for added functionality (e.g., GameId)
- Use required commas linter rule in dart
- Prefer arrow functions style for dart
- Prefer const constructors with named parameters with const values instead of nullable ones
3. Flutter widgets and concepts:
- Dart 3.7 syntax for null safety, pattern matching, and more
- Appropriate use of StatelessWidget or Stateful widgets
- Custom reusable widgets (use ui_kit) instead of methods
- Cupertino or Material Design as appropriate
- Proper error handling and async/await for asynchronous operations
- flutter_animate for animations
4. Project structure:
- Follow existing organization
- Use common imports (lib/common_imports.dart)
5. Additional requirements:
- Implement routing using go_router
- Write unit tests for business logic and widget tests for UI components
- Implement proper form validation and user input handling
- Use [] when referencing code
- Generate readable, short, and concise documentation
- Use {@template} and {@macro} to create and use dart doc code snippets
Generate concise, efficient code following these guidelines while maintaining existing project structure and conventions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

