storage

A set of rules for changing SQLite, PostgreSQL, CockroachDB, DuckDB, and archive queries. SQLite is a file-based database, while PostgreSQL and CockroachDB are server databases; DuckDB is treated as a derived copy.

In plain words
What is it for?
Use it before changing database schemas, storage queries, archive synchronization, indexes, filters, aggregations, or ordering. It also explains how to handle usage-cache divergence.
Why use it?
It prevents data loss during schema changes and keeps the main database implementations consistent. It requires non-destructive migrations and preserves archived sessions during a full resync.

Agent

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 agents/kenn-io/agentsview/storage
Clone the repo
git clone --depth 1 https://github.com/kenn-io/agentsview
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,933 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.00000 $0.01933
Opus 5 $0.00000 $0.00966
Sonnet 5 $0.00000 $0.00387
Haiku 4.5 $0.00000 $0.00193

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

Security

Grade A, and why

storage 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.

docs/agents/storage.md · 169 lines

How it starts

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

Storage Rules

Read this file before changing SQLite, PostgreSQL, CockroachDB, DuckDB, archive resync, or storage queries.

SQLite Archive

SQLite is the persistent archive. Never delete, drop, truncate, or recreate it to handle a data-version change.

Use non-destructive schema migrations such as ALTER TABLE and UPDATE. A parser change that needs a full resync must build a fresh database, sync source files, copy orphaned sessions from the old database, and swap the files atomically. Preserve sessions even when their source files no longer exist.

Backend Parity

  • Keep observable behavior and query shape aligned between SQLite and PostgreSQL/CockroachDB when practical. Match queries, indexes, aggregations, filters, and ordering unless a documented constraint requires a difference.
  • Do not fix correctness or performance in only one primary backend unless the user limits the task to that backend. If implementations must differ, explain why and preserve the same behavior.
  • DuckDB is a derived mirror and is not part of this parity rule.

Usage cache divergence

SQLite's aggregate usage APIs read timezone-specific daily rollups from a disposable sibling database. Normalized, unpriced facts in the same database are the exact build substrate, not the warm aggregate read path. Per-session detail remains on the live row path, and PostgreSQL continues to aggregate its live normalized archive rows. The live path is never a fallback for a failed or stale SQLite aggregate read. Both implementations are co-maintained under the same behavior contract: daily usage, top sessions, billed session counts, relaxed matching counts, and per-session usage must remain observably equal. The pgtest complete-result parity fixture is the acceptance boundary. Track the PostgreSQL-native optimization in issue #1451.

The usage cache filename is derived from its format version and the archive database_id. A format or database-ID change selects a new generation; it does not migrate or rewrite the archive. Facts contain only message- and usage-event-derived data. Aggregate fingerprints additionally bake the exact session agent and started_at, because those fields affect deduplication and day bucketing. All other session metadata and filters come from the archive read snapshot. Do not widen or narrow this live/baked boundary implicitly.

Read the full file on GitHub · 169 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 · 169 lines · 0 tokens per session scan A 081c799fb402

Subscribe to this mod's changes

storage is an agent published in the GitHub repository kenn-io/agentsview (5,632 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,933 tokens. 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 agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens