Agent skill

Dart Drift

by MADTeacher in MADTeacher/mad-agents-skills

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

MITAuto-check passedMobile

Install Dart Drift

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

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

GitHub CLI
$ gh skill install MADTeacher/mad-agents-skills dart-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/dart-drift .claude/skills/dart-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
dart-drift
GitHub stars
110
Token cost
~1.2k tokens
SKILL.md length
532 words
Files
9 (incl. scripts, references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 5 steps: Inspect the project before changing… → Choose the backend path → Read only the reference files needed for… → …
  • Adding SQLite with package:drift/native.dart
  • SKILL.md covers Principle 0, Workflow, Resource Routing and Mandatory Validation, plus 2 more sections
  • Runs Shell scripts from its folder; calls dart

What it does

Dart Drift is an agent skill from MADTeacher/mad-agents-skills. 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 driftpostgres and package:postgres, writing type-safe tables, queries, writes, streams, and migrations, resolving buildrunner or driftdev failures, or validating Dart database code with code generation, analysis, tests, and migration checks.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/migrations.md`, `references/postgres.md` and `references/queries.md`).

It sits in Mobile, covering Cross-platform mobile apps, Type safety and Backend development. It works with Dart, PostgreSQL, Flutter 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

  • Adding SQLite with package:drift/native.dart
  • Configuring PostgreSQL with driftpostgres and package:postgres
  • Writing type-safe tables
  • Resolving buildrunner

Example prompts

  • “/dart-drift”

Requirements

  • A Bash shell

Workflow steps

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

  1. Inspect the project before changing code: pubspec.yaml, existing database
  2. Choose the backend path
  3. Read only the reference files needed for the requested task.
  4. Implement the smallest safe change using the APIs and caveats from those
  5. Run mandatory validation. If validation cannot run, report the blocker and

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

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • dart

    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

Dart Drift loads about 1.2k tokens when it runs, and up to ~8.9k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 532 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/dart-drift/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
dart-drift
description
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.
metadata.author
Stanislav [MADTeacher] Chernyshev
metadata.version
2.0

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 drift_postgres 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.

Resource Routing

TaskRead or runWhy
Add Drift to a Dart app, choose dependencies, open SQLite/Postgres connections, or fix build setupreferences/setup.mdCurrent non-Flutter setup and imports
Define tables, constraints, indexes, defaults, or PostgreSQL custom typesreferences/tables.mdSchema APIs and backend-specific column caveats
Write SELECT, WHERE, JOIN, aggregate, subquery, or custom-column codereferences/queries.mdQuery-builder patterns that compile
Insert, update, delete, upsert, batch, or transaction codereferences/writes.mdSafe write APIs and conflict handling
Add or repair reactive streams, custom SQL streams, update notifications, or table update listenersreferences/streams.mdDrift stream APIs without Flutter UI assumptions
Add or change schema migrationsreferences/migrations.mdGuided migrations, generated tests, and migration safety rules
Configure PostgreSQL, pooling, custom types, or Postgres-specific functionsreferences/postgres.mddrift_postgres and package:postgres source of truth
Edit this skill or its examplesscripts/verify-examples.shDeterministic smoke check for the documented patterns
Show full SKILL.md (214 more words)Show less

Mandatory Validation

  • After dependency changes, run dart pub get.
  • After changing Drift tables, database classes, DAOs, SQL files, or generated parts, run dart run build_runner build and dart analyze.
  • After changing behavior, run the narrowest relevant dart test target. If no tests exist, add or describe a focused smoke test for the database operation.
  • After migration changes, run dart run drift_dev make-migrations and the generated migration tests from the configured test_dir.
  • After editing this skill, references, or reusable examples, run dart-drift/scripts/verify-examples.sh.

Constraints

  • Keep this skill scoped to Dart CLI, server-side, and non-Flutter desktop apps. Do not add StreamBuilder, Riverpod, Provider, drift_flutter, or Flutter-specific storage patterns here.
  • Prefer dart pub add ... for new dependencies. Only hardcode versions when matching an existing repository policy.
  • Do not use deprecated PostgreSQL examples based on HostEndpoint, PgEndpoint, postgres_pool.dart, postgresUuid(), postgresJson(), PostgresTypes, or gen_random_uuid.
  • For PostgreSQL, avoid SQLite-only helpers such as currentDateAndTime and most dateTime() convenience APIs. Use PgTypes.date, PgTypes.timestampWithTimezone, PgTypes.timestampNoTimezone, and now().
  • Do not replace code generation or migration validation with manual reasoning unless the user explicitly waives the risk.

Fallback

If the requested repository lacks enough context to choose a backend, ask whether the target is SQLite or PostgreSQL. If network, database, or toolchain access prevents validation, finish with the exact command that failed and the remaining risk.

© 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 8 other files (scripts, references) in dart-drift of MADTeacher/mad-agents-skills.

  • SKILL.md
  • references/migrations.md
  • references/postgres.md
  • references/queries.md
  • references/setup.md
  • references/streams.md
  • references/tables.md
  • references/writes.md
  • scripts/verify-examples.sh

Open the folder on GitHubat commit 2fb67e3

Compare with similar skills

Dart 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.

Dart Drift compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dart Drift this skillMADTeacher/mad-agents-skills110—~1.2kAutomated safety check: PassMIT
NpgsqlrestNpgsqlRest/NpgsqlRest133—~7kAutomated safety check: NotesMIT
Flutter Working With Databasesbtwld/superdeck130—~2.1kAutomated safety check: PassBSD-3-Clause
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

Similar skills

  • Npgsqlrest

    NpgsqlRest/NpgsqlRest

    Build and modify REST APIs with NpgsqlRest — exposing PostgreSQL as HTTP endpoints from two sources (database functions/procedures/tables/views, and plain .sql files), driven by SQL comment…

    133 GitHub stars~7k tokensUpdated today
    DatabasesAuto-check: notes
  • Manages local data persistence using SQLite or other database solutions.

    130 GitHub stars~2.1k tokensUpdated yesterday
    MobileAuto-check passed
  • 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

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
  • 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
  • Flutter Adaptive UI

    MADTeacher/mad-agents-skills

    Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices.

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

Categories

Questions about Dart Drift

What does Dart Drift do?

Build, fix, audit, and migrate Drift persistence in Dart CLI, server-side, and non-Flutter desktop apps. Dart Drift is an agent skill from MADTeacher/mad-agents-skills. Build, fix, audit, and migrate Drift persistence in Dart CLI, server-side, and non-Flutter desktop apps.

When should I use Dart Drift?

Dart Drift fits situations like: adding SQLite with package:drift/native.dart; configuring PostgreSQL with driftpostgres and package:postgres; writing type-safe tables; resolving buildrunner.

How do I install Dart Drift in Claude Code?

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

How do I install Dart Drift in Codex?

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

Can I use Dart 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 dart-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/dart-drift, .gemini/skills/dart-drift, .github/skills/dart-drift and .opencode/skills/dart-drift in your project.

What does Dart Drift need to run?

Going by SKILL.md and its folder, Dart Drift needs a shell for the scripts in its folder and the command-line tools its instructions call (dart). Our summary lists: A Bash shell.

Does Dart 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 Dart 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Dart Drift use?

Dart 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 Dart Drift use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 7.6k tokens, read only when the agent opens those files.

What are the alternatives to Dart Drift?

Skills that share tags, products or a category with Dart Drift: Npgsqlrest (NpgsqlRest/NpgsqlRest, 133 stars), Flutter Working With Databases (btwld/superdeck, 130 stars), Engine Whats New (flutter/flutter, 179k stars) and Flutter Cherry Pick (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 Dart 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.