Security

Flutter Master

Try it

Comprehensive Flutter & Dart mobile development skill — use for ANY Flutter task, not just when explicitly asked for "best practices" or an "audit". Trigger whenever the user mentions Flutter, Dart, pubspec.yaml, widgets, BLoC/Riverpod/Provider/GetX, .dart files, or mobile app architecture, etc.

What it does

A deep, opinionated toolkit for building, reviewing, and auditing Flutter applications to a professional standard. This skill is intentionally thorough — Flutter has a huge surface area (widgets, state management schools, platform channels, build pipelines, store requirements), and mediocre Flutter…

The skill document

Flutter Master

A deep, opinionated toolkit for building, reviewing, and auditing Flutter applications to a professional standard. This skill is intentionally thorough — Flutter has a huge surface area (widgets, state management schools, platform channels, build pipelines, store requirements), and mediocre Flutter code often looks fine while quietly accumulating performance, maintainability, and security debt. The goal is to catch that debt before it ships.

How to use this skill

Flutter work generally falls into one of four modes. Identify which mode you're in first, since that determines which reference files matter.

  1. Auditing an existing project → go to Project Audit Workflow below, then pull in reference files as findings surface.
  2. Building something new (feature, screen, app) → skim references/architecture.md and references/code-style.md before writing code, so the first draft is already idiomatic instead of needing a rewrite.
  3. Fixing a specific problem (performance, a bug, a crash, jank) → jump straight to the relevant reference file (see table below).
  4. Pre-release / shippingreferences/release-checklist.md.

Don't try to hold all reference files in your head at once — they exist precisely so you only load what's relevant to the task in front of you. Read a reference file when its topic becomes relevant, not preemptively.

TopicReference file
Folder structure, layering, Clean Architecture, feature-first vs layer-firstreferences/architecture.md
BLoC/Cubit, Riverpod, Provider, GetX — when to use which, common mistakesreferences/state-management.md
Effective Dart, naming, null safety, immutability, formatting, lintingreferences/code-style.md
Jank, rebuilds, const, ListView performance, images, isolates, startup timereferences/performance.md
Unit/widget/integration/golden tests, mocking, coveragereferences/testing.md
Secrets, secure storage, obfuscation, cert pinning, permissionsreferences/security.md
App signing, obfuscation flags, store metadata, versioning, CI/CDreferences/release-checklist.md
Accessibility (a11y), localization (i10n/l10n), responsive/adaptive layoutreferences/ux-quality.md
The full audit checklist itself (used by the workflow below)references/audit-checklist.md

A bundled script, scripts/audit_scan.sh, automates the mechanical parts of an audit (running flutter analyze, flutter pub outdated, grepping for anti-patterns). Use it as a first pass — it's fast and objective — then layer human judgment on top using the reference files.

Project Audit Workflow

When asked to audit, review, or "check" a Flutter project — or when you're about to make non-trivial changes to an unfamiliar codebase and want to understand its health first — follow this sequence. Don't skip straight to opinions; ground them in what's actually in the repo.

Step 1 — Orient

flutter --version
cat pubspec.yaml
find lib -type f -name "*.dart" | wc -l

Confirm the Flutter/Dart SDK version, check pubspec.yaml for sdk: constraints, and get a rough sense of project size. A 15-file app and a 400-file app warrant very different depths of review — don't apply enterprise-architecture critique to a weekend prototype unless the user is trying to grow it into one.

Step 2 — Run the automated scan

bash /scripts/audit_scan.sh 

(`` is wherever this flutter-master skill directory is mounted, e.g. /mnt/skills/.../flutter-master.) This runs flutter analyze, dart format --set-exit-if-changed --output=none ., flutter pub outdated, and a battery of grep-based checks (print statements left in, hardcoded strings/colors, missing const, deprecated APIs, TODO/FIXME density, oversized files, missing error handling around async calls). It writes a plain-text report. Read the whole report before drawing conclusions — don't cherry-pick the first few findings.

Step 3 — Structural review

Open lib/ and evaluate against references/architecture.md:

  • Is there a discoverable, consistent structure (feature-first or layer-first), or does it look ad hoc?
  • Is business logic separated from widgets, or is everything crammed into build() methods and StatefulWidgets?
  • Is there a single, consistent state-management approach, or a mix of three different ones fighting each other?
  • Are there god-files (a single main.dart with 2000 lines, a single HomePage doing everything)?

Step 4 — State management review

Cross-check against references/state-management.md. Look specifically for: setState calls buried deep in widget trees that should be lifted or replaced; providers/blocs that leak (dispose() not called, StreamSubscriptions never cancelled); business logic living inside widget classes instead of notifiers/blocs/controllers; unnecessary rebuilds from context reads that are too broad (e.g. context.watch on a whole object when only one field is needed).

Step 5 — Performance pass

Cross-check against references/performance.md. Prioritize by user-visible impact: janky scrolling (missing const, expensive build() work, ListView instead of ListView.builder for long lists) matters more than micro-optimizations. Check image handling (are large images being decoded at full resolution for thumbnail-sized widgets?) and startup time (heavy synchronous work in main() before runApp).

Step 6 — Testing & quality gates

Cross-check against references/testing.md. Is there any test coverage at all? Are tests actually exercising logic, or are they trivial smoke tests? Is there a CI pipeline running flutter analyze and flutter test on every PR, or does quality depend entirely on manual review?

Step 7 — Security & data handling

Cross-check against references/security.md. This is the one category where issues are often silent until exploited, so give it real attention even in a quick audit: hardcoded API keys/secrets committed to the repo, sensitive data in SharedPreferences instead of secure storage, missing certificate pinning for apps handling sensitive data, overly broad permission requests, debug logging of sensitive info (tokens, PII) that ships to production builds.

Step 8 — Synthesize findings

Don't just dump a checklist back at the user. Produce a prioritized report:

  1. Critical — will cause crashes, data loss, security exposure, or store rejection.
  2. High-impact — visible performance/UX problems, architectural issues that will slow the team down as the app grows.
  3. Polish — style/lint issues, minor inconsistencies.

For each finding, name the file/line where possible, explain why it matters (not just "this is bad practice"), and give a concrete fix — ideally a code snippet, not just a description. A good audit teaches, it doesn't just grade. If the project is small or early-stage, calibrate: don't recommend a full Clean Architecture rewrite for a 10-screen MVP unless the user is planning to scale it — mention the tradeoff and let them decide (see references/audit-checklist.md for a full severity-tagged checklist to work from).

General principles when writing or editing Flutter code

  • Null safety is non-negotiable. Never suggest ! (force-unwrap) as a fix for a null-safety error without first checking whether the null case is actually reachable and should be handled properly.
  • Prefer composition over configuration. Small, focused widgets extracted into their own classes/methods beat giant parameterized build() methods — this is also what makes const and selective rebuilds possible.
  • Every StatefulWidget with a controller, stream subscription, or animation controller needs a dispose() that cleans it up. This is one of the most common Flutter memory leaks; check for it every time you touch lifecycle code.
  • Don't fight the state management library the project already uses. If it's BLoC, don't introduce Provider for one feature "because it's simpler" — consistency is worth more than local convenience. Flag inconsistency as an audit finding rather than silently adding to it.
  • Async code needs error handling. A bare await someFuture() with no try/catch and no error UI is a silent-failure trap. At minimum, surface errors to the user or log them.
  • Always sanity-check the target Flutter/Dart version before recommending an API — Flutter's APIs move fast (e.g. Material 3 is now default, some older widgets are deprecated). If uncertain about current API surface or a package's latest version, use web search rather than relying on training data, since Flutter/pub.dev packages update frequently.

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván854 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Query and manage Linear issues, projects, teams, cycles, labels, and comments through a managed OAuth GraphQL endpoint.

by byungkyu518 installs18 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván555 installs18 stars

More from anjasta-tarigan

Browse all skills

Use this skill whenever the user wants to build, refine, or review a production-grade user interface with Tailwind CSS v4 and shadcn/ui. Triggers include: building a landing page, dashboard, auth flow, admin panel, marketing site, SaaS UI, or any React/Next.js component or page.

by anjasta-tarigan2 installs

Build a complete, production-ready masterplan for a new project/system from scratch (0 to 100%).

by anjasta-tarigan1 installs

Execute/build/implement a project strictly from an existing masterplan (the output of masterplan-builder, typically at docs/masterplan/masterplan.md in the project directory). Use whenever the user wants to start or continue actually building a project that has a masterplan — e.g. "build this", "imp

by anjasta-tarigan1 installs

Use this skill whenever the user wants to build a production-grade UI with native/vanilla CSS — no Tailwind, no CSS-in-JS, no utility framework. Triggers include: plain Vite + HTML/CSS projects, static sites, simple landing pages, or any project explicitly avoiding a CSS framework.

by anjasta-tarigan1 installs

Initialize a brand-new monorepo project in an empty (or near-empty) folder. Use when the user wants to "set up a monorepo", "scaffold a project", or "bootstrap a repo with multiple packages/apps".

by anjasta-tarigan1 installs

Detects and removes "AI slop" — the formulaic vocabulary, sentence structures, sycophantic openers/closers, over-formatting (bullet walls, bold spam, needless headers), and code anti-patterns (over-engineering, swallowed errors, hallucinated APIs, dead code) that make writing or code read as generic

by anjasta-tarigan1 installs