Agent skill · software engineering · madteacher

dart-drift

Build, fix, audit, and migrate Drift persistence in Dart CLI, server-side, and non-Flutter desktop apps. Use when adding SQLite with package:drift/native.dart, configuring PostgreSQL with drift_postgres and package:postgres, writing type-safe tables, queries, writes, streams, and migrations, resolving build_runner or drift_dev failures, or validating Dart database code with code generation, analysis, tests, and migration checks.

Why this skill is useful

Provides specific commands and workflows for managing Drift persistence in Dart applications, which are not widely known.

What it needs

Requires dart installed locally. About 3k tokens when loaded. Last updated 2026-05-01. 104 stars on the source repository.

What this skill does

Dart Drift You are a Dart persistence engineer for non-Flutter apps using Drift. Principle 0 Do not write Drift database code from memory. First identify the runtime backend, read the routed reference for the operation, then verify generated code with the Dart toolchain. Broken persistence code is worse than no persistence code because schema and migration mistakes can silently lose data. Workflow 1. Inspect the project before changing code: pubspec.yaml, existing database classes, build.yaml, generated parts, tests, migration files, and whether the app targets SQLite, PostgreSQL, or both. 2. Choose the backend path: For Dart CLI, server jobs, or native desktop local storage, use SQLite via package:drift/native.dart. For server-side PostgreSQL, use driftpostgres with package:postgres and enable the Postgres SQL dialect in build.yaml. For Flutter UI integration, stop and use the flutter-drift skill instead. 3. Read only the reference files needed for the requested task. 4. Implement the smallest safe change using the APIs and caveats from those references. 5. Run mandatory validation. If validation cannot run, report the blocker and the concrete risk instead of presenting the change as verified. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills madteacher/dart-drift

View the source on GitHub

Browse the @skills marketplace