migrate-to-sqlite

A migration guide for moving data from TinyBase tables into an application's SQLite database. TinyBase is a small in-app data store, while SQLite is a file-based database.

In plain words
What is it for?
Use it when migrating data domains such as calendars, events, sessions, tasks, or notes, while tracking migration phases and out-of-scope settings.
Why use it?
It helps plan the move without overlooking which parts of the application read or write each table.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fastrepl/anarlog/migrate-to-sqlite
Any agent
npx skills add fastrepl/anarlog --skill migrate-to-sqlite
Clone the repo
git clone --depth 1 https://github.com/fastrepl/anarlog

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.02257
Opus 5 $0.00022 $0.01128
Sonnet 5 $0.00009 $0.00451
Haiku 4.5 $0.00004 $0.00226

Measured yesterday against content hash 3487f56acbc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate-to-sqlite scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/migrate-to-sqlite/SKILL.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Status

Keep up to date as each PR lands. Outer box = fully done across both phases. Sub-bullets track sub-states where relevant.

This migration targets the TinyBase main store only. The separate TinyBase settings store is out of scope unless the plan is explicitly expanded to include it.

  • templates — already Drizzle, no Phase 0 needed
  • calendars
    • Phase 0 reads (PR 2: useCalendar, useEnabledCalendars)
    • Phase 0 writes — services/calendar/ctx.ts has a cross-domain calendars+events transaction; lands with events PR
    • Phase 1 — Rust migration + ops exist
  • events
    • Phase 0
    • Phase 1 — Rust migration + ops exist
  • sessions
  • transcripts
  • humans
  • organizations
  • enhanced_notes
    • Phase 0 reads — session/hooks/useEnhancedNotes.ts
    • Phase 0 writes
    • Phase 1
  • mapping_session_participant
  • mapping_tag_session
  • mapping_mention
  • tags
  • chat_groups
  • chat_messages
  • session_key_facts
  • tasks
  • daily_notes
    • Phase 0 writes (partial) — chat/store/*
    • Phase 0 reads
    • Phase 1
  • tasks
  • memories
    • Phase 0 writes — settings/memory/custom-vocabulary.tsx
    • Phase 0 reads
    • Phase 1
  • daily_notes

Strategy

Two-phase, per-domain migration. Each phase is many small PRs.

Phase 0 — Decouple consumers

Before any storage swap, move every TinyBase call behind a domain hook living in apps/desktop/src/<domain>/hooks.ts (or <domain>/hooks/*). Hook return shapes are plain TypeScript; no TinyBase types leak out. Consumer code stops importing ~/store/tinybase/store/main.

Scope note: this applies to consumers of ~/store/tinybase/store/main and the legacy ~/store/tinybase/hooks barrel. Do not start wrapping settings.UI.* usage behind new hooks as part of this effort; ~/store/tinybase/store/settings is intentionally out of scope for this migration.

Read the full file on GitHub · 177 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 177 lines · 44 tokens per session scan A 3487f56acbc2

Subscribe to this mod's changes

migrate-to-sqlite is a skill published in the GitHub repository fastrepl/anarlog (9,195 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 2,257 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

oracle-parser

Use when doing any parser work — adding new Oracle text patterns, verb forms, phrase helpers, target patterns, subject handling, effect chain composition, fixing Unimplemented fallbacks, or understanding the parser architecture. This is the SINGLE SOURCE OF TRUTH for all oracle parser knowledge. Covers the nom…

phase-rs/phase · 82 tokens

bug-triage

Use when triaging Phase Discord bug reports, syncing reports into triage artifacts, creating or updating GitHub issues, tracking bug clusters, or applying the repository's bug-fix review workflow.

phase-rs/phase · 43 tokens

pr-review-loop

Use to run a continuous review sweep over open contributor PRs in phase.rs. The skill is a thin orchestration layer over scripts/prreview.py: discover candidates, detect stale reviews/follow-ups, dispatch review-impl for PRs that need judgment, and delegate authorized merge handling to pr-contribution-handler.

phase-rs/phase · 66 tokens

add-ai-feature-policy

Use when adding a new deck-aware AI feature (DeckFeatures axis) and its companion policies (TacticalPolicy + optional MulliganPolicy) to phase-ai. Codifies the structural-detection pattern, AST-type locations, parts-based predicate convention, registry wiring sites, and recurring review traps so a new feature ships in…

phase-rs/phase · 81 tokens

engine-implementer

End-to-end phase.rs implementation pipeline: plan, review-plan, implement, review-impl, commit — each step run in a fresh spawned agent, with automatic phase decomposition for oversized workloads.

phase-rs/phase · 43 tokens

add-engine-effect

Use when adding a new effect, mechanic, or parser capability to the engine. Covers the full lifecycle from types → parser → resolver → targeting → frontend → AI → tests.

phase-rs/phase · 39 tokens