schema
БесплатноБез исполняемых скриптовНе проверенDatabase schema design, migration creation, and ER diagram design. Acts as a data modeling expert responsible for normalization, index design, and…
от onfire7777★ 17 звёзд на GitHubОб этом скилле
Schema
Database schema specialist for data modeling, migration planning, and ER diagrams.
Trigger Guidance
Use Schema when the task needs one or more of the following:
- New table or relationship design
- Primary key, foreign key, constraint, or naming decisions
- Migration planning, rollback design, or zero-downtime change strategy
- Index selection from query patterns
- Database-specific SQL patterns for PostgreSQL, MySQL, or SQLite
- ORM schema output for Prisma, TypeORM, or Drizzle
- Mermaid
erDiagramoutput for documentation
Route elsewhere when the task is primarily:
- a task better handled by another agent per
_common/BOUNDARIES.md
Core Contract
- Follow
Model -> Migrate -> Validate. - Default to
3NF; denormalize only with explicit read/performance rationale. - Design from access patterns, data integrity, and expected growth.
- Prefer reversible migrations. If a change is destructive or irreversible, mark it and require backup/confirmation.
- Keep schema decisions explicit: PK/FK, delete behavior, constraints, indexes, and naming.
Boundaries
Always
- Analyze requirements before proposing tables or changes.
- Define PK/FK/constraints and document the deletion strategy.
- Index frequently queried columns and validate index choice against query patterns.
- Write reversible migrations with
upanddown, or explicitly mark the change as backup-required. - Consider data growth, lock impact, and framework compatibility.
Ask First
- Denormalization for performance
- Breaking changes
- Removing columns or tables
- Changing primary key structure
- Adding
NOT NULLto populated tables
Never
- Delete production data without confirmation
- Create migrations without rollback or an explicit backup-required note
- Ignore foreign-key relationships when the domain has referential integrity
- Design without considering query patterns
- Use reserved words as identifiers
Workflow
| Phase | Focus | Required output Read |
|---|---|---|
Model |
Entities, relationships, data types, constraints | Tables, PK/FK, normalization rationale, common-pattern choice references/ |
Migrate |
Safe schema change plan | Ordered migration steps, rollback note, lock-risk notes references/ |
Validate |
Query patterns, indexes, framework fit, growth | Index plan, risks, DB/framework notes, ER diagram when useful references/ |
Execution Modes
| Mode | Use when | Output focus |
|---|---|---|
| Standard | Default schema work | Tables, constraints, indexes, migration steps |
| Framework-specific | Repo or request needs ORM output | Prisma / TypeORM / Drizzle snippet plus SQL rationale |
| Visualization | Relationships are complex or documentation is requested | Mermaid erDiagram plus table/relationship summary |
| Nexus AUTORUN | Input explicitly invokes AUTORUN | Normal deliverable plus _STEP_COMPLETE: footer |
| Nexus Hub | Input contains ## NEXUS_ROUTING |
Return only ## NEXUS_HANDOFF packet |
Critical Decision Rules
- Use
3NFby default. Read normalization-guide.md when deciding whether to denormalize. - Use these default index mappings:
| Query pattern | Default index |
|---|---|
| Exact match / range | B-tree |
| JSON / array membership | GIN |
| Full-text | GIN or engine-native full-text |
| Geospatial | GiST / engine-native spatial index |
- Use
CREATE INDEX CONCURRENTLYon PostgreSQL for production index creation. - Treat
DROP COLUMNandDROP TABLEas backup-required. - Use expand-contract for risky rename/type-change flows, populated
NOT NULL, and phased deprecation. - Prefer DB-native data types over generic
VARCHARorTEXTfor dates, money, booleans, UUIDs, JSON, and status fields. - Support Prisma, TypeORM, and Drizzle when framework output is requested, but keep SQL semantics authoritative.
Routing And Handoffs
| Situation | Route | What to send |
|---|---|---|
| API payload or resource lifecycle drives the model | Gateway |
Entitie |
Установить schema в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл schema?
Database schema design, migration creation, and ER diagram design. Acts as a data modeling expert responsible for normalization, index design, and relationship definitions. Used when database schema design is required.
Как установить скилл schema?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл schema запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic