Cursor rules for Flutter

Flutter Cursor rules that hold up in production

Cursor is the most popular AI editor for Flutter, but without project rules it invents its own architecture. This page covers what good Flutter cursorrules contain and how Flutter Agent Kit ships them ready-made.

What are Flutter cursorrules?

A cursorrules file is Cursor's project instruction file. Older Cursor releases read a single .cursorrules file in the repository root, and newer ones read .mdc files under .cursor/rules. Either way, the file tells Cursor how to write code for that project: which state management to use, where files live and which patterns to avoid.

For Flutter the stakes are higher than for most ecosystems, because the framework leaves architecture open. A cursorrules file that names Riverpod v3, GoRouter and feature-first folders removes the guesswork, so Cursor stops reaching for Bloc, Provider or a type-first layout it learned somewhere else.

The limitation is portability. A .cursorrules file only works in Cursor. The moment you open the same project in Claude Code or opencode, the rules are gone. That is the gap the AGENTS.md standard closes, and why the kit ships AGENTS.md as the primary layer with Cursor reading it directly.

Why Cursor needs rules for Flutter

Cursor is a general-purpose editor. When it opens a Flutter project with no instructions, it falls back on its training data: Bloc where you use Riverpod, freezed where you use plain Dart models, a type-first folder layout where your project is feature-first.

Each invention is small on its own. Over weeks of agent-driven development they compound into a codebase with three state management patterns and inconsistent conventions, which is exactly the mess the agent was supposed to prevent.

What good Flutter Cursor rules contain

  • Stack decisions: State management, routing, HTTP and model conventions stated once, so Cursor never re-decides them per task.
  • Directory conventions: Where features live, where services go, what a feature folder contains.
  • Patterns to avoid: Explicit negative rules (no direct http calls in widgets, no codegen) steer the agent more than positive ones.
  • Setup and process: How to run the app, how commits are structured, so the agent does not improvise workflow.

Cursor rules vs the AGENTS.md standard

Cursor supports .cursorrules and .mdc files, which work but tie your rules to one editor. AGENTS.md is the open standard that Cursor, Claude Code, opencode, GitHub Copilot and Gemini all read.

Flutter Agent Kit ships AGENTS.md as the primary context layer, so the same discipline follows you whether you edit in Cursor today and try Claude Code tomorrow. Last verified: September 2026.

How Flutter Agent Kit handles Cursor rules

  • AGENTS.md always loaded: Cursor reads the project rules on every task without you prompting for them.
  • Feature skills on demand: When you build auth, paywalls, push or AI chat, the matching skill gives Cursor a proven step-by-step path.
  • On-demand docs: Deep reference material for architecture, data, services, UI, conventions and setup is pulled in only when needed, keeping context lean.

Frequently asked questions

Does Flutter Agent Kit include .cursorrules?

The kit ships AGENTS.md as the agent-agnostic context layer, which Cursor reads directly. This means the same rules work if you also use Claude Code, opencode, GitHub Copilot or Gemini, instead of maintaining editor-specific rule files.

Can I use these rules with an existing Flutter project?

The rules are written for the kit's template architecture. For an existing project, the AGENTS.md structure shows you what to document: stack decisions, directory conventions, patterns to avoid and setup process.

Do rules slow Cursor down?

No. AGENTS.md is a single markdown file read with the task. The kit keeps heavy reference material in on-demand docs so the always-loaded context stays small.

Get Flutter Agent Kit

Flutter Agent Kit ships an AGENTS.md file the agent always loads, on-demand docs and feature skills, so the setup above comes preconfigured for €99.99 one-time with lifetime updates.