tmcfarlane/skillforge/sqlite-registry-pattern
Claude Code and agent skill by tmcfarlane/skillforge
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install tmcfarlane/skillforge/sqlite-registry-patternSKILL.md
SQLite Registry Pattern
Store, version, and query structured records in a local SQLite database using sql.js (pure WASM — no native binaries). Supports versioning, lineage tracking, and composite scoring across related tables.
When to Use
Use whenever you need a persistent, queryable registry for artifacts that evolve over time (skills, experiments, documents). Especially suited for local-first Node.js services where:
- No C++ toolchain is available (Windows/Linux CI)
- Records need version history
- Multiple score signals must be aggregated per record
- No external DB server is acceptable
Steps
- Define tables with `CREATE TABLE IF NOT EXISTS` — always idempotent. Tables:
{records},{record}_versions,{record}_scores,{record}_lineage.
- Use TEXT PRIMARY KEY with `randomUUID()` — avoids integer ID collisions across distributed writes.
- Run all migrations in a single `runMigrations(db)` function called at startup, before any queries.
- Call `persistDb()` after every write batch — sql.js stores the DB in-memory;
persistDb()flushes to disk as a binary Buffer.
- Version records on update — INSERT into
{record}_versionswith an incremented version number before updating the main record. Never delete versions.
- Track lineage via `{record}_lineage` table — record
parent_id,child_id, andrelation_type('derived_from', 'refines', 'conflicts_with') when one record produces another.
- Store composite scores in `{record}_scores` — separate rows for each signal type ('judge', 'feedback', 'implicit', 'composite'). Never overwrite; always INSERT.
- Read with `db.exec(SQL, params)` — returns
[{ columns, values }]. Map values to typed objects viacolumns.forEach((col, i) => obj[col] = row[i]).
Algorithm
Primitives
- sql-query, data-transform, versioning, event-driven
Tags
sqlite, sql.js, typescript, registry, versioning, wasm, node
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sqlite-registry-pattern/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tmcfarlane/skillforge/sqlite-registry-pattern)