agentleFS
Poorgramer-ZackPoorgramer-Zack/dart-expert-skills/skills/archived/flutter-db/SKILL.md

flutter-db

Skill7 starsChanged 8 months agoMITView on GitHub

Local database and persistence selection for Flutter including SharedPreferences, SecureStorage, Hive, and Drift. Use when implementing offline storage, encrypted data persistence, or choosing between key-value and relational local databases.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use lightweight stores for settings and sensitive credentials.

    line 19
  2. Distinctive:

    Performance Balance: Use NoSQL (Hive) for high-frequency reads and SQL (Drift) for complex relationships.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Database Architecture Guide (Flutter)

Goal

Implement robust, scalable, and secure local persistence strategies for Flutter applications. This skill ensures developers choose the optimal storage engine—balancing simple key-value settings, encrypted sensitive data, high-performance NoSQL object stores, and complex relational databases.

Process

🚀 High-Level Workflow

Selecting the right persistence layer depends on data sensitivity, complexity, and relationship depth.

Phase 1: Key-Value Persistence (Simple & Secure)

Use lightweight stores for settings and sensitive credentials.

  • Shared Preferences Guide - Non-sensitive settings and flags using static wrappers.
  • Secure Storage Guide - Encrypted storage for tokens and passwords.

Phase 2: High-Performance Object Storage (NoSQL)

For local-first apps requiring fast read/write of large datasets without complex relations.

  • Hive CE (Synchronous NoSQL) - Blazing fast object store for local caching and offline data.

Phase 3: Complex Relational Schemas (SQL)

For apps requiring strict data integrity, transactions, and complex queries.

  • Drift (Reactive SQL) - Type-safe relational database built on top of SQLite.

📚 Documentation Library

Refer to these specialized resources to implement your chosen persistence strategy:

  • 🗄️ Database Architecture Overview
  • ⚙️ Shared Preferences
  • 🔐 Secure Storage (Encrypted)
  • 🐝 Hive CE Best Practices
  • 🐘 Drift (SQL) Best Practices

Constraints

  • Type Safety: Prohibit raw dynamic data access. Always use generated classes (Drift) or typed static wrappers (SharedPreferences/SecureStorage).
  • Sensitivity Awareness: Force use of Secure Storage for any tokens, passwords, or PII. Never store sensitive data in SharedPreferences or unencrypted Hive boxes.
  • Singleton Access: Access storage instances via DI (Riverpod) or strictly defined static classes to prevent key fragmentation.
  • Performance Balance: Use NoSQL (Hive) for high-frequency reads and SQL (Drift) for complex relationships. Don't over-engineer simple apps with SQL.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.