DB

DB is a cursor rule for Cursor from StratoKit/strato-db. It costs 372 tokens per session, scanned A, original, MIT.

A database module that provides a higher-level interface over SQLite, a small file-based database, using connections and prepared SQL statements.

In plain words
What is it for?
Use it as the project's SQLite interaction layer through its database, SQLite wrapper, and statement components.
Why use it?
It hides some lower-level database details and provides shared components for opening the database and running operations.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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 rules/stratokit/strato-db/db
Clone the repo
git clone --depth 1 https://github.com/StratoKit/strato-db

Made for: Cursor.

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 DB

README.md
[![agentmods](https://agentmods.dev/badge/rules/stratokit/strato-db/db.svg)](https://agentmods.dev/rules/stratokit/strato-db/db)
Your own site
<a href="https://agentmods.dev/rules/stratokit/strato-db/db"><img src="https://agentmods.dev/badge/rules/stratokit/strato-db/db.svg" alt="Measured on agentmods" height="20"></a>
Per session 372 This file is loaded in full into every session.
When invoked 372 The same file — it is already loaded in full.
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.00372 $0.00372
Opus 5 $0.00186 $0.00186
Sonnet 5 $0.00074 $0.00074
Haiku 4.5 $0.00037 $0.00037

Measured yesterday against content hash c64ce074e0f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

.cursor/rules/DB.mdc · 50 lines

What it actually says

DB Module (src/DB)

This module provides the core database interaction layer, abstracting the underlying SQLite database.

Core Components

DB.js

  • Purpose: Provides a high-level abstraction for database connections and operations. It likely manages connection pooling and simplifies common database tasks.
  • Key Features: (To be determined by analyzing the file)
  • Dependencies: SQLite.js, Statement.js

SQLite.js

  • Purpose: Wraps the sqlite3 library to provide a more promise-based and potentially enhanced interface for interacting directly with SQLite.
  • Key Features: (To be determined by analyzing the file)
  • Dependencies: sqlite3, Statement.js

Statement.js

  • Purpose: Represents a prepared SQL statement, likely offering methods for binding parameters and executing the statement efficiently.
  • Key Features: (To be determined by analyzing the file)
  • Dependencies: sqlite3

Usage

(To be determined by analyzing the code and tests)

Dependencies

  • sqlite3: The underlying Node.js driver for SQLite.
  • async-sema: Likely used for managing concurrency or locking around database operations.
  • dataloader: Potentially used for batching and caching database reads.
  • debug: Used for logging debug information.
  • lodash: Utility library, potentially used for various data manipulations.

Structure

src/
└── DB/
    ├── DB.js           # High-level DB abstraction
    ├── DB.test.js
    ├── SQLite.js       # sqlite3 wrapper
    ├── SQLite.test.ts
    ├── Statement.js    # Prepared statement representation
    ├── Statement.test.js
    └── index.js        # Module entry point (re-exports)
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 · 50 lines · 372 tokens per session scan A c64ce074e0f0

Subscribe to this mod's changes

DB is a cursor rule published in the GitHub repository StratoKit/strato-db (14 stars, last pushed 6mo ago), licensed MIT. It adds 372 tokens to every session, about $0.0019 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.