thunderid: Skill for Claude Code

.agent/skills/db/SKILL.md

db is a skill for Claude Code, Codex from thunder-id/thunderid. It costs 33 tokens per session (2,785 once invoked), scanned A, original, Apache-2.0.

Database rules for ThunderID, including how to separate identity configuration, temporary runtime data, user data, and long-lived operational data. It also defines conventions such as UUID version 7 identifiers and primary-key naming.

In plain words
What is it for?
Use it when designing database tables, writing SQL queries, changing schema scripts, updating store constants, or reviewing persistence rules.
Why use it?
It prevents data from being stored in the wrong logical database and keeps schemas and queries consistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

This is thunder-id/thunderid's own configuration. It tells Claude Code and Codex how to work on thunderid itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything thunderid configures →

Reuse

Borrowing it

Nothing to install: this file belongs to thunder-id/thunderid. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/thunder-id/thunderid/main/.agent/skills/db/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/thunder-id/thunderid

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 db

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/thunder-id/thunderid/db"><img src="https://agentmods.dev/badge/skills/thunder-id/thunderid/db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,785 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00033 $0.02785
Opus 5.5 $0.00013 $0.01114
Sonnet 5.5 $0.00007 $0.00557
Haiku 4.5 $0.00003 $0.00279

Measured 6d ago against content hash 39109768b478, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 6d 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.

.agent/skills/db/SKILL.md · 300 lines

How it starts

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

Database Schema Design Principles and Conventions

Logical Database Separation

ThunderID uses four logically separated databases. Each database owns a specific category of data.

Database (config key) Responsibility
config Identity configuration data Ex: applications, authentication flows, roles, identity providers
runtime_transient Short-lived runtime state: authorization codes, authorization/PAR requests, JTI records, WebAuthn/VCI state, flow contexts
entitydb Identity data: users, groups, indexed user attributes
runtime_persistent Long-lived operational state that must survive restarts: revoked tokens, SSO sessions, consent records, entity runtime data (lifecycle state and access state)

Although the databases are logically separated, they share consistent schema design principles documented here.

Primary Key Strategy

UUID v7 Identifiers

Tables use UUID v7 as primary key values. UUID v7 provides:

  • Global uniqueness across deployments and systems.
  • Time-ordering characteristics that improve index performance for insert-heavy workloads.

Primary Key Column Naming

Primary key columns are named ID.

Do not use composite names such as USER_ID or APPLICATION_ID for a primary key column. Use ID consistently.

-- Correct
CREATE TABLE "APPLICATION" (
    ID VARCHAR(36) PRIMARY KEY,
    ...
);

-- Incorrect
CREATE TABLE APPLICATION (
    APPLICATION_ID VARCHAR(36) PRIMARY KEY,
    ...
);

Association Tables

Association (join) tables that model many-to-many relationships use composite primary keys formed from the relevant foreign key columns. These tables do not include a separate surrogate ID column.

-- Example: role assignments use a composite primary key
CREATE TABLE "ROLE_ASSIGNMENT" (
    DEPLOYMENT_ID   VARCHAR(255) NOT NULL,
    ROLE_ID         VARCHAR(36) NOT NULL,
    ASSIGNEE_TYPE   VARCHAR(5)  NOT NULL CHECK (ASSIGNEE_TYPE IN ('user', 'group')),
    ASSIGNEE_ID     VARCHAR(36) NOT NULL,
    PRIMARY KEY (ROLE_ID, DEPLOYMENT_ID, ASSIGNEE_TYPE, ASSIGNEE_ID),
    FOREIGN KEY (ROLE_ID) REFERENCES "ROLE" (ID) ON DELETE CASCADE
);

Read the full file on GitHub · 300 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. 6d ago Changed 39109768b478
  2. 1mo ago First seen · 300 lines · 33 tokens per session scan A d1045479b8cc

Subscribe to this mod's changes

db is a skill published in the GitHub repository thunder-id/thunderid (594 stars, last pushed yesterday), licensed Apache-2.0. It adds 33 tokens to every session and 2,785 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-30.

Related

Other skills, from other repositories

code-changes

Workflow for any task that ends in code changes: issue analysis or triage, pull request review comments, features, bug fixes, refactors. Invoke at the start of such a task, before reading or writing code.

JanDeDobbeleer/oh-my-posh · 48 tokens

coding-directives

Implement or review caddy-security Go code, Caddy modules, parsers, lifecycle, and HTTP delegation. Use for app/plugin boundaries, authcrunch integration, errors, logging, and code conventions.

greenpau/caddy-security · 45 tokens

configuration-identity-stores

Configure local, LDAP, SQLite or Consul password identity stores, trusted SQLite administration, realms, databases, binds, TLS trust and group mappings. Delegates static local entries to configuration-users.

greenpau/caddy-security · 44 tokens

sq

Guides use of the sq CLI to query SQL databases and tabular files with SLQ (sq's jq-like query language) or native SQL, manage sources, choose output formats, and run inspect, diff, and table commands. Use when the user mentions sq, SLQ, wrangling CSV/Excel/JSON/DB data, cross-source joins, or command-line data…

neilotoole/sq · 89 tokens

redux-to-swr

Migrate React components from Redux + Saga to SWR hooks. Use when converting data fetching from Redux store (reducers, sagas, selectors, connect HOC) to SWR-based hooks in CockroachDB DB Console or cluster-ui.

cockroachdb/cockroach · 53 tokens

mma-investigator

Expert system for investigating MMA (Multi-Metric Allocator) behavior on CockroachDB clusters. Helps oncall engineers diagnose load imbalances, understand rebalancing decisions, and identify why MMA did or didn't act.

cockroachdb/cockroach · 47 tokens