theokit-database

theokit-database is a skill for Claude Code from usetheokit/theokit. It costs 22 tokens per session (780 once invoked), scanned A, original, Apache-2.0.

A database setup guide for Drizzle ORM, a TypeScript library for working with databases, and SQLite, a small file-based database. It covers table definitions, connections, queries, migrations, seeds, and database commands.

In plain words
What is it for?
Use it to create SQLite tables, connect an application to the database, read and write records, and manage schema changes and sample data.
Why use it?
It gives you a consistent way to define and access application data without assembling the database setup from scratch.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to create SQLite tables, connect an application to the database, read and write records, and manage schema changes and sample data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/usetheokit/theokit/theokit-database
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.

Any agent
npx skills add usetheokit/theokit --skill theokit-database
Clone the repo
git clone --depth 1 https://github.com/usetheokit/theokit

Made for: Claude Code.

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 theokit-database

README.md
[![agentmods](https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-database/github.svg)](https://agentmods.dev/skills/usetheokit/theokit/theokit-database)
Your own site
<a href="https://agentmods.dev/skills/usetheokit/theokit/theokit-database"><img src="https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-database/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 theokit-database

Your own site · 80×15
<a href="https://agentmods.dev/skills/usetheokit/theokit/theokit-database"><img src="https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 780 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.
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.00022 $0.00780
Opus 5.5 $0.00009 $0.00312
Sonnet 5.5 $0.00004 $0.00156
Haiku 4.5 $0.00002 $0.00078

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

Security

Grade A, and why

theokit-database 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 1mo 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.

packages/create-theokit/templates/default/dot-claude/skills/theokit-database/SKILL.md · 118 lines

How it starts

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

TheoKit Database (Drizzle + SQLite)

Schema Definition

// server/db/schema.ts
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'

export const tasks = sqliteTable('tasks', {
  id: integer('id').primaryKey({ autoIncrement: true }),
  title: text('title').notNull(),
  done: integer('done', { mode: 'boolean' }).notNull().default(false),
  createdAt: text('created_at')
    .notNull()
    .default(sql`CURRENT_TIMESTAMP`),
})

export const users = sqliteTable('users', {
  id: integer('id').primaryKey({ autoIncrement: true }),
  email: text('email').notNull().unique(),
  name: text('name').notNull(),
})

DB Connection

// server/db/index.ts
import { drizzle } from 'drizzle-orm/better-sqlite3'
import Database from 'better-sqlite3'
import * as schema from './schema.js'

const sqlite = new Database('data/dev.db')
export const db = drizzle(sqlite, { schema })

Common Queries

import { db } from '@/server/db'
import { tasks } from '@/server/db/schema'
import { eq } from 'drizzle-orm'

// Select all
db.select().from(tasks).all()

// Select by ID
db.select().from(tasks).where(eq(tasks.id, 1)).get()

// Insert + return
db.insert(tasks).values({ title: 'New task' }).returning().get()

// Update
db.update(tasks).set({ done: true }).where(eq(tasks.id, 1)).run()

// Delete
db.delete(tasks).where(eq(tasks.id, 1)).run()

Seeds

// server/db/seed.ts
import { db } from './index.js'
import { tasks } from './schema.js'

await db
  .insert(tasks)
  .values([
    { title: 'Learn TheoKit', done: false },
    { title: 'Build an agent', done: false },
  ])
  .run()

console.log('Seeded database')

Run: npm run seed or npx tsx server/db/seed.ts

CLI Commands

npx drizzle-kit push    # Apply schema changes to dev DB (no migration files)
npx drizzle-kit generate # Generate SQL migration files (for production)
npm run seed             # Run seed script

Scaffolding Resources

Read the full file on GitHub · 118 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. 1mo ago First seen · 118 lines · 22 tokens per session scan A 199ba88dec63

Subscribe to this mod's changes

theokit-database is a skill published in the GitHub repository usetheokit/theokit (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 22 tokens to every session and 780 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

continuum-memory

Configure and use Continuum's two-tier memory system — mem0+Qdrant/Milvus for long-term facts, Redis for short-term sessions, with multi-tenant scopes (USER / AGENT / SHARED / RUN / CONVERSATION). Invoke when the user asks about "remember", "user preferences", "long-term memory", "vector search over memories"…

shyftlabs/continuum · 107 tokens

DataWarehouseArchitect

Complete modern data stack intelligence — data warehouse design (Snowflake/BigQuery/Redshift), dbt transformation layer, ingestion pipelines, data catalog, data quality, and building a data platform that the whole company can use.

vignesh2027/Claude-Agentic-Skills2.0-version · 48 tokens

knowledge-graph-builder

Activates KnowledgeGraph — an expert in building, querying, and reasoning over knowledge graphs. Use when you need entity extraction, relationship mapping, ontology design, Neo4j/RDF graph construction, graph-RAG pipelines, or complex multi-hop reasoning over structured knowledge.

vignesh2027/Claude-Agentic-Skills2.0-version · 58 tokens

business-intelligence-pro

Activates BusinessIntelligence-Pro for KPI design, dashboard strategy, and SQL optimization. Use when you need north star metric and metric tree design, LookML or Looker explore architecture, complex SQL with window functions and CTEs, threshold-based and ML-powered alerting design, or data storytelling for executive…

vignesh2027/Claude-Agentic-Skills2.0-version · 68 tokens

database-genius

Activates DatabaseGenius for database design, optimization, and migration. Use when you need ERD and schema design with normalization decisions, composite/partial/covering index strategy, EXPLAIN plan analysis and query rewriting, zero-downtime migration planning with rollback strategy, or pgvector setup for AI…

vignesh2027/Claude-Agentic-Skills2.0-version · 68 tokens

sql-analyzer

Activates SQLAnalyzer for advanced SQL optimization, query analysis, and database performance tuning. Use when you need to optimize a slow query using EXPLAIN plans, rewrite subqueries as CTEs or window functions, design complex analytical queries, identify missing indexes, eliminate N+1 patterns, or write advanced…

vignesh2027/Claude-Agentic-Skills2.0-version · 79 tokens