database-migration

database-migration is a skill for Claude Code, Codex from KimYx0207/Kim_Service. It costs 81 tokens per session (656 once invoked), scanned A, original, MIT.

A database migration plan changes a database in stages so old and new application versions can work together. It covers adding the new structure, moving existing data, switching users, and cleaning up safely.

In plain words
What is it for?
Use it for changes such as adding or renaming fields in large PostgreSQL tables, including batch backfills, checks for locks and data correctness, and recovery steps.
Why use it?
It reduces downtime and avoids breaking applications while a schema changes. It also separates code rollback from data recovery and marks points that cannot be undone.

Skill for Claude CodeCodex

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

Good fit Use it for changes such as adding or renaming fields in large PostgreSQL tables, including batch backfills, checks for locks and data correctness, and recovery steps.

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

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-migration

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimyx0207/kim_service/database-migration"><img src="https://agentmods.dev/badge/skills/kimyx0207/kim_service/database-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 656 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.00081 $0.00656
Opus 5.5 $0.00032 $0.00262
Sonnet 5.5 $0.00016 $0.00131
Haiku 4.5 $0.00008 $0.00066

Measured 19d ago against content hash 73e133a58575, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 1 executable file (tests/contract.test.mjs), 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-migration/SKILL.md · 47 lines

What it actually says

数据库渐进迁移

把数据库结构变更拆成兼容扩展、可重跑回填、切换和清理,保留可恢复路径。

输入与开始方式

  • change:当前/目标schema、数据库版本和业务不变量。先找受影响入口与写入者。
  • traffic:表规模、读写模式、消费者版本和部署顺序。缺规模先做小样本演练,估计项写明。
  • recovery:备份、恢复时间目标、回滚和校验方式。先确认能恢复何种数据,再决定删旧字段时机。

缺少非关键资料时,先给明确假设下的草案或局部结果;资料补齐后只重验受影响部分。授权已覆盖的可逆工作继续,不重复确认。

执行

  1. 定位所有读写者与schema约束,确认数据库版本和变更影响。
  2. 设计expand阶段让旧新客户端共存,保持旧行为可用。
  3. 按稳定主键分批回填并保存进度,更新条件避免覆盖新写入。
  4. 检查锁、时延、数据完整及新旧读路径,再切换消费者。
  5. 确认旧写入者消失且恢复路径可用后收缩;记录不可逆点和恢复步骤。

按需要读 专业方法 和 完整案例。

交付

  • sequence:扩展到收缩顺序。
  • backfill:可重跑回填。
  • verification:锁和数据验证。
  • recoveryPlan:回退和清理。

检查结果

  • 旧新版本共存时先扩展并双读/双写或兼容映射,校验后才删旧。
  • 固定分批边界、检查点与幂等规则,核行数及业务值。
  • 按实际版本检查锁/耗时/约束,数据检查含空值、冲突和消费者读取。
  • 区分代码回滚、数据恢复及不可逆点,满足条件后清理旧路径。

检查方法和证据要求在 method.json;参考 作者正反例 识别实际错误。

需要额外处理的动作

生产DDL和不可逆数据删除按已有授权及恢复条件执行;迁移脚本、兼容代码和隔离演练可继续。

Files

What ships with it

11 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. 19d ago First seen · 47 lines · 81 tokens per session scan A 73e133a58575

Subscribe to this mod's changes

database-migration is a skill published in the GitHub repository KimYx0207/Kim_Service (198 stars, last pushed 12d ago), licensed MIT. It adds 81 tokens to every session and 656 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-11-11.

Related

database-migration compared with skills from other repositories

database-migration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
database-migrationKimYx0207/Kim_ServiceSkill19812d agoMITA81Claude Code, Codex
alloydb-basicsgoogle/skillsSkill25ktodayApache-2.0A72Claude Code, Codex
postgresql-table-designwshobson/agentsSkill43k5d agoMITA37Claude Code
db-repairgarrytan/gbrainSkill34ktodayMITA96Claude Code
dsqlawslabs/agent-pluginsSkill953todayApache-2.0A247Claude Code
volcengine-rds-postgresqlbytedance/agentkit-samplesSkill4965d agoApache-2.0A63Claude Code, Codex
postgresdbericrisco/rsc-harnessSkill6824d agoMITA91Claude Code, Codex