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.
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 `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
| 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 |
## 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.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.