Agent Skillsmuratgur/ordinus › sqlite-minimal-persistence

sqlite-minimal-persistence

GitHub

保守扩展 SQLite 持久化,仅在产品行为明确需要时添加表。避免推测性设计,保持最小 schema,通过 IPC 隔离访问,确保数据安全与架构清晰。

.claude/skills/sqlite-minimal-persistence/SKILL.md muratgur/ordinus

Trigger Scenarios

修改 better-sqlite3 或 Drizzle schema 涉及数据库引导、迁移或持久化边界变更 提议新增产品数据表

Install

npx skills add muratgur/ordinus --skill sqlite-minimal-persistence -g -y
More Options

Non-standard path

npx skills add https://github.com/muratgur/ordinus/tree/master/.claude/skills/sqlite-minimal-persistence -g -y

Use without installing

npx skills use muratgur/ordinus@sqlite-minimal-persistence

指定 Agent (Claude Code)

npx skills add muratgur/ordinus --skill sqlite-minimal-persistence -a claude-code -g -y

安装 repo 全部 skill

npx skills add muratgur/ordinus --all -g -y

预览 repo 内 skill

npx skills add muratgur/ordinus --list

SKILL.md

Frontmatter
{
    "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.

Version History

  • f507122 Current 2026-07-05 18:19

Same Skill Collection

.agents/skills/lavish/SKILL.md
.claude/skills/code-review-and-quality/SKILL.md
.claude/skills/code-simplification/SKILL.md
.claude/skills/documentation-and-adrs/SKILL.md
.claude/skills/electron-secure-boundary/SKILL.md
.claude/skills/grill-me/SKILL.md
.claude/skills/idea-discovery/SKILL.md
.claude/skills/ipc-contract-design/SKILL.md
.claude/skills/ordinus-ui-system/SKILL.md
.claude/skills/provider-runtime-adapter/SKILL.md
.claude/skills/shadcn-project-workflow/SKILL.md
.codex/skills/code-review-and-quality/SKILL.md
.codex/skills/code-simplification/SKILL.md
.codex/skills/documentation-and-adrs/SKILL.md
.codex/skills/electron-secure-boundary/SKILL.md
.codex/skills/grill-me/SKILL.md
.codex/skills/idea-discovery/SKILL.md
.codex/skills/ipc-contract-design/SKILL.md
.codex/skills/ordinus-ui-system/SKILL.md
.codex/skills/provider-runtime-adapter/SKILL.md
.codex/skills/shadcn-project-workflow/SKILL.md
.codex/skills/sqlite-minimal-persistence/SKILL.md

Metadata

Files
0
Version
f507122
Hash
8dcdff74
Indexed
2026-07-05 18:19

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-13 23:48
浙ICP备14020137号-1 $Map of visitor$