db-temporal-history

db-temporal-history is a skill for Claude Code from Hainrixz/claude-db. It costs 63 tokens per session (1,018 once invoked), scanned A, original, MIT.

A database design audit for tracking records through creation, changes, retirement, and required deletion. It checks soft deletes, audit histories, retention periods, and privacy-law erasure or anonymization.

In plain words
What is it for?
Use it to review lifecycle fields, change-history mechanisms, data-retention policies, GDPR or CCPA deletion handling, and time-based validity.
Why use it?
It finds cases where deleted data can reappear, important changes cannot be traced, or personal data is kept without a clear removal process. It also checks whether database queries and uniqueness rules handle deleted records correctly.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the claude-db plugin — 36 skills, 6 agents, 1 hook shipped together

Good fit Use it to review lifecycle fields, change-history mechanisms, data-retention policies, GDPR or CCPA deletion handling, and time-based validity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hainrixz/claude-db/db-temporal-history
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 Hainrixz/claude-db --skill db-temporal-history
Clone the repo
git clone --depth 1 https://github.com/Hainrixz/claude-db

Made for: Claude Code.

Or install claude-db, the plugin that ships this one along with the rest of its 36 skills, 6 agents, 1 hook.

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-temporal-history

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hainrixz/claude-db/db-temporal-history"><img src="https://agentmods.dev/badge/skills/hainrixz/claude-db/db-temporal-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,018 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.00063 $0.01018
Opus 5 $0.00032 $0.00509
Sonnet 5 $0.00013 $0.00204
Haiku 4.5 $0.00006 $0.00102

Measured 12d ago against content hash 376bc1fe5ff5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

db-temporal-history 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 12d 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.

skills/db-temporal-history/SKILL.md · 49 lines

How it starts

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

db-temporal-history (M8)

Data has a lifecycle: it is created, changed, retired, and — legally — sometimes must be erased. Modeling that lifecycle explicitly avoids resurrected "deleted" rows, missing audit trails when something goes wrong, and GDPR/CCPA exposure from data that should have been purged. This module is design-axis (Temporal category). It applies across paradigms.

What it checks

  • Soft-delete consistency: a deleted_at/is_deleted column present on some tables but not others, or present without the matching guards — queries/uniques/FKs that ignore it (resurrecting deleted rows in joins, UNIQUE collisions). Ties to the M5 over-nullable UNIQUE trap.
  • Audit / history trail: sensitive tables (financial, auth, permissions, config) with no change history (no *_history/*_audit table, no temporal columns, no trigger/CDC) — when something is wrong, there is no record of who changed what when.
  • Retention & erasure (GDPR/CCPA): PII held with no retention window, no documented purge/anonymization path, or "soft delete" used where the law requires actual erasure or anonymization. Cross-reference PII detection in M10.
  • Temporal validity: bitemporal/effective-dated data using a single timestamp where valid_from/valid_to is needed; missing end_date >= start_date CHECK.

Axis & severity

  • Axis: design; magnitude banded, never a fabricated record count or fine amount.
  • PII with no retention/erasure path (compliance exposure): severity 4, warn, confidence directional (legal applicability needs human review — never auto-caps).
  • Inconsistent soft-delete with no query/unique guards: severity 3, warn.
  • No audit trail on financial/auth tables: severity 3, warn.
  • M8 holds no sev-5 cap; it shapes the Temporal category value.

Tier-0 static check

Parse DDL/snapshot via scripts/parse-schema.mjs: detect soft-delete columns and check whether they appear consistently and in UNIQUE/partial-index definitions; look for companion *_history/*_audit tables or temporal columns on sensitive tables; flag PII-bearing tables (email, name, phone, address, dob) with no retention/erasure marker. Static → directional.

Read the full file on GitHub · 49 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. 12d ago First seen · 49 lines · 63 tokens per session scan A 376bc1fe5ff5

Subscribe to this mod's changes

db-temporal-history is a skill published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,018 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

bug-hunter

A news-analysis skill that looks for unreasonable details in a social or industry story, investigates possible causes and incentives, and suggests ways to address the problem.

digoal/blog · 202 tokens

dsar-fulfillment

Daily GDPR data-subject-access-request runbook. Verifies each incoming request from Gmail, locates the subject's data read-only across every relevant Postgres table, compiles an access-or-deletion report in Google Docs within the {{sladays}}-day SLA, and flags it to {{legalreviewchannel}} for a lawyer to approve.…

kortix-ai/suna · 85 tokens

dynamodb

Use when modeling or operating a DynamoDB table: deriving partition/sort keys from access patterns, single-table vs table-per-entity, adding a GSI/LSI, on-demand vs provisioned capacity, or diagnosing hot-partition throttling. NOT relational schema/SQL/EXPLAIN (that is postgresdb), NOT aggregation-pipeline document…

ericrisco/rsc-harness · 82 tokens

malloy-lookml-review

Analyze LookML files as prior art for Malloy modeling. Used during Step 1 (DISCOVER) when .lkml files are present. Coordinates reference files that extract business logic, relationships, and curation decisions. Works with or without a database connection.

malloydata/publisher · 58 tokens

state-assets-register

Download nightly XML extracts and the XSD for Estonia's State Real Estate Register (RKVR).

taivop/marketplace · 23 tokens

Data Retention Schedule Review

Use when reviewing a draft or existing data retention schedule to inventory data categories against stated purposes, collect retention-period facts, flag legal-hold interactions, and surface orphaned-data and vendor-coverage gaps for attorney review.

zgbrenner/agentcounsel · 49 tokens