database-inspector

database-inspector is a skill for Claude Code, Codex from serejaris/kimi-skills. It costs 91 tokens per session (1,253 once invoked), scanned A, original, MIT.

A read-only explorer for SQLite and PostgreSQL databases. It lists tables, shows their columns and relationships, previews records, draws Mermaid ER diagrams, and runs safe queries without changing data.

In plain words
What is it for?
Use it to inspect schemas, constraints, indexes, and sample rows; map table relationships; and run SELECT-style queries.
Why use it?
It helps developers understand an unfamiliar database while reducing the risk of accidental edits during investigation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect schemas, constraints, indexes, and sample rows; map table relationships; and run SELECT-style queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/kimi-skills/database-inspector
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 serejaris/kimi-skills --skill database-inspector
Clone the repo
git clone --depth 1 https://github.com/serejaris/kimi-skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/database-inspector"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/database-inspector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,253 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.00091 $0.01253
Opus 5 $0.00046 $0.00626
Sonnet 5 $0.00018 $0.00251
Haiku 4.5 $0.00009 $0.00125

Measured 7d ago against content hash 1bbaf270e9cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

database-inspector 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/db_explorer.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/database-inspector/SKILL.md · 133 lines

How it starts

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

db-explorer

SQLite / PostgreSQL 数据库只读探索工具 —— 查看表结构、预览数据、生成 ER 图、执行安全查询。

能力概览

功能 说明
列出所有表 显示数据库中的表和视图,含行数统计
查看表结构 列名、类型、约束(PK/FK/NOT NULL)、索引、默认值
数据预览 查看表的前 N 行数据
ER 图生成 输出 Mermaid erDiagram 语法,可直接渲染
安全只读查询 仅允许 SELECT/WITH/EXPLAIN,自动拦截写入操作

安全机制

  • 连接层只读:SQLite 使用 ?mode=ro URI 打开;PostgreSQL 使用 SET SESSION READ ONLY
  • SQL 白名单:仅允许 SELECT / WITH / EXPLAIN / PRAGMA / SHOW 开头
  • 危险关键字拦截:INSERT、UPDATE、DELETE、DROP、ALTER、CREATE 等 30+ 关键字被阻止
  • 多语句拦截:禁止分号分隔的多条 SQL(防止注入)
  • 标识符转义:表名使用双引号转义,防止 SQL 注入

Quick Start

# 列出 SQLite 数据库中的所有表
python3 scripts/db_explorer.py --db-path data.db list-tables

# 查看表结构
python3 scripts/db_explorer.py --db-path data.db describe users

# 预览数据(默认 20 行)
python3 scripts/db_explorer.py --db-path data.db preview orders --limit 10

# 生成 Mermaid ER 图
python3 scripts/db_explorer.py --db-path data.db er-diagram

# 执行只读查询
python3 scripts/db_explorer.py --db-path data.db query "SELECT name, age FROM users WHERE age > 18 LIMIT 10"

PostgreSQL

# 连接 PostgreSQL
python3 scripts/db_explorer.py --db-type postgres --dsn "host=localhost dbname=mydb user=reader" list-tables

# 查看表结构
python3 scripts/db_explorer.py --db-type postgres --dsn "host=localhost dbname=mydb user=reader" describe orders

详细用法

参数说明

参数 必填 默认值 说明
--db-type sqlite 数据库类型:sqlite 或 postgres
--db-path SQLite 时必填 SQLite 数据库文件路径
--dsn PostgreSQL 时必填 PostgreSQL 连接串

子命令

命令 说明 示例
list-tables 列出所有表/视图 list-tables
describe <table> 查看表结构详情 describe users
preview <table> [--limit N / -n N] 预览前 N 行数据 preview orders --limit 5
er-diagram 生成 Mermaid ER 图 er-diagram
query "<sql>" 执行只读 SQL query "SELECT count(*) FROM users"

输出示例

list-tables

[
  {"name": "users", "type": "table", "row_count": 1500},
  {"name": "orders", "type": "table", "row_count": 8200},
  {"name": "user_stats", "type": "view", "row_count": 1500}
]

Read the full file on GitHub · 133 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. 7d ago First seen · 133 lines · 91 tokens per session scan A 1bbaf270e9cd

Subscribe to this mod's changes

database-inspector is a skill published in the GitHub repository serejaris/kimi-skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 91 tokens to every session and 1,253 once invoked, about $0.0005 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-03.

Related

Other skills, from other repositories

postgres

Use when working with PostgreSQL specifically. Covers indexing, MVCC and vacuum, connection pooling, partitioning, JSONB, replication, and the operational realities that separate Postgres from generic SQL.

nimadorostkar/Claude-Skills-collection · 41 tokens

backend-setup-stack

Bootstraps a local Node.js backend development stack with Docker, PostgreSQL, and an ORM (Prisma or Sequelize). Use this skill whenever the user wants to: initialize a new backend project, set up a Dockerized database locally, wire up an ORM with automated migrations, scaffold an Express server with a health endpoint…

WESTsyre21/setup-backend-stack · 155 tokens

backend-setup-stack

Use this skill when the user wants to initialize a local development environment using Docker, PostgreSQL, an npm server, and an ORM (Prisma/Sequelize) with automated migration workflows, including detection of existing migration metadata and database readiness checks.

WESTsyre21/setup-backend-stack · 54 tokens

database-architecture

MANDATORY when designing schemas, writing migrations, creating indexes, or making architectural database decisions - enforces PostgreSQL 18 best practices including AIO, UUIDv7, temporal constraints, and modern indexing strategies.

troykelly/claude-skills · 45 tokens

postgis

MANDATORY when working with geographic data, spatial queries, geometry operations, or location-based features - enforces PostGIS 3.6.1 best practices including STCoverageClean, SFCGAL 3D functions, and bigint topology.

troykelly/claude-skills · 52 tokens

timescaledb

MANDATORY when working with time-series data, hypertables, continuous aggregates, or compression - enforces TimescaleDB 2.24.0 best practices including lightning-fast recompression, UUIDv7 continuous aggregates, and Direct Compress.

troykelly/claude-skills · 50 tokens