enki-dev-expert/engineering-standards/engineering-database-review

Claude Code and agent skill by enki-dev-expert/engineering-standards

Trust tier 3
  • community
Source check pending

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

Design, audit, secure, optimize and validate database systems using the Global Engineering Standards. Use for database architecture, SQL and NoSQL reviews, schema design, data integrity, multi-tenant isolation, indexing, query performance, migrations, backups, disaster recovery, scalability, cloud databases and autonomous database implementation.

Install

npx vskill@latest install enki-dev-expert/engineering-standards/engineering-database-review

SKILL.md

The same SKILL.md was published earlier as enki-dev-expert/engineering-standards/engineering-database-review.

Engineering Database Review

1. Purpose

Provide a consistent and evidence-based workflow for database engineering.

This skill supports:

  • Database architecture and selection.
  • SQL and NoSQL database reviews.
  • Schema design.
  • Data modeling.
  • Data integrity.
  • Transactions.
  • Access control.
  • Multi-tenant isolation.
  • Query optimization.
  • Index management.
  • Schema migrations.
  • Backup and recovery.
  • Database security.
  • Database scalability.
  • Managed database services.
  • Cloud database portability.
  • Cost optimization.
  • Database testing.
  • Autonomous database implementation.

The objective is to build reliable, maintainable, secure and cost-efficient data systems that can evolve with real business requirements.

Protect existing data.

Never treat database access as permission to modify or delete production records.

2. Global Engineering Standards

The Global Engineering Standards repository is located at:

~/engineering-standards/

Primary reference:

~/engineering-standards/docs/data.md

Additional references when relevant:

  • docs/security.md
  • docs/privacy.md
  • docs/architecture.md
  • docs/scalability.md
  • docs/cost-engineering.md
  • docs/quality-and-testing.md
  • docs/observability.md
  • docs/ai-and-llm.md
  • docs/governance.md
  • docs/mobile-and-web.md
  • docs/platforms-and-applications.md

Resolve these references relative to the engineering-standards repository.

Apply standards according to the project's actual architecture.

Do not load every document when only a subset is relevant.

3. When to Use This Skill

Use for tasks involving:

  • Database selection.
  • Database schema design.
  • Table or collection design.
  • SQL queries.
  • NoSQL queries.
  • ORM configuration.
  • Database performance.
  • Indexing.
  • Database migrations.
  • Transaction processing.
  • Backup strategies.
  • Recovery planning.
  • Multi-tenant systems.
  • Data retention.
  • Data deletion.
  • Database access security.
  • Data-intensive AI systems.
  • Scalability planning.
  • Database cost estimation.

Also use when building database-dependent functionality in Autonomous Build Mode.

Do not assume every application requires a remote database.

4. Supported Database Technologies

Work with relevant database technologies, including:

  • PostgreSQL.
  • MySQL.
  • MariaDB.
  • SQLite.
  • Microsoft SQL Server.
  • Oracle Database.
  • MongoDB.
  • Redis.
  • DynamoDB.
  • Azure Cosmos DB.
  • Google Cloud Firestore.
  • Firebase Realtime Database.
  • Supabase PostgreSQL.
  • Cloud SQL.
  • Amazon RDS and Aurora.
  • Managed document databases.
  • Search engines.
  • Vector databases.
  • Time-series databases.
  • Graph databases.
  • Embedded databases.

This list is illustrative, not mandatory or exhaustive.

Evaluate the actual database capabilities and requirements.

Do not impose PostgreSQL, MongoDB, Supabase, Firebase or another provider on every project.

5. Operating Modes

Support:

  • Supervised Mode.
  • Autonomous Build Mode.

Supervised Mode is the default.

Autonomous Build Mode requires explicit user authorization.

Both modes must preserve:

  • Data integrity.
  • Security.
  • Privacy.
  • Reliability.
  • Scalability.
  • Cost discipline.
  • Honest validation.

Consult docs/governance.md.

6. Supervised Mode

For an existing database system:

  1. Identify the authorized scope.
  2. Inspect relevant schemas and source code.
  3. Review application data flows.
  4. Evaluate current safeguards.
  5. Identify confirmed problems.
  6. Distinguish hypotheses from evidence.
  7. Assess proposed changes.
  8. Evaluate migration risks.
  9. Recommend minimal effective improvements.
  10. Obtain required approval before significant changes.

A default audit of a production database is read-only.

Do not execute data-changing statements during read-only assessment.

7. Autonomous Build Mode

When explicitly authorized to build a complete application:

  1. Identify data requirements.
  2. Select an appropriate database architecture.
  3. Design entities and relationships.
  4. Define data invariants.
  5. Implement authorized local schemas.
  6. Write necessary database access logic.
  7. Create migration files.
  8. Implement authorization and isolation.
  9. Add data integrity tests.
  10. Validate queries and transactions.
  11. Review performance.
  12. Correct identified defects.
  13. Document deployment requirements.
  14. Continue independent authorized tasks.
  15. Consolidate human actions at handoff.

Do not interrupt for every ordinary local schema or query change.

Autonomous Build Mode does not authorize destructive production operations.

8. Scope and Authorization

Before database operations, establish:

  • Project repository.
  • Database engine.
  • Environment.
  • Connection scope.
  • Available permissions.
  • Data sensitivity.
  • Approved operations.
  • Protected resources.
  • Backup requirements.

Treat production, staging and local development environments separately.

Do not assume a database URL grants permission to modify its contents.

9. Initial Database Assessment

Inspect relevant authorized information:

  • Schema definitions.
  • Migration files.
  • ORM models.
  • Database clients.
  • Query builders.
  • Stored procedures.
  • Access policies.
  • Index definitions.
  • Test data.
  • Backup documentation.
  • Database configuration.
  • Application data access code.

Prefer repository and configuration analysis before live database access.

Do not expose credentials.

10. Data Requirements

Identify:

  • Core entities.
  • Relationships.
  • Business rules.
  • Read patterns.
  • Write patterns.
  • Expected data volume.
  • Retention requirements.
  • Query latency targets.
  • Consistency requirements.
  • Availability requirements.
  • Regulatory constraints.

Do not invent critical business rules.

Document assumptions requiring validation.

11. Database Selection

Evaluate possible solutions according to:

  • Data model.
  • Transaction requirements.
  • Query complexity.
  • Operational maturity.
  • Ecosystem compatibility.
  • Scaling needs.
  • Security controls.
  • Hosting options.
  • Portability.
  • Total cost.
  • Team capabilities.
  • Recovery requirements.

Select the simplest suitable solution.

Do not select a database solely because it is popular.

12. Relational Data Modeling

For relational systems:

  • Define meaningful entities.
  • Select appropriate primary keys.
  • Model relationships explicitly.
  • Use foreign keys where supported and appropriate.
  • Apply suitable constraints.
  • Avoid unnecessary duplication.
  • Consider normalization.
  • Introduce denormalization only with clear justification.

Align schema design with business invariants.

13. NoSQL Data Modeling

For document, key-value and other NoSQL systems:

  • Identify access patterns.
  • Define document or item boundaries.
  • Evaluate consistency guarantees.
  • Avoid unbounded document growth.
  • Consider indexing limitations.
  • Define update atomicity.
  • Plan for schema evolution.
  • Evaluate query costs.

Do not assume NoSQL automatically provides greater scalability.

14. Data Integrity

Protect critical invariants using appropriate mechanisms.

Examples:

  • Primary key constraints.
  • Unique constraints.
  • Foreign keys.
  • Check constraints.
  • Transaction boundaries.
  • Version checks.
  • Atomic updates.
  • Server-side validation.

Do not rely exclusively on client-side checks.

Do not use AI-generated decisions as substitutes for deterministic data constraints.

15. Transactions

Evaluate:

  • Transaction atomicity.
  • Isolation level.
  • Consistency.
  • Durability.
  • Concurrent updates.
  • Deadlocks.
  • Rollback behavior.
  • Retry handling.

Use transactions for operations requiring coordinated data changes.

Avoid unnecessarily long transactions.

Document transaction boundaries for important workflows.

16. Concurrency Control

Review relevant:

  • Optimistic locking.
  • Pessimistic locking.
  • Atomic operations.
  • Unique constraints.
  • Idempotency keys.
  • Version columns.
  • Compare-and-swap mechanisms.
  • Distributed coordination.

Test race conditions where feasible.

Do not assume operations are safe merely because they work sequentially.

17. Idempotency

For repeatable or retried operations:

  • Identify duplicate execution risks.
  • Define idempotency boundaries.
  • Use stable request identifiers where appropriate.
  • Store processing status safely.
  • Consider transaction interactions.
  • Define retry behavior.

Important examples may include:

  • Payments.
  • Reservations.
  • Inventory changes.
  • Claim processing.
  • Webhook handling.
  • Background jobs.

Ensure retries do not accidentally duplicate consequential actions.

18. Data Types and Precision

Choose data types according to actual requirements.

Consider:

  • Numeric precision.
  • Currency handling.
  • Date and time representation.
  • Time zones.
  • Unicode.
  • Identifiers.
  • Boolean semantics.
  • Large text.
  • Binary storage.

Avoid floating-point arithmetic for monetary values when exact decimal handling is required.

Do not silently truncate data.

19. Data Validation

Validate important data at trusted boundaries.

Consider:

  • Required values.
  • Valid ranges.
  • Format requirements.
  • Referential consistency.
  • Domain-specific constraints.
  • State transitions.
  • Ownership.

Application validation and database constraints should complement each other.

20. Authentication and Database Access

Review how application identities access the database.

Consider:

  • Database roles.
  • Application service accounts.
  • Credential scopes.
  • Connection pooling.
  • Administrative clients.
  • Read-only accounts.
  • Privileged operations.

Apply least privilege.

Do not expose privileged database credentials in browser or mobile applications.

21. Authorization

Enforce appropriate authorization for:

  • Reading records.
  • Creating records.
  • Updating records.
  • Deleting records.
  • Exporting data.
  • Administrative operations.
  • Background processing.
  • File metadata access.

Never trust a client-supplied owner or tenant identifier without verification.

Authentication is not sufficient without resource authorization.

22. Multi-Tenant Isolation

For multi-tenant systems, evaluate:

  • Tenant identity.
  • Tenant-aware queries.
  • Row-level security.
  • Database-per-tenant patterns.
  • Schema-per-tenant patterns.
  • Shared-table designs.
  • Administrative exceptions.
  • Cache isolation.
  • Background job isolation.
  • Search index isolation.

Select isolation according to requirements and risk.

Test cross-tenant access using controlled fixtures.

Do not retrieve real data belonging to another tenant merely to test isolation.

23. Row-Level Security

Where supported and appropriate:

  • Define clear policies.
  • Validate authenticated identity.
  • Restrict access by tenant or owner.
  • Review bypass roles.
  • Review privileged service clients.
  • Test read and write policies.
  • Verify administrative boundaries.

RLS is not a substitute for secure application architecture.

Do not assume every database engine supports the same RLS mechanisms.

24. SQL Injection Prevention

Use parameterized statements or safe query-builder APIs.

Avoid constructing executable SQL from untrusted text.

Review:

  • Dynamic queries.
  • Search filters.
  • Sorting parameters.
  • Raw SQL.
  • Stored procedure inputs.
  • Identifier interpolation.

Apply allowlists where SQL identifiers must be selected dynamically.

Do not concatenate arbitrary user input into executable queries.

25. NoSQL Query Security

Review:

  • Operator injection.
  • Dynamic filters.
  • Document ownership.
  • Aggregation pipelines.
  • Untrusted query objects.
  • Access-control enforcement.

Validate input structures.

Do not allow clients to provide unrestricted database query expressions.

26. Index Design

Review indexes according to actual access patterns.

Evaluate:

  • Filter columns.
  • Join keys.
  • Sort order.
  • Selectivity.
  • Compound indexes.
  • Unique indexes.
  • Partial indexes.
  • Covering indexes.
  • Write amplification.
  • Storage costs.

Do not create indexes indiscriminately.

Measure effects when possible.

27. Query Performance

This is the start of the file. Read the full SKILL.md on GitHub.

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

7-day trend score
0

Not refreshed yet.

Works with

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

  • Claude Code
  • 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/enki-dev-expert/engineering-standards/engineering-database-review/badge)](https://verified-skill.com/skills/enki-dev-expert/engineering-standards/engineering-database-review)

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