flydb-cli

A command-line tool for managing database migrations, which are controlled changes that update a database's structure over time.

In plain words
What is it for?
Use it to initialize and validate migrations, check status, run baselines, repair migration history, clean or undo changes, and connect supported JDBC databases.
Why use it?
It provides documented commands for checking, previewing, applying, repairing, undoing, and monitoring migrations across database environments.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/zzxcoding/flydb/flydb-cli
Any agent
npx skills add zzxCoding/Flydb --skill flydb-cli
Clone the repo
git clone --depth 1 https://github.com/zzxCoding/Flydb

Made for: Claude Code, Codex.

Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00126 $0.03035
Opus 5 $0.00063 $0.01517
Sonnet 5 $0.00025 $0.00607
Haiku 4.5 $0.00013 $0.00303

Measured yesterday against content hash b110d3c44887, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flydb-cli 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 yesterday.

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.

flydb-skills/skills/flydb-cli/SKILL.md · 122 lines

How it starts

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

Flydb CLI

使用 Flydb 独立 CLI 完成一次可追溯的数据库迁移操作。这个 Skill 只负责定位文档、选择命令、执行安全检查和汇报结果;命令参数与数据库边界以 Flydb 仓库文档为准。

1. 先定位 Flydb 和文档

  1. 先确认用户要求使用的是 Flydb CLI,并区分 Flydb 源码仓库、已构建发行包和外部迁移脚本仓库。迁移脚本位于 Flyway 或其他项目中,不代表要改用那个项目的迁移工具;不要只凭目录名猜测执行入口。
  2. 定位与目标 CLI 版本匹配的文档。源码仓库应能看到 flydb-core/flydb-cli/docs/;发行包优先使用包内 docs/。先读 docs/reference/commands.md,确认全局选项、命令语义、锁范围和 --dry-run 支持范围。
  3. 根据任务读取:
  4. 如果 Skill 被复制到独立目录,以上相对链接可能不可用。此时先从目标 CLI 发行包,再从 Flydb checkout 查找同名文档;两处都没有时报告缺少版本匹配文档,不要自行猜测选项。

2. 建立执行上下文

执行任何数据库命令前,明确并在回复中记录:

  • 使用的 CLI 路径或发行包目录;
  • flydb.conf--config 来源;
  • JDBC URL 的脱敏摘要、目标数据库和方言标识;
  • 迁移脚本位置(通常是 filesystem:db/migration);脚本位于外部仓库时记录解析后的绝对位置和当前工作目录;
  • 这是本地、测试、预发还是生产数据库;
  • 用户要查看、校验、预演还是实际写入。

密码支持直接配置 flydb.password(明文,仅建议本地临时测试),也支持 FLYDB_PASSWORD${env:VAR}flydb.password.file。生产和共享环境优先使用后三者。不要把密码放进命令历史、日志、Skill 输出或 SQL 文件;不要为了确认连接而打印完整 JDBC URL 中的凭据。

优先确认 CLI 能运行:

bin/flydb version

如果没有可用的 bin/flydb,先报告缺少发行包/构建产物;不要把源码目录当成已经安装的 CLI,也不要未经请求启动数据库或下载厂商驱动。

3. 选择命令

用户目标 命令 默认动作
创建配置和迁移目录 init 只生成本地文件,不连接数据库
查看迁移状态 info 读取数据库和本地脚本,不持有迁移锁
校验 checksum、失败记录和迁移集合 validate 只读校验
预演迁移 --dry-run migrate 探测、解析并打印 SQL,不执行 SQL
执行待迁移脚本 migrate 写入数据库并持有迁移锁
为存量库写入基线 baseline 写入历史记录并持有迁移锁
清理失败记录或对齐 checksum repair 修改历史表并持有迁移锁
撤销最近一次版本化迁移 undo--dry-run undo undo 会执行 SQL 并持有迁移锁
清空目标 schema clean 高风险破坏性操作,默认禁用

Read the full file on GitHub · 122 lines

Files

What ships with it

1 file 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. yesterday First seen · 122 lines · 126 tokens per session scan A b110d3c44887

Subscribe to this mod's changes

flydb-cli is a skill published in the GitHub repository zzxCoding/Flydb (9 stars, last pushed 5d ago), licensed Apache-2.0. It adds 126 tokens to every session and 3,035 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories