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.
npx skills add MADTeacher/mad-agents-skills --skill dart-driftgit clone --depth 1 https://github.com/MADTeacher/mad-agents-skillsWrote 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.
[](https://agentmods.dev/skills/madteacher/mad-agents-skills/dart-drift)<a href="https://agentmods.dev/skills/madteacher/mad-agents-skills/dart-drift"><img src="https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/dart-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.
<a href="https://agentmods.dev/skills/madteacher/mad-agents-skills/dart-drift"><img src="https://agentmods.dev/badge/skills/madteacher/mad-agents-skills/dart-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.01072 |
| Opus 5 | $0.00046 | $0.00536 |
| Sonnet 5 | $0.00018 | $0.00214 |
| Haiku 4.5 | $0.00009 | $0.00107 |
Grade A, and why
dart-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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- 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. - 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_postgreswithpackage:postgresand enable the Postgres SQL dialect inbuild.yaml. - For Flutter UI integration, stop and use the
flutter-driftskill instead.
- For Dart CLI, server jobs, or native desktop local storage, use SQLite via
- Read only the reference files needed for the requested task.
- Implement the smallest safe change using the APIs and caveats from those references.
- Run mandatory validation. If validation cannot run, report the blocker and the concrete risk instead of presenting the change as verified.
Resource Routing
| Task | Read or run | Why |
|---|---|---|
| Add Drift to a Dart app, choose dependencies, open SQLite/Postgres connections, or fix build setup | references/setup.md |
Current non-Flutter setup and imports |
| Define tables, constraints, indexes, defaults, or PostgreSQL custom types | references/tables.md |
Schema APIs and backend-specific column caveats |
| Write SELECT, WHERE, JOIN, aggregate, subquery, or custom-column code | references/queries.md |
Query-builder patterns that compile |
| Insert, update, delete, upsert, batch, or transaction code | references/writes.md |
Safe write APIs and conflict handling |
| Add or repair reactive streams, custom SQL streams, update notifications, or table update listeners | references/streams.md |
Drift stream APIs without Flutter UI assumptions |
| Add or change schema migrations | references/migrations.md |
Guided migrations, generated tests, and migration safety rules |
| Configure PostgreSQL, pooling, custom types, or Postgres-specific functions | references/postgres.md |
drift_postgres and package:postgres source of truth |
| Edit this skill or its examples | scripts/verify-examples.sh |
Deterministic smoke check for the documented patterns |
What ships with it
8 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.
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.
- 12d ago First seen · 90 lines · 91 tokens per session scan A 6738dc623394
dart-drift is a skill published in the GitHub repository MADTeacher/mad-agents-skills (108 stars, last pushed 4mo ago), licensed MIT. It adds 91 tokens to every session and 1,072 once invoked, about $0.0005 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.
Other skills, from other repositories
firebase-cloud-firestore
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
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.
firebase-data-connect
Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules.
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()…
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…
developing-serverpod-backend
Develops full-stack Dart backends using the Serverpod framework with PostgreSQL, Redis, and Docker. Use when building type-safe API endpoints, defining YAML data models, configuring Serverpod auth, writing server-side tests, running database migrations, deploying to Docker/AWS/GCP, or using Serverpod Mini for…