skills/schema-architect/SKILL.md
Derives the database schema from business requirements. Selects optimal normalization levels (1NF->3NF->BCNF) and prevents God tables.
npx skillsauth add fatih-developer/fth-skills schema-architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill transforms raw business requirements into a robust, normalized, and scalable database schema. It avoids common anti-patterns like "God Tables" or EAV (Entity-Attribute-Value) abuse.
Core assumption: A good schema must be extensible, maintainable, and explicitly document your design choices.
Before writing any SQL, analyze the request:
Scan your intended design against common pitfalls:
Users having billing, shipping, and auth info in one huge table)? → Split them!entity_id and entity_type without Foreign Key constraints? → Use standard associative tables or exclusive arcs!Identify the target database (agnostic approach). Generate platform-specific SQL schema.
Required Outputs (Must write BOTH to docs/database-report/):
docs/database-report/schema-architect-report.md)### 🏗️ Schema Generation Report
- **Target Dialect:** [PostgreSQL/MySQL/Snowflake]
- **Normalization Level:** [e.g., 3NF]
- **Trade-offs made:** [Fast Read vs. Fast Write considerations]
#### 📜 Generated DDL
```sql
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
2. **Machine-Readable JSON (`docs/database-report/schema-architect-output.json`)**
```json
{
"skill": "schema-architect",
"dialect": "PostgreSQL",
"entities": ["users"],
"relations": [],
"raw_ddl": "CREATE TABLE..."
}
schema.prisma or .sql files).VARCHAR without limits unless using PostgreSQL TEXT. Use proper types (JSONB, NUMERIC(p,s), TIMESTAMPTZ vs TIMESTAMP).UUIDv7 or BIGSERIAL/BIGINT IDENTITY for primary keys for distributed readiness.created_at and updated_at must exist on almost all operational operational tables.If you are executing the New Schema Design Flow as defined in the Database ECOSYSTEM guide, and the schema has been successfully generated, the next mandatory skill in the sequence is:
@access-policy-designer (to design Row-Level Security constraints or app-level access controls for the new tables)tools
Create, optimize, critique, and structure prompts for AI systems. Use this skill whenever the user is designing or improving a prompt, system prompt, coding prompt, image prompt, evaluation rubric, agent prompt, workflow prompt, or MCP-oriented prompt package. Also use it when the user asks to turn vague AI behavior into a precise instruction set, tool policy, agent spec, or prompt architecture.
testing
Assumption-first architecture review skill to stress-test project plans and expose hidden risks.
testing
Enforce and manage DESIGN.md specifications, extract design systems from URLs, and combine design reasoning with token roles to prevent drift.
testing
Forces the agent to act with a Claude-like product mindset, prioritizing user journey, UX states, and visual quality before coding.