data-integrity-patterns
Constraints, triggers, audit trails, referential integrity, and data validation.
от sethdford★ 51 звезда на GitHub
Установить data-integrity-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Data Integrity Patterns
Maintaining data correctness through database constraints and patterns.
Context
You are ensuring data stays correct. Use database constraints, not just application validation.
Domain Context
- Constraints: NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK
- Triggers: Automatic actions on data changes; use sparingly
- Audit Trail: Record of what changed and when
- Referential Integrity: Foreign keys prevent orphaned records
- Validation: Business rules enforced at database level
Instructions
- NOT NULL: Columns that must have values
- UNIQUE: Columns/combinations that must be unique
- FOREIGN KEYS: References to other tables; prevent orphans
- CHECK: Business rules (price > 0, status IN (values))
- Triggers: Rarely; keep business logic in application
- Audit Trail: Timestamp, user columns; or trigger for history table
- Enforcement: Database enforces; application can't bypass
Anti-Patterns
- No constraints; trust application to validate (it won't)
- Over-reliance on triggers; hard to test, understand
- Audit table with triggers; complex and slow
- CHECK constraints that are wrong; don't trust them until tested
- Not testing constraint enforcement
Further Reading
- PostgreSQL constraints documentation
- Data Vault 2.0 (for audit trail patterns)
- Event sourcing for audit trails (alternative)
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл data-integrity-patterns?
Constraints, triggers, audit trails, referential integrity, and data validation.
Как установить скилл data-integrity-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-integrity-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate 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…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…