flutter-coding-rules

A collection of coding rules for Flutter and Dart projects, covering source files, comments, data types, errors, visibility, and formatting. Flutter is a toolkit for building apps, while Dart is its programming language.

In plain words
What is it for?
Use it when writing, changing, or reviewing Dart code, including data objects, enums, exceptions, comments, file layout, visibility annotations, and analyzer fixes.
Why use it?
It keeps Dart changes consistent with the project's conventions and helps catch issues through the analyzer and formatter. It also directs the agent to the relevant rule documents for each kind of change.

Skill for Claude CodeCodex

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 skills/eaglesakura/agent-skills/flutter-coding-rules
Any agent
npx skills add eaglesakura/agent-skills --skill flutter-coding-rules
Clone the repo
git clone --depth 1 https://github.com/eaglesakura/agent-skills

Made for: Claude Code, Codex.

Per session 233 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 953 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.00233 $0.00953
Opus 5 $0.00117 $0.00477
Sonnet 5 $0.00047 $0.00191
Haiku 4.5 $0.00023 $0.00095

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

Security

Grade A, and why

flutter-coding-rules 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.

packages/flutter/.apm/skills/flutter-coding-rules/SKILL.md · 61 lines

What it actually says

Flutter & Dart コーディング規約

*.dart を書く・直すときは、この SKILL の規約と、文脈に合う参照ドキュメントに従う。 レイヤー設計そのものは flutter-layered-architecture-* 側が主で、本 SKILL は言語・ファイル・コメント・定番パターンの土台である。

いつ使うか

  • Dart の新規実装・修正・レビュー指摘の反映
  • データオブジェクト / Delegate / enum / 例外の定義・catch / 可視性 / ファイルレイアウト / コメント

作業手順

  1. 変更対象の種類を特定する(DTO、Delegate、enum、コメントのみ、など)
  2. 下表から必要な references/(と snippets)をロードする
  3. 規約に沿って実装する
  4. Analyzer / Formatter で検証する
  5. 解析エラーの直し方に迷ったら fix-error を読む

文脈に応じたドキュメントのロード

参照 使うとき
クラス作成テンプレート データオブジェクト等のひな形が欲しいとき
data_object DTO / data class / 構造体的な型
delegate-pattern Delegate による責務分離
code_comment ドキュメントコメント・Example
code_internal @internal / @visibleForTesting / @protected
dart_file_layout ファイル名・1クラス1ファイル・library・配置
enum enum・dot-shorthands・switch 網羅
try-catch 例外処理・Error/Exception の catch
exception-definition 独自 Exception / Error の定義(message / cause / stackTrace / toString)
fix-error Analyzer / よくある修正の手順

必要な参照だけ読む。全部を一度にロードしない。

他 SKILL との境界

  • 画面の MVVM: flutter-layered-architecture-screen-mvvm
  • Usecase / Repository 設計: flutter-layered-architecture-design-patterns
  • アプリ起動・DTD デバッグ: flutter-app-debug

ナレッジベース

DO: プロジェクト規定のコマンド prefix を付ける

  • mise / fvm 等がある場合はそのルールに従う(例: flutter ...
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 · 61 lines · 233 tokens per session scan A 2f5ba0e158de

Subscribe to this mod's changes

flutter-coding-rules is a skill published in the GitHub repository eaglesakura/agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 233 tokens to every session and 953 once invoked, about $0.0012 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.