← Browse

@muratgur/sqlite-minimal-persistence

A

Extend Ordinus SQLite persistence conservatively. Use when touching better-sqlite3, Drizzle schema, database bootstrap, app_meta, migrations, durable state, persistence boundaries, or proposals to add new product tables.

skillclaude

Install

agr install @muratgur/sqlite-minimal-persistence --target claude

Writes 1 file into .claude/skills/, pinned to git-8dcdff74.

  • .claude/skills/sqlite-minimal-persistence/SKILL.md

Document


name: sqlite-minimal-persistence description: Extend Ordinus SQLite persistence conservatively. Use when touching better-sqlite3, Drizzle schema, database bootstrap, app_meta, migrations, durable state, persistence boundaries, or proposals to add new product tables.

SQLite Minimal Persistence

Objective

Use SQLite as durable local app state without designing product tables before the workflow model is clear.

Current Policy

  • The minimum database starts with app_meta.
  • Add new tables only when the product behavior needs durable state now.
  • Avoid adding agent, task, provider, schedule, inbox, or run schemas speculatively.
  • Keep secrets out of ordinary product tables unless a secure storage decision has been made.
  • Treat SQLite as main-process owned. Renderer must access state only through typed IPC.

Workflow

  1. Confirm the requested behavior truly needs persistence.
  2. Check whether existing app_meta or settings-level storage is sufficient.
  3. If a table is necessary, define the smallest schema that supports the current behavior.
  4. Add Drizzle schema and bootstrap/migration logic together.
  5. Keep data access behind main-process services.
  6. Update db.getStatus only if the status surface needs to show new bootstrap information.
  7. Run typecheck, lint, build, and a runtime smoke test that opens the app.

Design Guidance

  • Prefer durable state for user-visible history, resumable work, and app configuration.
  • Prefer filesystem storage for large artifacts and generated files, with database metadata later when needed.
  • Prefer explicit timestamps and schema versioning for local migrations.
  • Keep schema names product-oriented and stable.

Red Flags

  • A table is added because a future module might need it.
  • Renderer imports database code.
  • Database writes are mixed into UI event handlers.
  • Migration behavior is not exercised by opening the app.

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-8dcdff7410e92026-07-31