strata

strata is a skill for Claude Code, Codex from stratalab/strata-core. It costs 76 tokens per session (1,450 once invoked), scanned A, original, Apache-2.0.

A guide for using StrataDB, an embedded database that stores key-value data, JSON documents, vectors, events, and graphs in local files.

In plain words
What is it for?
It is for opening StrataDB from Python or the command line, storing and querying different data shapes, and working with isolated branches or past states.
Why use it?
It helps choose the right data type and use branches, historical reads, and typed errors correctly without running a separate database server.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/stratalab/strata-core/agents
Any agent
npx skills add stratalab/strata-core --skill agents
Clone the repo
git clone --depth 1 https://github.com/stratalab/strata-core

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 strata

README.md
[![agentmods](https://agentmods.dev/badge/skills/stratalab/strata-core/agents.svg)](https://agentmods.dev/skills/stratalab/strata-core/agents)
Your own site
<a href="https://agentmods.dev/skills/stratalab/strata-core/agents"><img src="https://agentmods.dev/badge/skills/stratalab/strata-core/agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,450 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.1 $0.00076 $0.01450
Opus 5 $0.00038 $0.00725
Sonnet 5 $0.00015 $0.00290
Haiku 4.5 $0.00008 $0.00145

Measured 2d ago against content hash 8d3728090a26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

strata 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 2d 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.

crates/cli/src/agents_skill.md · 131 lines

How it starts

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

StrataDB {version}

StrataDB is an embedded database: it runs inside the process against a local directory, like SQLite or DuckDB — no server, no port, no connection string. One database holds five data primitives on one branch-aware, time-travelling substrate. This skill matches strata {version}; the binary and the wheel are self-describing (see "Deeper reference" below).

Open a database (Python)

import stratadb

db = stratadb.open("./mydb")       # durable directory (created if absent)
db = stratadb.open(cache=True)     # ephemeral, in-memory
db = stratadb.from_env()           # path from $STRATA_DB

Never rely on the current directory — stratadb.open() with no target raises invalid_argument.cli.no_database. Use a context manager or db.close().

Choose a primitive

Data shape Use Namespace
Opaque value by key key-value db.kv — values are bytes; str encodes as UTF-8
Structured record, addressed by field JSON documents db.json — read/write inside a doc by path ("$.name")
Embeddings, similarity search vectors db.vectors — collections fix dimension + metric
Ordered, append-only history events db.events — hash-chained; count is len()
Relationships, traversal, analytics graph db.graphs — both edge endpoints must exist first
db.kv.put("greeting", "hello");  db.kv.get("greeting")        # b"hello"
db.json.set("user:1", "$", {"name": "Ada"});  db.json.get("user:1", "$.name")
db.vectors.create_collection("notes", dimension=384)
db.vectors.upsert("notes", "n1", vec, metadata={"kind": "note"})
db.vectors.query("notes", query_vec, k=5)
db.events.append("deploy", {"ok": True})
db.graphs.create("g"); db.graphs.add_node("g", "a"); db.graphs.add_node("g", "b")
db.graphs.add_edge("g", "a", "link", "b")

Branches and time travel

Every primitive is branch-aware. A fork is cheap and isolates writes; the default branch is named default (not main):

db.branches.fork("default", "experiment")
exp = db.at(branch="experiment")       # scoped view over the same handle
exp.kv.put("k", "risky-value")
db.kv.get("k")                         # None on default — isolated

Read the full file on GitHub · 131 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. 2d ago First seen · 131 lines · 76 tokens per session scan A 8d3728090a26

Subscribe to this mod's changes

strata is a skill published in the GitHub repository stratalab/strata-core (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 76 tokens to every session and 1,450 once invoked, about $0.0004 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-09-04.