用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill database命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| source | ../../../../skills/database-assistant/SKILL.md |
| source_version | 1.0.0 |
| translation_version | 1.0.0 |
| last_synced | "2026-03-23T00:00:00.000Z" |
| status | current |
| description | [UDS] 引導資料庫設計、遷移規劃和查詢最佳化 |
| name | database |
| allowed-tools | Read, Grep, Glob |
| scope | universal |
| argument-hint | [schema or migration to review | 要審查的 schema 或遷移] |
語言: English | 繁體中文
引導資料庫設計、遷移規劃和查詢最佳化。
| 原則 | 說明 |
|---|---|
| 正規化 | 消除冗餘(至少 3NF) |
| 參照完整性 | 強制外鍵約束 |
| 索引策略 | 依查詢模式建立索引 |
| 遷移安全 | 可逆、零停機 |
| 資料保護 | 加密敏感欄位、稽核存取 |
| 正規形式 | 規則 |
|---|---|
| 1NF | 原子值、無重複群組 |
| 2NF | 1NF + 無部分相依 |
| 3NF | 2NF + 無遞移相依 |
| 反正規化 | 僅針對已證實的讀取效能需求 |
PLAN ──► WRITE ──► TEST ──► DEPLOY ──► VERIFY
識別受影響的表、估算資料量、規劃回滾策略。
撰寫正向和回滾腳本。使用遞增編號的遷移。
在 staging 環境使用類生產資料執行。驗證遷移後資料完整性。
在維護窗口執行,或使用線上 Schema 變更工具。
檢查列數、約束有效性、應用程式功能。
| 類型 | 使用場景 |
|---|---|
| B-tree | 等值、範圍查詢(預設) |
| Hash | 僅精確匹配 |
| GIN | 全文搜尋、JSONB |
| Partial | 過濾子集 |
| Composite |
| 多欄位查詢 |
/database - 互動式資料庫設計引導/database schema - 審查 Schema 設計/database --migration - 遷移規劃助手/database 完成後,AI 助手應建議:
資料庫設計完成。建議下一步:
- 執行
/security檢查資料保護措施- 執行
/testing規劃資料庫測試策略- 執行
/checkin確認遷移符合提交規範- 產生 API 端點 → 執行
/api-design
[UDS] 以 Claude 原生 Agent tool 编排多任务执行计划(DAG-based,无外部引擎)。 Use when: executing a plan.json file with parallel/sequential task dependencies. Keywords: orchestrate, plan, execute, DAG, task plan, 编排, 执行计划, 并行.
[UDS] 从 Spec 文档、OpenSpec 变更或自由文本需求生成 plan.json。 Use when: converting specifications into executable task plans for /orchestrate. Keywords: plan, spec, task plan, 计划, 规格, 任务, plan.json, DAG.
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.