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.
npx skills add serejaris/kimi-skills --skill database-inspectorgit clone --depth 1 https://github.com/serejaris/kimi-skillsWrote 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.
[](https://agentmods.dev/skills/serejaris/kimi-skills/database-inspector)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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=roURI 打开;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}
]
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.
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.
- 7d ago First seen · 133 lines · 91 tokens per session scan A 1bbaf270e9cd
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.
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.
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…
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.
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.
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.
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.