flutter-hot-reload

flutter-hot-reload is a cursor rule for Cursor from flutter/agent-plugins. It costs 0 tokens per session (287 once invoked), scanned A, original, BSD-3-Clause.

A rule that connects to a running Dart or Flutter app and reloads it after relevant source files change.

In plain words
What is it for?
It helps refresh Flutter apps after edits under the lib directory, choosing a reload or restart based on the kind of change.
Why use it?
It shortens the feedback loop by showing code changes in the running app without manually restarting it every time.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

About the project

Flutter Agent Plugins is a collection maintained by the Flutter team that extends coding agents with Flutter-specific skills, rules, MCP configuration, and bundled workflows. Flutter developers use it to help agents perform tasks such as testing and building widget previews. The catalogue entries are components of these agent plugins.

flutter/agent-plugins · 2,907 stars · on GitHub

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/flutter/agent-plugins/flutter-hot-reload
Clone the repo
git clone --depth 1 https://github.com/flutter/agent-plugins

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flutter-hot-reload

README.md
[![agentmods](https://agentmods.dev/badge/rules/flutter/agent-plugins/flutter-hot-reload.svg)](https://agentmods.dev/rules/flutter/agent-plugins/flutter-hot-reload)
Your own site
<a href="https://agentmods.dev/rules/flutter/agent-plugins/flutter-hot-reload"><img src="https://agentmods.dev/badge/rules/flutter/agent-plugins/flutter-hot-reload.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 287 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.1 $0.00000 $0.00287
Opus 5 $0.00000 $0.00143
Sonnet 5 $0.00000 $0.00057
Haiku 4.5 $0.00000 $0.00029

Measured 2d ago against content hash 7481f83e07bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

flutter-hot-reload 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.

rules/flutter-hot-reload.mdc · 21 lines

What it actually says

Proactive Flutter Hot Reload Rule

Whenever you edit or modify any .dart file under lib/ in this project:

  1. When to Skip:

    • Files Outside lib/: Only trigger hot reload or hot restart for edits under lib/. Do not trigger when modifying files in other directories (e.g., test/**, integration_test/**, benchmark/**, test_driver/** or example/**).
    • Comments & Documentation: Do not trigger hot reload or hot restart when changes only affect comments, docstrings, or whitespace.
  2. Discover & Connect:

    • Discover active running application instances using the dtd MCP tool (or list_running_apps / vm_service) from the Dart MCP server.
  3. Trigger Hot Reload / Hot Restart:

    • Execute the hot_reload MCP tool immediately after making changes to UI widgets (including build methods of stateful widgets) or simple methods.
    • Execute the hot_restart MCP tool if fundamental logic, state initialization (e.g., initState), global/static state, or main() was modified.
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 · 21 lines · 0 tokens per session scan A 7481f83e07bf

Subscribe to this mod's changes

flutter-hot-reload is a cursor rule published in the GitHub repository flutter/agent-plugins (2,907 stars, last pushed 3d ago), licensed BSD-3-Clause. It costs nothing until one of its globs matches a file; then it loads 287 tokens. 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-09-03.