madteacher/flutter-drift
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.
npx skills add https://github.com/MADTeacher/mad-agents-skills --skill 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.
pubspec.yaml, existing database files, build.yaml, state management package, target platforms, and tests.dart pub add drift drift_flutter path_provider dev:drift_dev dev:build_runnerprovider or flutter_riverpod only when the app already uses it or the user asks for that integration..drift files.@DriftDatabase.driftDatabase from package:drift_flutter/drift_flutter.dart unless the project needs a custom executor.database.select(database.todoItems), database.into(database.todoItems), database.update(database.todoItems), and database.delete(database.todoItems) from widgets, services, and repositories.select(todoItems) only inside GeneratedDatabase subclasses or DatabaseAccessor classes where the methods and table getters are in scope.dart run build_runner build.drift_dev databases in build.yaml.dart run drift_dev make-migrations before and after schema changes as needed.schemaVersion, write generated step-by-step migrations, and run generated migration tests.dart format on edited Dart files.flutter analyze or dart analyze for the package.schemaVersion, existing user data, build.yaml, make-migrations, generated schema files, or migration tests are involved.select(database.table) as a top-level function from a widget. Use database.select(database.table) outside database classes.watch(...), todoUpdates(...), or notifyTableUpdates(...). Use customSelect(...).watch(), tableUpdates(...), and notifyUpdates(...).delete(table).go(id). Add a where clause and then call go(), or use generated table extension helpers if the project already uses them.batch.updateAll(...) or pass raw ids to batch.delete(...). Use batch.update(..., where: ...), batch.delete(...) with an insertable row, or batch.deleteWhere(...).Provider.of<AppDatabase>(context) belongs to provider; Provider<AppDatabase>((ref) { ... }) and AsyncValue.when(...) belong to Riverpod.schemaVersion without a migration plan for existing databases.notifyUpdates with explicit TableUpdate metadata.dart pub add or flutter pub add commands for the user, then state that dependency resolution was not validated.build_runner, do not hand-write generated *.g.dart files. Fix source declarations and report the generator blocker.schemaVersion; ask for the current released schema history or database files.sqlite3.wasm and drift_worker.js are missing, add the code path and explicitly report the required web assets.pubspec.yaml contains Drift runtime and generator dependencies.part directives, table declarations, @DriftDatabase, constructor, and schemaVersion.build_runner.AsyncValue as a List.flutter analyze or dart analyze passes for the edited package, or any remaining analyzer failure is reported with the blocker.Take madteacher/flutter-drift from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.