Dev Database logo

Dev Database

Organization
devcodex-labs
dev-database

数据库开发子类型规范 — Migration 安全策略 + Schema 变更审查

Overview

Publisherdevcodex-labs
Repositorydevcodex
Skill namedev-database
Stars
433
Forks
44
Bundled files
1
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by devcodex-labs on GitHub. Read the source before you install it.

Installation

Install the Dev Database AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/devcodex-labs/devcodex/tree/main/content/skills/dev-database
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/devcodex-labs/devcodex.git /tmp/devcodex
mkdir -p .claude/skills
cp -r /tmp/devcodex/content/skills/dev-database .claude/skills/dev-database
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dev Database in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dev Database on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dev Database is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Dev Database Skill

触发条件

涉及数据库操作:Schema 变更(DDL)、Migration 文件、ORM 模型、查询优化、数据迁移。

执行规则

Migration 安全策略

操作类型要求
新增列DEFAULT 或 NULLABLE,禁止 NOT NULL 无默认值(避免锁表)
删除列必须先废弃(rename/注释),至少一个版本后再删除
修改列类型评估存量数据兼容性,准备回滚脚本
新建索引生产环境使用 CONCURRENTLY(PostgreSQL)或 ALGORITHM=INPLACE(MySQL)

CP 流程

  • CP2 必须包含:Schema ER 图 / 变更前后对比表 / 回滚方案
  • plan-review(两阶段门禁):PR-1 在 CP2 前自检,PR-2~PR-7 在 CP2→CP3 之间执行,PR-5③ Schema 变更属于此路径,不进 impact-review
  • CP3 必须包含:上线步骤(Migration 执行时机)+ 回滚触发条件

产出物

  • migrations/YYYYMMDD_description.{sql|ts|js} — Migration 文件
  • reports/requirements/ — 开发报告(含 Schema 变更说明)

关键约束

  • 🔴 禁止在 Migration 中写业务逻辑(纯 DDL + 数据修复)
  • 🔴 大表(>100万行)变更必须评估锁时间,提供在线变更方案
  • 🔴 数据库、MongoDB 或数据操作连接信息默认可按用户提供内容直写或沿用项目既有模式;只有用户或项目明确指定 config.local.json、env、secretRef 或 secret manager 时,才从对应入口读取,缺失文件或字段时提醒用户补齐
  • 🔴 数据补齐、迁移或跨环境写入必须执行 DataMutationPlan:范围来自显式清单、需求目录数据源或稳定业务键;跨环境写入不得直接用 source _id 匹配目标库,必须在目标环境重新唯一匹配并 dry-run 输出 source_id、target_id、缺失/重复清单;不能唯一匹配时阻断写库
  • 🔴 数据库配置、邮件模板、模块注册、推送配置、权限配置、字典配置等记录跨环境手动迁移必须执行 DatabaseRecordMigrationExportGate:只读源环境,导出主记录和引用记录的全字段 JSON/Extended JSON 备份,生成可执行 insert/upsert 脚本、执行顺序、引用完整性校验和目标 dry-run 说明;不得只给单条记录或截图说明
  • 🔴 一次性数据脚本默认执行 OneOffRequirementScriptPlacementGate:需要留档/复核时放入对应 requirement/bug/任务目录 scripts/;纯本地临时执行时须先通过 lifecycle constructor 分配 WorkspaceTempManifestV2,再写入 canonical workspace temp 的 runs/<project>/<producer>/<run-id>/local-scripts/。V1 manifest 只读兼容;禁止在任务目录另建 .tmp;只有长期复用、发布、维护或运维入口才进入项目通用 scripts/

Migration 执行后验证(F-13)

Migration 执行完成后须执行以下验证,完成后方可宣告任务完成:

验证项操作通过标准
Schema 一致性对比 ORM 模型与实际表结构列名/类型/约束完全一致
存量数据可用抽样查询受影响的行无报错,关键字段无 NULL 异常
索引生效EXPLAIN 关键查询新索引被使用,无全表扫描回退
回滚可用性验证回滚脚本语法(干运行)回滚脚本无语法错误

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Dev Database AI skill do?

数据库开发子类型规范 — Migration 安全策略 + Schema 变更审查

Why use Dev Database on TypingMind?

Because you install it once and use it with any model. Dev Database is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dev Database in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/devcodex-labs/devcodex/tree/main/content/skills/dev-database. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Dev Database?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dev Database?

As many as you like. As long as a model supports skills, you can use Dev Database with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dev Database AI skill free?

Yes. It is published on GitHub by devcodex-labs under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇