weldone-db-migration

weldone-db-migration is a skill for Claude Code, Codex from grasscaograss/AwesomeWeldoneSkills. It costs 118 tokens per session (2,260 once invoked), scanned A, original, Apache-2.0.

A set of instructions for keeping a Weldone project's PostgreSQL database structure in step with its code. It uses EF Core, a .NET tool that tracks database changes as migrations.

In plain words
What is it for?
It helps inspect pending migrations, update the database, create or remove migrations, and diagnose missing tables, columns, indexes, or constraints.
Why use it?
It prevents developers from patching tables or columns directly and helps avoid data loss by requiring a database backup before certain migrations.

Skill for Claude CodeCodex

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

Good fit It helps inspect pending migrations, update the database, create or remove migrations, and diagnose missing tables, columns, indexes, or constraints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grasscaograss/awesomeweldoneskills/weldone-db-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 grasscaograss/AwesomeWeldoneSkills --skill weldone-db-migration
Clone the repo
git clone --depth 1 https://github.com/grasscaograss/AwesomeWeldoneSkills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin weldone-db-migration/plugin install weldone-db-migration after adding the marketplace above.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/grasscaograss/awesomeweldoneskills/weldone-db-migration"><img src="https://agentmods.dev/badge/skills/grasscaograss/awesomeweldoneskills/weldone-db-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,260 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.00118 $0.02260
Opus 5 $0.00059 $0.01130
Sonnet 5 $0.00024 $0.00452
Haiku 4.5 $0.00012 $0.00226

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

Security

Grade A, and why

weldone-db-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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/backup-before-migrate.ps1, scripts/check-db-migration-state.ps1), 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.

weldone-db-migration/SKILL.md · 179 lines

How it starts

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

Weldone Db Migration

Overview

规范处理 Weldone 项目的数据库结构同步问题。优先遵循仓库已有 EF Core migration 与 justfile 数据库任务,避免直接往 PostgreSQL 里添加字段、建表、改约束或手写 schema 修复。

当最新代码包含数据库模型变更但本地数据库未同步时,执行迁移更新数据库;当代码确实缺少迁移时,先明确需要新增 migration,不要伪造数据库状态;当需要运行 DbMigrator 时,先备份数据库以防数据丢失。

Trigger Conditions

触发此 skill 当出现以下任一情况:

  • 拉取、切换、合并代码后,用户提到没有执行 update-db、数据库结构不匹配、缺字段、缺表、migration 没跑。
  • 运行、测试、启动报错包含 column does not existrelation does not exist4270342P01pending migrationsThe model backing the context has changedNpgsql.PostgresException 等数据库 schema 相关信号。
  • 任务涉及修改 Entity、WeldoneDbContext、EF Core configuration、migration、seed data、数据库枚举、索引、约束或外键。
  • 准备通过 SQL、脚本、Adminer、psql、数据库客户端或硬编码逻辑直接补字段、补表、改 schema。
  • 准备执行 just migrate 或需要判断“代码最新但数据库不是最新”还是“代码缺少 migration”。

Hard Rules

  • 禁止直接向数据库添加业务字段、表、索引、约束或外键来匹配代码,除非用户明确要求手工 SQL,并且说明这是临时修复。
  • 禁止把数据库缺字段问题修成代码 fallback、忽略字段、空值兜底或删除属性,除非确认需求就是代码回滚。
  • 优先执行仓库任务:just update-db;需要种子数据时,必须先备份 PostgreSQL 数据库,再执行 just migrate
  • 需要新增迁移时使用:just add-m <MigrationName>,不要手写 migration 文件替代 EF 生成结果。
  • 回滚或移除迁移时使用:just remove-mjust update-db <MigrationName>,不要删除 migration 文件后假装完成。
  • 执行数据库命令前,先确认工作目录为 Weldone 仓库根目录;默认是 D:\weldone,如项目位于其他路径,给脚本传入 -RepoRoot <路径>
  • 执行本 skill 的 .ps1 脚本时一律使用 pwsh -NoProfile -ExecutionPolicy Bypass -File ...;脚本内默认 UTF-8。
  • migrate 前备份路径必须从 $env:APPDATA 拼接到 Roboticplus\Weldone\backup-db,禁止写死 C:\Users\<用户名>
  • 备份文件名必须使用当前时间生成,格式为 ai-backup-before-migrate-yyyy-MMdd-HHmm-ssff.backup,不要复用固定示例名。
  • 遇到数据库连接失败,优先检查 PostgreSQL 是否启动、连接串配置和 just pod,不要改模型或迁移。

Workflow

1. Classify the Failure

先判断问题类型:

  • 本地数据库落后:migration 已存在,但数据库未应用。执行 just update-db
  • 需要种子数据:schema 已更新,但基础数据、权限、配置或默认记录缺失。先备份,再执行 just migrate
  • 代码缺少 migration:实体或 DbContext 变化存在,但 migration 列表没有对应变更。先运行检查,再用 just add-m <Name> 生成 migration。
  • 连接/环境问题:数据库不可达、认证失败、连接串错误、容器未启动。先修环境,不改 schema。

2. Inspect Before Acting

运行快速检查:

pwsh -NoProfile -ExecutionPolicy Bypass -File <skill>/scripts/check-db-migration-state.ps1 -RepoRoot D:\weldone

Read the full file on GitHub · 179 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. 10d ago First seen · 179 lines · 118 tokens per session scan A 10d50d862cfc

Subscribe to this mod's changes

weldone-db-migration is a skill published in the GitHub repository grasscaograss/AwesomeWeldoneSkills (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 118 tokens to every session and 2,260 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

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

volcengine-rds-postgresql

A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.

bytedance/agentkit-samples · 63 tokens

polar-local-environment

This skill should be used when setting up or managing Polar local development environment with Docker.

fcakyon/claude-codex-settings · 22 tokens