flutter-drift

flutter-drift is a skill for Claude Code, Codex from MADTeacher/mad-agents-skills. It costs 111 tokens per session (1,401 once invoked), scanned A, original, MIT.

A development guide for Drift, a Flutter library that stores app data in SQLite databases. It covers typed Dart queries, generated database code, user-interface data streams, writes, transactions, migrations, and testing.

In plain words
What is it for?
Use it to inspect a Flutter app, define database tables, configure Drift dependencies, connect database results to the UI, perform writes and transactions, migrate schemas, and test local storage.
Why use it?
It helps developers add or repair local data storage while fitting the database into an existing Flutter app’s structure. It also addresses the extra setup needed for different platforms and database versions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect a Flutter app, define database tables, configure Drift dependencies, connect database results to the UI, perform writes and transactions, migrate schemas, and test local storage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madteacher/mad-agents-skills/flutter-drift
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.

Any agent
npx skills add MADTeacher/mad-agents-skills --skill flutter-drift
Clone the repo
git clone --depth 1 https://github.com/MADTeacher/mad-agents-skills

Made for: Claude Code, Codex.

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-drift

README.md
[![agentmods](https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/flutter-drift/github.svg)](https://agentmods.dev/skills/madteacher/mad-agents-skills/flutter-drift)
Your own site
<a href="https://agentmods.dev/skills/madteacher/mad-agents-skills/flutter-drift"><img src="https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/flutter-drift/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flutter-drift

Your own site · 80×15
<a href="https://agentmods.dev/skills/madteacher/mad-agents-skills/flutter-drift"><img src="https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/flutter-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,401 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 2 May 2026
  • Snyk pass 2 May 2026
How audits are shown
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.00111 $0.01401
Opus 5 $0.00056 $0.00700
Sonnet 5 $0.00022 $0.00280
Haiku 4.5 $0.00011 $0.00140

Measured 11d ago against content hash c8939af45bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

flutter-drift 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 11d 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.

flutter-drift/SKILL.md · 76 lines

How it starts

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

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.

Read the full file on GitHub · 76 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 76 lines · 111 tokens per session scan A c8939af45bca

Subscribe to this mod's changes

flutter-drift is a skill published in the GitHub repository MADTeacher/mad-agents-skills (108 stars, last pushed 4mo ago), licensed MIT. It adds 111 tokens to every session and 1,401 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

firebase-database

Use when syncing real-time data, structuring JSON trees, reading/writing, creating listeners, enabling offline persistence, managing presence, sharding, or writing security rules.

evanca/flutter-ai-rules · 38 tokens

persisting-data-with-drift

Implements type-safe reactive SQL persistence in Flutter using Drift v2.32 (formerly Moor) built on SQLite with automatic code generation. Activates when defining table schemas with Drift DSL, writing type-safe join or subquery operations, handling schema migrations with MigrationStrategy, using reactive watch()…

Poorgramer-Zack/dart-expert-skills · 136 tokens

managing-hive-storage

Hive CE (Community Edition v2.19.x) NoSQL object database for Flutter providing blazing-fast key-value and object storage with TypeAdapters. Use this skill when implementing offline-first architecture, high-performance local data caching, NoSQL document-style object stores, custom TypeAdapter serialization for complex…

Poorgramer-Zack/dart-expert-skills · 146 tokens

flutter-db

Local database and persistence selection for Flutter including SharedPreferences, SecureStorage, Hive, and Drift. Use when implementing offline storage, encrypted data persistence, or choosing between key-value and relational local databases.

Poorgramer-Zack/dart-expert-skills · 42 tokens

at_client_skills-sdk

Use this skill when a developer is building a Dart or Flutter app that depends on atclient or atclientflutter from pub.dev, stores or shares data via the Atsign Protocol, needs onboarding (CRAM new-atsign, atKeys file, keychain, APKAM) or APKAM enrollment, or asks about AtCollection , CItem , Query , sub-collections…

atsign-foundation/at_client_sdk · 232 tokens

signals-hooks

Comprehensive reactive state hooks for integration with flutterhooks.

rodydavis/signals.dart · 14 tokens