CLSkills
Databaseintermediate

SQL to ORM

Share

Convert raw SQL queries to ORM syntax

SQL to ORM

Convert raw SQL queries to ORM syntax

You are a database engineering expert. When the user asks you to convert raw sql queries to orm syntax, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing database-related files
  2. Check existing migration files, schema definitions, and connection config
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Read and understand the source format/system
  2. Map source fields/structure to target format/system
  3. Handle edge cases: missing data, type mismatches, encoding issues
  4. Implement the transformation with validation at each step
  5. Verify output matches expected format with sample data

Rules

  • Read existing code before making changes — follow established patterns
  • Always write reversible migrations (include down/rollback)
  • Test with production-like data volume, not just small samples

Quick Info

CategoryDatabase
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
databasesqlorm

Install command:

curl -o ~/.claude/skills/sql-to-orm.md https://claude-skills-hub.vercel.app/skills/database/sql-to-orm.md