flyway-consolidate

flyway-consolidate is a skill for Claude Code from joaquimscosta/arkhe-claude-plugins. It costs 78 tokens per session (968 once invoked), scanned A, original, MIT.

A tool for combining Flyway SQL migration files into a smaller set of clean table-creation migrations. Flyway is a tool that applies database changes in order; this tool is intended for pre-production projects whose database can be rebuilt.

In plain words
What is it for?
Use it to inspect Flyway files, reconstruct the final schema, group tables by business area, order them around foreign-key dependencies, and generate replacement CREATE TABLE migrations after confirmation.
Why use it?
Many incremental migrations can make a new project’s schema history hard to follow. Consolidating them simplifies the starting schema, but it is not intended for an existing production database whose history must remain intact.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to inspect Flyway files, reconstruct the final schema, group tables by business area, order them around foreign-key dependencies, and generate replacement CREATE TABLE migrations after confirmation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate
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 joaquimscosta/arkhe-claude-plugins --skill flyway-consolidate
Clone the repo
git clone --depth 1 https://github.com/joaquimscosta/arkhe-claude-plugins

Made for: Claude Code.

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 flyway-consolidate

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate/github.svg)](https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate)
Your own site
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate/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 flyway-consolidate

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/flyway-consolidate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 968 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.00078 $0.00968
Opus 5.5 $0.00031 $0.00387
Sonnet 5.5 $0.00016 $0.00194
Haiku 4.5 $0.00008 $0.00097

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

Security

Grade A, and why

flyway-consolidate 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.

plugins/spring-boot/skills/flyway-consolidate/SKILL.md · 100 lines

How it starts

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

Flyway Migration Consolidation

Analyze incremental Flyway migrations and generate consolidated, domain-grouped CREATE TABLE migrations for pre-production projects where the database can be reset from scratch.

When to Use

Scenario Apply?
Pre-production project with migration sprawl Yes
Database can be reset from scratch Yes
Many incremental ALTER TABLE migrations Yes
Want domain-based organization before release Yes
Production database exists No
Migration history must be preserved No

Consolidation Workflow

  1. Discover — Find all V*__*.sql files using Glob
  2. Analyze — Read each migration, identify CREATE/ALTER/INSERT operations and affected tables
  3. Infer final schema — Apply all changes in order to determine the intended final state
  4. Group by domain — Organize tables into logical business domains
  5. Resolve dependencies — Topological sort by FK relationships
  6. Generate — Produce clean CREATE TABLE migrations when user confirms

See WORKFLOW.md for detailed step-by-step process.

Output Structure

Produce these deliverables in order:

1. Analysis Report

  • Total migration count and breakdown by type (CREATE, ALTER, INSERT)
  • Per-migration summary: what it does, which tables it affects
  • Final table count and column inventory

2. Domain Grouping

  • Tables organized by inferred business domain
  • Migration-to-domain mapping showing which originals feed into each group

3. Proposed Structure

  • New migration file list (e.g., V1–V6) with table assignments
  • Dependency order rationale
  • Reduction metrics (file count, estimated line savings)

4. Consolidated SQL (on request)

  • Clean CREATE TABLE statements with final-form columns and constraints
  • Separate migration for idempotent seed data
  • Optional separate migration for performance indexes

Domain Grouping Heuristics

Signal Assignment
Table prefix (user_*, order_*) Prefix-based domain
Foreign key cluster Related tables share domain
Join tables (user_roles) Domain of primary entity
Audit tables (*_audit, *_history) Same domain as parent
Config/settings tables Infrastructure domain
Explicit schema namespaces Schema name as domain

Read the full file on GitHub · 100 lines

Files

What ships with it

3 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. yesterday First seen · 100 lines · 78 tokens per session scan A f23f47e448b5

Subscribe to this mod's changes

flyway-consolidate is a skill published in the GitHub repository joaquimscosta/arkhe-claude-plugins (21 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 968 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-10-16.

Related

Other skills, from other repositories