Agent skill

Flutter Drift

by MADTeacher in MADTeacher/mad-agents-skills

Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI…

MITAuto-check passedMobile

Install Flutter Drift

skills CLI
$ npx skills add MADTeacher/mad-agents-skills --skill flutter-drift -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MADTeacher/mad-agents-skills flutter-drift --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MADTeacher/mad-agents-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/flutter-drift .claude/skills/flutter-drift && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-drift
GitHub stars
110
Token cost
~1.6k tokens
SKILL.md length
702 words
Files
8 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI…

  • Works in 7 steps: Inspect the app before editing → Add or verify dependencies with package… → Create or update the database entry point → …
  • A Flutter task mentions drift
  • SKILL.md covers Core Workflow, Resource Routing, Required API Rules and Fallbacks, plus 1 more section
  • Calls dart and flutter

What it does

Flutter Drift is an agent skill from MADTeacher/mad-agents-skills. Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, buildrunner, driftdev make-migrations, migration tests, or Flutter-specific database setup…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/flutter-ui.md`, `references/migrations.md` and `references/queries.md`).

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter, Dart and SQLite. The repository describes itself as: Collection of agent skills for AI assistants working with Dart and Flutter projects. The licence is MIT.

When your agent uses it

  • A Flutter task mentions drift
  • Local database storage
  • Reactive database streams
  • Driftdev make-migrations

Example prompts

  • “/flutter-drift”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the app before editing
  2. Add or verify dependencies with package commands instead of hardcoding versions
  3. Create or update the database entry point
  4. Keep Drift calls scoped to the database object
  5. Generate code after changing Drift declarations
  6. For schema changes in an existing app, use Drift's guided migration workflow
  7. Validate before finishing

What it can do on your machine

Read from SKILL.md and the folder at commit 2fb67e3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dart
    • flutter

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flutter Drift loads about 1.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 141 tokens; SKILL.md has 702 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~141
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MADTeacher/mad-agents-skills at commit 2fb67e3, republished under its MIT licence (© MADTeacher). 702 words, ~1,636 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-drift/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
flutter-drift
description
Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, drift_flutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, build_runner, drift_dev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.
metadata.author
Stanislav [MADTeacher] Chernyshev
metadata.version
1.1

Flutter Drift

Use this skill to add or repair Drift-based local persistence in Flutter apps. The skill is an operating workflow: inspect the target app first, choose only the relevant reference files, implement with current Drift APIs, and validate generated code.

Core Workflow

  1. Inspect the app before editing:
    • Check pubspec.yaml, existing database files, build.yaml, state management package, target platforms, and tests.
    • Prefer the app's current architecture and naming over the examples in this skill.
  2. Add or verify dependencies with package commands instead of hardcoding versions:
    • dart pub add drift drift_flutter path_provider dev:drift_dev dev:build_runner
    • Add provider or flutter_riverpod only when the app already uses it or the user asks for that integration.
  3. Create or update the database entry point:
    • Define tables in Dart or .drift files.
    • Add the tables to @DriftDatabase.
    • Open Flutter databases with driftDatabase from package:drift_flutter/drift_flutter.dart unless the project needs a custom executor.
  4. Keep Drift calls scoped to the database object:
    • Use database.select(database.todoItems), database.into(database.todoItems), database.update(database.todoItems), and database.delete(database.todoItems) from widgets, services, and repositories.
    • Use bare select(todoItems) only inside GeneratedDatabase subclasses or DatabaseAccessor classes where the methods and table getters are in scope.
  5. Generate code after changing Drift declarations:
    • Run dart run build_runner build.
    • Treat generator errors as blockers, not optional cleanup.
  6. For schema changes in an existing app, use Drift's guided migration workflow:
    • Configure drift_dev databases in build.yaml.
    • Run dart run drift_dev make-migrations before and after schema changes as needed.
    • Bump schemaVersion, write generated step-by-step migrations, and run generated migration tests.
  7. Validate before finishing:
    • Run dart format on edited Dart files.
    • Run flutter analyze or dart analyze for the package.
    • Run targeted tests, including generated migration tests when migrations changed.

Resource Routing

  • Read references/setup.md when adding Drift, opening a database, configuring web support, or sharing a database across isolates.
  • Read references/tables.md when defining tables, columns, defaults, keys, indexes, constraints, generated columns, or strict tables.
  • Read references/queries.md when implementing selects, filters, sorting, pagination, joins, aggregations, subqueries, custom columns, or unions.
  • Read references/writes.md when implementing inserts, updates, deletes, upserts, companions, transactions, or batch operations.
  • Read references/streams.md when implementing reactive Drift streams, StreamBuilder, StreamProvider, custom select streams, table update listeners, or manual stream invalidation.
  • Read references/migrations.md when schemaVersion, existing user data, build.yaml, make-migrations, generated schema files, or migration tests are involved.
  • Read references/flutter-ui.md when wiring Drift data into Flutter widgets with Provider, Riverpod, StreamBuilder, search, filtering, pagination, or user-facing loading and error states.
Show full SKILL.md (305 more words)Show less

Required API Rules

  • Do not call select(database.table) as a top-level function from a widget. Use database.select(database.table) outside database classes.
  • Do not use watch(...), todoUpdates(...), or notifyTableUpdates(...). Use customSelect(...).watch(), tableUpdates(...), and notifyUpdates(...).
  • Do not call delete(table).go(id). Add a where clause and then call go(), or use generated table extension helpers if the project already uses them.
  • Do not use batch.updateAll(...) or pass raw ids to batch.delete(...). Use batch.update(..., where: ...), batch.delete(...) with an insertable row, or batch.deleteWhere(...).
  • Do not mix Provider and Riverpod APIs. Provider.of<AppDatabase>(context) belongs to provider; Provider<AppDatabase>((ref) { ... }) and AsyncValue.when(...) belong to Riverpod.
  • Do not bump schemaVersion without a migration plan for existing databases.
  • Do not rely on raw SQLite writes when UI streams must update. Use Drift write APIs or call notifyUpdates with explicit TableUpdate metadata.

Fallbacks

  • If package downloads are blocked, update source files and leave exact dart pub add or flutter pub add commands for the user, then state that dependency resolution was not validated.
  • If a project cannot run build_runner, do not hand-write generated *.g.dart files. Fix source declarations and report the generator blocker.
  • If migration state is unclear, stop before changing schemaVersion; ask for the current released schema history or database files.
  • If web support is required but sqlite3.wasm and drift_worker.js are missing, add the code path and explicitly report the required web assets.

Validation Checklist

  • pubspec.yaml contains Drift runtime and generator dependencies.
  • Database files have valid part directives, table declarations, @DriftDatabase, constructor, and schemaVersion.
  • All query and write examples are scoped to the correct database/accessor context.
  • Generated code was rebuilt with build_runner.
  • Flutter UI examples handle loading, empty, error, and data states without treating AsyncValue as a List.
  • Migrations changed only with generated schema snapshots, step-by-step migration code, and tests.
  • flutter analyze or dart analyze passes for the edited package, or any remaining analyzer failure is reported with the blocker.

© MADTeacher, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in flutter-drift of MADTeacher/mad-agents-skills.

  • SKILL.md
  • references/flutter-ui.md
  • references/migrations.md
  • references/queries.md
  • references/setup.md
  • references/streams.md
  • references/tables.md
  • references/writes.md

Open the folder on GitHubat commit 2fb67e3

Compare with similar skills

Flutter Drift next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flutter Drift compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Drift this skillMADTeacher/mad-agents-skills110—~1.6kAutomated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Flutter Cherry Pickflutter/flutter179k—~1.8kAutomated safety check: PassBSD-3-Clause
Upgrade Browserflutter/flutter179k—~1.1kAutomated safety check: PassBSD-3-Clause
Bump Dartflutter/flutter179k—~1.2kAutomated safety check: PassBSD-3-Clause
Run Devicelab With Ledflutter/flutter179k—~786Automated safety check: PassBSD-3-Clause

Similar skills

  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    179k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Bump Dart

    flutter/flutter

    Do not trigger automatically; only run when a user runs /bump-dart.

    179k GitHub stars~1.2k tokensUpdated today
    MobileAuto-check passed
  • Run Devicelab With Led

    flutter/flutter

    Run DeviceLab tests for Flutter PRs using LUCI's led CLI tool.

    179k GitHub stars~786 tokensUpdated today
    MobileAuto-check passed
  • Shepherd PRs

    flutter/flutter

    Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI.

    179k GitHub stars~1.7k tokensUpdated today
    MobileAuto-check passed

More from MADTeacher/mad-agents-skills

All 11 skills in this repo
  • Flutter Internationalization

    MADTeacher/mad-agents-skills

    Add, fix, audit, and maintain Flutter internationalization with gen-l10n, ARB files, AppLocalizations, flutterlocalizations, intl formatting, plural/select messages, RTL support, locale-specific…

    110 GitHub stars~1.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Flutter Networking

    MADTeacher/mad-agents-skills

    Implement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request headers, timeouts, retries, JSON parsing…

    110 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Agents Md Generator

    MADTeacher/mad-agents-skills

    Create, generate, update, repair, trim, or split minimal AGENTS.md files for repository roots and confirmed nested modules using progressive disclosure.

    110 GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Dart Drift

    MADTeacher/mad-agents-skills

    Build, fix, audit, and migrate Drift persistence in Dart CLI, server-side, and non-Flutter desktop apps.

    110 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Flutter Duit Bdui

    MADTeacher/mad-agents-skills

    Integrate, fix, review, migrate, test, or debug Duit / flutterduit backend-driven UI in Flutter applications.

    110 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Flutter Testing

    MADTeacher/mad-agents-skills

    Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins.

    110 GitHub stars~1.5k tokensUpdated 5 mo ago
    Auto-check passed

Categories

Questions about Flutter Drift

What does Flutter Drift do?

Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI…. Flutter Drift is an agent skill from MADTeacher/mad-agents-skills. Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing.

When should I use Flutter Drift?

Flutter Drift fits situations like: A Flutter task mentions drift; local database storage; reactive database streams; driftdev make-migrations.

How do I install Flutter Drift in Claude Code?

Run `npx skills add MADTeacher/mad-agents-skills --skill flutter-drift -a claude-code`. Or copy the skill folder (flutter-drift in MADTeacher/mad-agents-skills) into .claude/skills/flutter-drift in your project. Claude Code loads it when a task matches its description.

How do I install Flutter Drift in Codex?

Run `npx skills add MADTeacher/mad-agents-skills --skill flutter-drift -a codex`. Or copy the skill folder (flutter-drift in MADTeacher/mad-agents-skills) into .agents/skills/flutter-drift in your project. Codex loads it when a task matches its description.

Can I use Flutter Drift in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MADTeacher/mad-agents-skills --skill flutter-drift -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-drift, .gemini/skills/flutter-drift, .github/skills/flutter-drift and .opencode/skills/flutter-drift in your project.

What does Flutter Drift need to run?

Going by SKILL.md and its folder, Flutter Drift needs the command-line tools its instructions call (dart and flutter).

Does Flutter Drift access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Flutter Drift safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flutter Drift use?

Flutter Drift is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter Drift use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Flutter Drift?

Skills that share tags, products or a category with Flutter Drift: Engine Whats New (flutter/flutter, 179k stars), Flutter Cherry Pick (flutter/flutter, 179k stars), Upgrade Browser (flutter/flutter, 179k stars) and Bump Dart (flutter/flutter, 179k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Drift?

MADTeacher (a GitHub user) maintains it in MADTeacher/mad-agents-skills, which has 110 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on May 1, 2026.

Source: MADTeacher/mad-agents-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.