cli-audit-data

cli-audit-data is a skill for Claude Code from Destynova2/cli-code-skills. It costs 85 tokens per session (4,117 once invoked), scanned A, original, MIT.

A database safety auditor for PostgreSQL applications written with Rust and SQLx, a Rust library for working with SQL databases. It examines schemas, migrations, transactions, constraints, indexes, and data-changing workflows.

In plain words
What is it for?
Use it to review database changes, state transitions, queues, multi-tenant data, soft deletion, ledgers, audit trails, and repair procedures.
Why use it?
It looks for failures that basic create-read-update-delete tests may miss, including concurrency conflicts, retries, partial failures, and data drift.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the cli-code-skills plugin — 36 skills shipped together

Good fit Use it to review database changes, state transitions, queues, multi-tenant data, soft deletion, ledgers, audit trails, and repair procedures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/destynova2/cli-code-skills/cli-audit-data
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 Destynova2/cli-code-skills --skill cli-audit-data
Clone the repo
git clone --depth 1 https://github.com/Destynova2/cli-code-skills

Made for: Claude Code.

Or install cli-code-skills, the plugin that ships this one along with the rest of its 36 skills.

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 cli-audit-data

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/destynova2/cli-code-skills/cli-audit-data"><img src="https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-audit-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,117 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.00085 $0.04117
Opus 5.5 $0.00034 $0.01647
Sonnet 5.5 $0.00017 $0.00823
Haiku 4.5 $0.00009 $0.00412

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

Security

Grade A, and why

cli-audit-data 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.

cli-audit-data/SKILL.md · 500 lines

How it starts

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

Optimization: Read detailed references only when the audited scope needs them.

Language rule: Write user-facing reports in the project's dominant language. Keep SQL, identifiers, paths, SQLSTATE values, and the mandatory uncertainty marker unchanged.

Audit Data — PostgreSQL and SQLx Safety

Purpose

Detect database code that compiles and passes nominal CRUD tests but violates business logic under concurrency, retries, failures, migration, mixed application versions, or data drift.

Treat the database as a dynamic system that must preserve explicit laws across every transition. Physics, biomimicry, cybernetics and safety engineering are lenses for discovering risks; only constraints, atomic operations, demonstrated transaction protocols and reproducible PostgreSQL tests count as technical proof.

Read ../shared/data-invariants.md before auditing; it owns the cross-skill criticality, invariant, conservation, interleaving, proof-ladder, and uncertainty contracts. Read ../gotchas.md last.

Non-negotiable rules

  1. Do not implement before identifying sources of truth and invariants.
  2. Give every business fact one explicit owner and authoritative source.
  3. Protect persistent invariants in PostgreSQL; Rust validation alone is not an integrity guarantee.
  4. Analyze every read -> decide -> write sequence with at least two concurrent actors.
  5. Give every retryable operation an explicit idempotency protocol.
  6. Bound, observe and repair every eventually consistent fact.
  7. Analyze every migration with old code, new code and mixed-version deployment.
  8. Put all writes of one atomic business decision inside one explicit transaction boundary.
  9. Never make external network calls while a PostgreSQL transaction is open.
  10. Never ignore rows_affected() == 0 when zero rows has business meaning.
  11. Never silently edit an already-applied migration.
  12. Never claim cross-system exactly once without a demonstrated protocol; use durable identity, idempotence and outbox/inbox patterns.
  13. Never use SQLite or mocks as proof of PostgreSQL concurrency behavior.
  14. Decide deletion, cascade, retention, anonymization and restoration explicitly.
  15. Make every derived fact reconstructible or give it an auditable repair protocol.

Read the full file on GitHub · 500 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 500 lines · 85 tokens per session scan A 62b8f0f65962

Subscribe to this mod's changes

cli-audit-data is a skill published in the GitHub repository Destynova2/cli-code-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 4,117 once invoked, about $0.0003 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

managing-supabase

Supabase CLI for database management, Edge Functions, migrations, and local development. Use for managing Postgres databases, deploying serverless functions, and debugging Supabase projects.

FortiumPartners/ensemble · 40 tokens

sql-insight

Translate natural language to SQL, optimize query performance, and interpret EXPLAIN plans for SQLite and PostgreSQL. Triggered when users ask to convert questions into SQL, improve slow queries, tune indexes, analyze execution plans, or mention keywords like NL2SQL, query tuning, or full table scan.

zebbern/claude-code-guide · 64 tokens

database-scout

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Triggered by requests to explore a database, view table structures, describe tables, generate diagrams, or query data, and by keywords like…

zebbern/claude-code-guide · 76 tokens

postgresdb

Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…

ericrisco/rsc-harness · 91 tokens

neon

Use when you have picked Neon (serverless Postgres) and need to connect correctly from a serverless or edge runtime, wire database branching into dev, preview and CI, or stop being burned by scale-to-zero cold starts and pooler limits — including choosing HTTP versus WebSocket connections and pooled versus direct…

ericrisco/rsc-harness · 93 tokens

mesh-memory

Self-hosted semantic memory for AI agents via MCP. Save worklogs, decisions, and notes, then recall them across sessions by meaning, not keyword. Postgres + pgvector with auto-tagging.

skillmds/skillmd · 44 tokens