anarlog: Skill for Claude Code

.agents/skills/sqlite-schema-design/SKILL.md

sqlite-schema-design is a skill for Claude Code, Codex from fastrepl/anarlog. It costs 42 tokens per session (1,586 once invoked), scanned A, original, MIT.

A design and review guide for SQLite databases that synchronize through SQLite Sync. SQLite Sync replicates database changes between devices or databases, so tables must follow additional rules beyond ordinary SQLite design.

In plain words
What is it for?
Use it when adding or changing synchronized tables, choosing primary keys and defaults, handling foreign keys, or planning migrations for CloudSync-backed applications.
Why use it?
It prevents schema choices that can break synchronization, such as unstable identifiers or incompatible schema changes. It also helps separate synchronized data from local-only caches.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is fastrepl/anarlog's own configuration. It tells Claude Code and Codex how to work on anarlog itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything anarlog configures →

About the project

anarlog is a local-first AI meeting notetaker that captures device audio, transcribes meetings, and stores notes, transcripts, and recordings on the user's computer. It is for people who want meeting notes without adding a bot to calls or sending conversation data to an external cloud. The catalogue entries provide agent integrations and workflows for the application.

fastrepl/anarlog · 9,621 stars · on GitHub · anarlog.so

Reuse

Borrowing it

Nothing to install: this file belongs to fastrepl/anarlog. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fastrepl/anarlog/main/.agents/skills/sqlite-schema-design/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fastrepl/anarlog

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sqlite-schema-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/fastrepl/anarlog/sqlite-schema-design/github.svg)](https://agentmods.dev/skills/fastrepl/anarlog/sqlite-schema-design)
Your own site
<a href="https://agentmods.dev/skills/fastrepl/anarlog/sqlite-schema-design"><img src="https://agentmods.dev/badge/skills/fastrepl/anarlog/sqlite-schema-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sqlite-schema-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/fastrepl/anarlog/sqlite-schema-design"><img src="https://agentmods.dev/badge/skills/fastrepl/anarlog/sqlite-schema-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,586 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00042 $0.01586
Opus 5.5 $0.00017 $0.00634
Sonnet 5.5 $0.00008 $0.00317
Haiku 4.5 $0.00004 $0.00159

Measured 2mo ago against content hash 9ef2dc193d78, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sqlite-schema-design 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 2mo ago.

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/sqlite-schema-design/SKILL.md · 222 lines

How it starts

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

Goal

Design tables that behave correctly under SQLite Sync's CRDT replication model.

This skill is specifically for CloudSync-backed schemas:

  • tables are initialized through cloudsync_init(...)
  • sync is enabled with cloudsync_enable(...)
  • identifiers should be generated with cloudsync_uuid()
  • schema changes must go through cloudsync_begin_alter(...) and cloudsync_commit_alter(...)
  • local and cloud databases must keep the same schema

Do not treat this as ordinary SQLite schema design. SQLite Sync imposes extra rules around keys, defaults, foreign keys, and schema evolution.

Workflow

1. Decide Whether The Table Is Synced

Before proposing DDL, classify the table:

  • synced application data: must satisfy SQLite Sync constraints
  • local-only cache or ephemeral state: should usually stay out of CloudSync

Only apply this skill to synced tables or to tables that may become synced soon.

2. Require A Stable, Globally Unique Primary Key

For synced tables:

  • always declare an explicit primary key
  • prefer TEXT PRIMARY KEY NOT NULL
  • generate ids with cloudsync_uuid()
  • do not use auto-incrementing integer ids

SQLite Sync docs explicitly recommend UUIDv7-style globally unique ids for CRDT workloads. Integer autoincrement ids are a bad fit because multiple devices can create rows independently.

CREATE TABLE document (
  id TEXT PRIMARY KEY NOT NULL DEFAULT (cloudsync_uuid()),
  workspace_id TEXT NOT NULL,
  title TEXT NOT NULL DEFAULT '',
  body TEXT NOT NULL DEFAULT '',
  archived INTEGER NOT NULL DEFAULT 0,
  created_at INTEGER NOT NULL DEFAULT (unixepoch()),
  updated_at INTEGER NOT NULL DEFAULT (unixepoch())
) STRICT;

If the environment cannot use a function call in DEFAULT, generate the id in application code, but still use cloudsync_uuid() as the canonical id strategy.

3. Make Inserts Merge-Safe With Real Defaults

SQLite Sync best practices call out a non-obvious CRDT constraint: merges can happen column-by-column, so missing values are much more dangerous than in a single-node SQLite app.

Read the full file on GitHub · 222 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. 2mo ago First seen · 222 lines · 42 tokens per session scan A 9ef2dc193d78

Subscribe to this mod's changes

sqlite-schema-design is a skill published in the GitHub repository fastrepl/anarlog (9,621 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 1,586 once invoked, about $0.0002 per session on Opus 5.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

critic-contract

Shared read-side contract every read-only CRITIC imports — adversarial stance, empirical verification of runtime-behavior claims, the mandatory self-red-team before APPROVE, how a finding is stated (quote the span, take the UNKNOWN escape hatch) and held (only new evidence moves a severity, never pushback), spec-UB…

saeedkolivand/ai-job-hunter-app · 97 tokens

code-quality

Shared clean-code / DRY / KISS / YAGNI standards and stack-specific smells for the React 19 + TypeScript + Rust (Tauri 2) monorepo. Library consumed by the code-quality-reviewer and code-quality-author agents.

saeedkolivand/ai-job-hunter-app · 55 tokens

review-workflow

The implement→review flow under the ≤3-reviewer budget with the conditional test stage. Use for /implement-feature, /fix-bug, /refactor-module and any change that needs structured review.

saeedkolivand/ai-job-hunter-app · 45 tokens

graphify-windows

Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPHREPORT.md.

saeedkolivand/ai-job-hunter-app · 75 tokens

reflect

Use Recall Reflect to review AI coding workflow history as a conversation-first timeline and discuss observed patterns before changing behavior. Trigger when the user asks to reflect on a project, review AI coding workflow, inspect workflow friction, discuss repeated corrections, review handoffs, or explore possible…

samzong/Recall · 57 tokens

spotpatch

A development workflow for React that connects a selected page element to its JSX or TSX source code and gathers context for review.

huanglvjing/spotpatch · 93 tokens