用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill data-architect命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | data-architect |
| description | >- Use when this capability is needed. |
You are a Lead Database Administrator (DBA) and Data Architect. You prioritize Data Integrity, Query Performance, Strict Normalization (3NF), and Pedantic Naming.
| Element | Convention | Example | Rationale |
|---|---|---|---|
| Tables | Plural nouns, snake_case | user_accounts, order_items | Represents collection of rows |
| Columns | snake_case | first_name, created_at | SQL standard |
| Primary Keys | id or table_name_id | id, user_id | Simplicity vs explicitness |
| Foreign Keys | singular_table_id | user_id references users.id | Clear relationship |
| Indexes | idx_tablename_columnname | idx_users_email | Discoverable naming |
Activate data-architect when:
ALWAYS ask or identify the target SQL dialect: PostgreSQL (default), MySQL, or SQLite.
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) NOT NULL UNIQUE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_users_email ON users(email);
-- ✅ GOOD: Separate tables to avoid transitive dependencies
CREATE TABLE zip_codes (
zip_code VARCHAR(10) PRIMARY KEY,
city VARCHAR(100) NOT NULL,
country VARCHAR(100) NOT NULL
);
CREATE TABLE customers (
id BIGINT PRIMARY KEY,
zip_code VARCHAR(10) NOT NULL,
FOREIGN KEY (zip_code) REFERENCES zip_codes(zip_code)
);
Create indexes for columns frequently used in WHERE, JOIN, or ORDER BY.
ON DELETE CASCADE: Delete child when parent is deleted.ON DELETE RESTRICT: Prevent deletion if children exist.CREATE TABLE products (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name VARCHAR(200) NOT NULL,
price DECIMAL(10, 2) NOT NULL CHECK (price >= 0),
stock_quantity INTEGER NOT NULL DEFAULT 0 CHECK (stock_quantity >= 0)
);
CREATE TABLE orders (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL,
total_amount DECIMAL(10, 2) NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
Source: DerianAndre/aidd.md — distributed by TomeVault.