setup-project

A setup checklist for running a Dart and Flutter project locally. It explains that a monorepo keeps multiple packages and applications in one repository.

In plain words
What is it for?
Use it when setting up the project, running it locally, or troubleshooting missing tools, dependencies, or emulators.
Why use it?
It replaces guesswork about SDK versions, dependencies, emulators, and first-time setup with verified checks.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/abhinav503/flutter-agentic/setup-project
Clone the repo
git clone --depth 1 https://github.com/abhinav503/flutter-agentic

Made for: Cursor.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.01113
Opus 5 $0.00012 $0.00557
Sonnet 5 $0.00005 $0.00223
Haiku 4.5 $0.00002 $0.00111

Measured 2d ago against content hash 4e93dfbc0e4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-project 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 2d 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.

.cursor/rules/setup-project.mdc · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup Project Checklist

Check every prerequisite needed to run this Flutter project locally, then show the user a checklist with the status of each item.

Monorepo note: this is a Dart pub-workspace monorepo (packages/core + apps/*). One flutter pub get at the repo root resolves every package; make targets are run from the root. After cloning, the canonical first-time setup is make setup (installs git hooks + root flutter pub get). The root has no runnable app — apps live under apps/<app>/.

What to check

Run these checks using terminal/shell tools. Never assume — always verify the actual state.

1. Flutter SDK

  • Run flutter --version — capture the version string
  • Check that the Flutter version meets the environment.sdk constraint in the root pubspec.yaml
  • If Flutter is not installed or the wrong version: ❌ — tell the user to install Flutter from https://docs.flutter.dev/get-started/install

2. Dart SDK

  • Confirm Dart version from dart --version
  • Cross-check against environment.sdk in the root pubspec.yaml

3. Dependencies

  • Check if pubspec.lock exists at the repo root
  • If missing: automatically run flutter pub get at the repo root (resolves the whole workspace — never run it inside an app folder) and report it as fixed, not as an error
  • Show ✅ after it completes successfully, ❌ if it fails

4. Code generation

  • Scan packages/core/lib/ and every apps/*/lib/ for part '*.freezed.dart' and part '*.g.dart' declarations whose target files don't exist on disk
  • If any are missing: automatically run make gen (regenerates core + each app) and report it as fixed
  • Show ✅ after it completes successfully, ❌ if it fails
  • Do not ask the user — just run it and report the outcome

5. Git hooks

  • Check if git config core.hooksPath is set to .githooks (set up by make setup)
  • Check if .githooks/pre-commit is executable (-x permission)

6. Available run targets

  • Run flutter devices — list all currently visible targets
  • Report each device/simulator/emulator found as ✅
  • If no Android target is found: ⚠️ — "No Android emulator detected"
  • If on macOS and no iOS target found: ⚠️ — "No iOS simulator detected"
  • If no targets at all: ❌

Read the full file on GitHub · 104 lines

Changes

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.

  1. 2d ago First seen · 104 lines · 24 tokens per session scan A 4e93dfbc0e4e

Subscribe to this mod's changes

setup-project is a cursor rule published in the GitHub repository abhinav503/flutter-agentic (10 stars, last pushed 9d ago), licensed MIT. It adds 24 tokens to every session and 1,113 once invoked, about $0.0001 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-31.