sethdford/claude-skills/data-integrity-patterns

Claude Code and agent skill by sethdford/claude-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Constraints, triggers, audit trails, referential integrity, and data validation.

Install

npx vskill@latest install sethdford/claude-skills/data-integrity-patterns

SKILL.md

The same SKILL.md was published earlier as sethdford/claude-skills/data-integrity-patterns.

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

  1. NOT NULL: Columns that must have values
  2. UNIQUE: Columns/combinations that must be unique
  3. FOREIGN KEYS: References to other tables; prevent orphans
  4. CHECK: Business rules (price > 0, status IN (values))
  5. Triggers: Rarely; keep business logic in application
  6. Audit Trail: Timestamp, user columns; or trigger for history table
  7. 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)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
43
Repository forks
9
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sethdford/claude-skills/data-integrity-patterns/badge)](https://verified-skill.com/skills/sethdford/claude-skills/data-integrity-patterns)

Something wrong with this skill or its page? Tell us.