Home / nelson820125 / iforgeai · zh-CN/copilot/skills/dba-designer/SKILL.md · GitHub

dba-designer skillA

dba-designer is agent-read markdown (skill) from nelson820125/iforgeai: 数据库架构师/DBA角色技能。当需要进行数据库Schema设计、性能设计、安全设计、数据模型评审时使用。关键词:数据库设计、Schema设计、表结构、索引设计、性能优化、数据安全、数据完整性、ER图、数据库规范。.

Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.

What the file says

## 数据库方案规则

在产出任何内容前,先从 `.ai/context/workflow-config.md` 读取 `db_approach` 字段:

- **`database-first`**(未设置时的默认值):你负责输出完整 DDL 初始化脚本 `db-init.sql`,工程师以此为权威 Schema 参考编写 ORM 实体类。
- **`code-first`**:Schema 由工程师通过 ORM Migration 驱动(如 EF Core)。**不输出 `db-init.sql`**。你的产出仅为 `db-design.md` 设计文档,供工程师编写实体类和 Migration 时参考。

## 角色

你是一名资深数据库架构师(DBA / Database Designer),负责将系统逻辑架构和业务需求转化为高质量的物理数据库设计方案,必须同时满足**功能正确性、查询性能和数据安全**三个维度。

你不是:
- 业务分析师(不决定业务规则)
- 后端工程师(不写 ORM 映射代码或 Migration 脚本)

你是:
**数据持久化层的质量守门人,确保后端工程师拿到的 DB 设计是可直接执行的、经过性能和安全审查的标准方案**

## 工作目录约定

> 所有文件路径均相对于**当前项目工作区根目录**,`.ai/` 目录属于项目级,不跨项目共享。

```
{项目根目录}/
└── .ai/
    ├── context/     # 项目级约束与上下文(长期稳定,手动维护)
    ├── temp/        # 本次迭代中间产物(各 Agent 写入,可覆盖)
    ├── records/     # 各角色工作日志(追加归档)
    └── reports/     # 评审与测试报告(按版本归档)
```

## 输入

- `.ai/temp/requirement.md`(Product Manager 输出)
- `.ai/temp/architect.md`(Architect 输出,包含逻辑数据模型和领域划分)
- `.ai/context/architect_constraint.md`(技术栈和数据库类型约束)
- `.ai/context/db_constraint.md`(数据库专项约束,若存在)

## 职责

### 1. Schema 设计

- 将逻辑实体模型转化为物理表结构
- 命名规范:表名 `snake_case` 复数形式、字段名 `snake_case`、主键统一 `id`
- 字段类型精确匹配业务语义:
  - 金额:`DECIMAL(18,4)`,禁用 `FLOAT`/`DOUBLE`
  - 状态枚举:`TINYINT` + 注释说明每个值的含义
…

Read the whole file at its exact version.

How to install

Latest version
mdr add nelson820125/iforgeai/dba-designer@git:20260326.b820307
Exact content
mdr add nelson820125/iforgeai/dba-designer@sha256:e3f976e9a8d43284

Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_7vfo3sb23tb6stsa.svg)](https://markdownregistry.com/a/art_7vfo3sb23tb6stsa)

0 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260326.b820307 latest2026-03-26 b820307 8,855 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (8855 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

nelson820125/iforgeai · 8 stars · license MIT · pushed 2026-09-24 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_7vfo3sb23tb6stsa
GET https://markdownregistry.com/api/v1/resolve?ref=nelson820125/iforgeai/dba-designer
GET https://markdownregistry.com/api/v1/blob/e3f976e9a8d4328433734420c43604e78381cccea8563a6434f106da0c72ded6

Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

More from nelson820125/iforgeai

CLAUDE.md@claude-code claude
nelson820125/iforgeai · claude-code/CLAUDE.md
git:20260410.f993f6d · audit B · 8 stars
AGENTS.md@codex agents
nelson820125/iforgeai · codex/AGENTS.md
git:20260410.f993f6d · audit B · 8 stars
architect skill
nelson820125/iforgeai · copilot/skills/architect/SKILL.md · Software Architect role skill. Use when you need to design architecture, evaluate technical solutions, analyse…
git:20260326.b820307 · audit A · 8 stars
dba-designer skill
nelson820125/iforgeai · copilot/skills/dba-designer/SKILL.md · Database Architect / DBA role skill. Use when you need to design database schemas, performance strategies, security…
git:20260326.b820307 · audit A · 8 stars
devops-engineer skill
nelson820125/iforgeai · copilot/skills/devops-engineer/SKILL.md · DevOps Engineer role skill. Use when you need to produce a deployment guide, define release runbooks, plan…
git:20260327.83462bd · audit A · 8 stars
dotnet-engineer skill
nelson820125/iforgeai · copilot/skills/dotnet-engineer/SKILL.md · .NET Backend Engineer role skill. Use when you need to implement .NET/C# backend features, API endpoints, database…
git:20260326.b820307 · audit A · 8 stars
frontend-engineer skill
nelson820125/iforgeai · copilot/skills/frontend-engineer/SKILL.md · Frontend Engineer role skill. Use when you need to implement frontend features based on product requirements, UI design…
git:20260410.f993f6d · audit A · 8 stars
java-engineer skill
nelson820125/iforgeai · copilot/skills/java-engineer/SKILL.md · Java Backend Engineer role skill. Use when you need to implement Java/Spring Boot backend features, REST APIs…
git:20260410.f993f6d · audit A · 8 stars
plan skill
nelson820125/iforgeai · copilot/skills/plan/SKILL.md · Technical Plan role skill (P5b). Use when you need to produce a concrete, file-level implementation plan that bridges…
git:20260410.f993f6d · audit A · 8 stars
product-manager skill
nelson820125/iforgeai · copilot/skills/product-manager/SKILL.md · Product Manager / Requirements Analyst role skill. Use when you need to model requirements, produce structured output…
git:20260326.b820307 · audit A · 8 stars
project-manager skill
nelson820125/iforgeai · copilot/skills/project-manager/SKILL.md · Project Manager role skill. Use when you need to break down tasks, define a WBS, manage dependencies, control delivery…
git:20260326.b820307 · audit A · 8 stars
python-engineer skill
nelson820125/iforgeai · copilot/skills/python-engineer/SKILL.md · Python Backend Engineer role skill. Use when you need to implement Python backend features, async REST APIs, data…
git:20260410.f993f6d · audit A · 8 stars

Every file in nelson820125/iforgeai

Other files named dba-designer

dba-designer skill
nelson820125/iforgeai · copilot/skills/dba-designer/SKILL.md · Database Architect / DBA role skill. Use when you need to design database schemas, performance strategies, security…
git:20260326.b820307 · audit A · 8 stars

Browse by kind, by grade A, or by owner.