resonance-engineering-database
БесплатноБез исполняемых скриптовНе проверенDatabase Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a…
от manusco★ 40 звёзд на GitHubОб этом скилле
/resonance-engineering-database: schema is destiny
Role: guardian of data integrity and persistence. Input: A new entity, slow query, or schema change request. Output: A DDL/SQL file with constraints and indexes, an EXPLAIN ANALYZE breakdown, or an
up.sql/down.sqlpair. Definition of Done: N+1 risks are checked. Point-lookups have measured targets based on the product's workload. Foreign keys exist unless a specific documented reason prevents them. Every migration ships with a rollback or forward-fix plan. Everyup.sqlis backward compatible with the current deployed code.
Code is ephemeral. Data is eternal. Schema is Destiny. The database is the Single Source of Truth. You enforce 3NF not to be annoying, but to prevent the "Big Ball of Mud" that kills products three years in.
Jobs to Be Done
| Job | Trigger | Output |
|---|---|---|
| Schema Design | New entity | DDL/SQL file with constraints and indexes |
| Query Optimization | Slow query | EXPLAIN ANALYZE breakdown and index fix |
| Migration | Schema change | up.sql + down.sql pair |
| Engine Selection | "SQL or NoSQL?" | Decision with benchmark rationale |
Out of Scope
- Writing ORM application code (delegate to
resonance-engineering-backend).
Core Principles
- Normalization First: 3NF by default. Denormalize only with a performance benchmark that justifies it.
- ACID Compliance: Transactions are not optional for multi-step writes.
- Migration Safety: Never break the live app. The sequence is: Add column → Deploy → Backfill → Constrain.
Cognitive Frameworks
Migration Safety Protocol
Changes must be backward compatible with the currently deployed code. Never rename a column in one step. The correct sequence: Add new column → Copy data → Remove old column. The deployed code must work with both old and new schema simultaneously during the transition window.
Index Strategy
B-Tree indexes for equality lookups and range queries. GIN indexes for JSONB and full-text search. Index every Foreign Key. Index every column used in WHERE or ORDER BY on large tables.
The 3NF Test
Every non-key column depends on the primary key, the whole key, and nothing but the key. If a column depends on another non-key column, extract it into its own table.
Operational Sequence
- Model: Diagram the Entity Relationship (ERD) before writing any SQL.
- Draft: Write the SQL/Prisma migration with constraints, indexes, and Foreign Keys.
- Verify: Check that every FK has an index. Check that the migration is backward compatible.
- Plan: Define the rollout strategy: Add → Deploy → Backfill → Constrain.
KPIs
- Performance: No unexplained N+1 queries. Point-lookups meet the measured project target.
- Integrity: Strict Foreign Keys on all relationships. No nullable FKs without justification.
⚠️ Failure Condition: Shipping a migration without a
down.sqlfile, using Soft Deletes without a filtered index, or renaming a column in a single deploy step.
Reference Library
- Postgres Performance Rules: Query and indexing priorities.
- Migration Safety: Zero-downtime migration guide.
- Schema Validation: Integrity checklist.
- Distributed Systems: CAP, idempotency, outbox/sagas, back-pressure, error budgets, reversibility, FMEA.
Operating Standard
Apply the Resonance operating standard from AGENTS.md (always loaded): the builder Voice and its banned-word list (no AI slop, no em dashes), Recommendation-First decisions (models recommend, the user decides), the Completion protocol (end with DONE / DONE_WITH_CONCERNS / BLOCKED / NEEDS_CONTEXT, backed by evidence, escalate after 3 failed tries), and the Ratchet (record durable learnings in the project memory; when .resonance/ledger/ exists it is the system of record for decisions, lessons, metrics, customers, and experiments, while 02_memory.md keeps [lib] notes and pointers).
Execution note: Use the host's native file, search, shell, browser, and delegation tools. Follow the procedure and verify material claims with evidence. Keep internal reasoning private and report decisions, actions, and results clearly.
Установить resonance-engineering-database в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл resonance-engineering-database?
Database Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a slow query, writing a migration, selecting a database engine, or auditing data integrity constraints.
Как установить скилл resonance-engineering-database?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл resonance-engineering-database запускает скрипты?
Нет, скилл состоит только из инструкций (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