add-store-query

add-store-query is a skill for Claude Code, Codex from radimsem/remindb. It costs 102 tokens per session (1,997 once invoked), scanned A, original, MIT.

A development guide for adding or changing SQL queries in remindb’s SQLite data store. SQLite is a database kept in a local file, and a migration is a controlled change to its tables or indexes.

In plain words
What is it for?
Use it to add lookups, updates, indexes, columns, or tables in the store, along with the required methods, migrations, and tests.
Why use it?
It helps keep database queries, application methods, tests, and schema changes aligned.

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/radimsem/remindb/add-store-query
Any agent
npx skills add radimsem/remindb --skill add-store-query
Clone the repo
git clone --depth 1 https://github.com/radimsem/remindb

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 add-store-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/radimsem/remindb/add-store-query.svg)](https://agentmods.dev/skills/radimsem/remindb/add-store-query)
Your own site
<a href="https://agentmods.dev/skills/radimsem/remindb/add-store-query"><img src="https://agentmods.dev/badge/skills/radimsem/remindb/add-store-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,997 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.00102 $0.01997
Opus 5 $0.00051 $0.00999
Sonnet 5 $0.00020 $0.00399
Haiku 4.5 $0.00010 $0.00200

Measured 5d ago against content hash cfcb0097140d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-store-query 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 5d 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.

.claude/skills/add-store-query/SKILL.md · 142 lines

How it starts

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

Add a query (and optionally a migration) to the store

pkg/store/ is the SQLite layer. Queries are SQL string constants in queries.go; methods on *Store execute them through s.Tx(...) for writes or s.db.QueryContext(...) for reads. Schema lives in migrations/000N_*.sql, embedded via embed.FS and applied at startup.

There are two workflows here. Pick the right one before you start.

Need new SQL only?  ──> Workflow A (query)
Need a new column / table / index?  ──> Workflow A + Workflow B (migration)

Workflow A — add a query and method

Three files. Same pattern every time.

File What changes
pkg/store/queries.go Add a q<Verb><Noun> = ... const
pkg/store/<domain>.go Add the method on *Store (temperature.go, node.go, search.go, snapshot.go — pick the matching domain)
pkg/store/store_test.go Add a test that opens testutil.OpenTestDB(t) and exercises the method

Query const

Constants are grouped at the bottom of queries.go next to related queries. Name them q<Verb><Noun> — e.g., qSelectColdNodes, qBoostTemperature, qIncrementAccess. No package prefix; the file is the namespace.

const qListSourceFiles = `SELECT DISTINCT source_file FROM nodes ORDER BY source_file`

For batch queries with a variable IN list, follow the qBoostTemperatureBatchPrefix pattern: define the prefix as a const, append placeholders + ) in the calling method.

Method shape

Two flavors based on read vs write.

Reads call s.db.QueryContext directly, defer rows.Close(), and return through collectRows (or a dedicated row-scanner if the columns differ from nodeColumns). Reads do not wrap in s.Tx(...).

func (s *Store) ListSourceFiles(ctx context.Context) ([]string, error) {
    rows, err := s.db.QueryContext(ctx, qListSourceFiles)
    if err != nil {
        return nil, err
    }
    defer func() { _ = rows.Close() }()

    var out []string
    for rows.Next() {
        var path string
        if err := rows.Scan(&path); err != nil {
            return nil, err
        }
        out = append(out, path)
    }
    return out, rows.Err()
}

Read the full file on GitHub · 142 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. 5d ago First seen · 142 lines · 102 tokens per session scan A cfcb0097140d

Subscribe to this mod's changes

add-store-query is a skill published in the GitHub repository radimsem/remindb (125 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 1,997 once invoked, about $0.0005 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

build-pack

Author, measure and publish a YantrikDB knowledge pack. Use when asked to create a pack, turn documentation or a domain into a pack, package knowledge or skills for a local model, or publish to packs.yantrikdb.com. Covers the three tiers (constitution / corpus / coverage), the measurement that decides whether a pack…

yantrikos/yantrikdb · 88 tokens

mfs-find

Search, grep, browse, and read across registered MFS data sources via the mfs CLI — codebases, docs, PDFs, web crawls, databases (postgres/mysql/mongo/snowflake/bigquery), issue trackers (jira/linear/github), CRMs (hubspot), chat (slack/discord/gmail/feishu), object stores (s3/gdrive). Use whenever the user asks to…

zilliztech/mfs · 225 tokens

audit

Run a comprehensive read-only audit of the user's Neotoma database, surfacing graph-health issues by category and severity. Each finding includes a structured remediation pointing at an existing Neotoma tool — this skill never mutates state.

markmhendrickson/neotoma · 3 tokens

binder-modeling

Binder data modeling — define entity types, fields, relations, constraints, views, and navigation. Use when asked to "create a type", "add a field", "define a schema", "set up relations", "model entities", "create a view", "set up navigation", "render entities as files", or design a binder workspace schema.

mpazik/Binder · 74 tokens

binder-cli

Binder CLI for knowledge graph operations — CRUD, search, schema inspection, transaction import, docs rendering. Use when asked to "query binder", "search records", "create a record", "check the schema", "import transactions", "undo changes", or work with a binder workspace.

mpazik/Binder · 60 tokens

binder-import

Import external data into a Binder workspace. Handles CSV, JSON, YAML, Markdown files, and directories of Markdown. Use when asked to "import data", "load records from a file", "ingest documents", "migrate data into binder", or bulk-create records from an external source.

mpazik/Binder · 62 tokens