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 grasscaograss/AwesomeWeldoneSkills --skill weldone-db-migrationgit clone --depth 1 https://github.com/grasscaograss/AwesomeWeldoneSkillsWrote 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/grasscaograss/awesomeweldoneskills/weldone-db-migration)<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.
<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>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.00118 | $0.02260 |
| Opus 5 | $0.00059 | $0.01130 |
| Sonnet 5 | $0.00024 | $0.00452 |
| Haiku 4.5 | $0.00012 | $0.00226 |
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.
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 — 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 exist、relation does not exist、42703、42P01、pending migrations、The model backing the context has changed、Npgsql.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-m或just 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
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.
- 10d ago First seen · 179 lines · 118 tokens per session scan A 10d50d862cfc
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.
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.
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.
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 …
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…
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.
polar-local-environment
This skill should be used when setting up or managing Polar local development environment with Docker.