AI-Assisted SQL Development with Claude Code — Rules, Skills and Agents That Enforce Conventions Anthropic's Claude Code AI coding agent can enforce SQL conventions via rules files, skills, and agents. The rules file turns a style guide into a default at generation time, ensuring generated code follows the same conventions as hand-written code. This approach is only worthwhile with guardrails: enforced conventions for readability and a human who understands the business question. A stored procedure, a migration script, a complex report — Claude Code writes them in seconds. That's the easy part. The hard part starts afterwards: generated SQL that belongs to no one drifts apart just like hand-written code — only faster, because the AI produces hundreds of lines on demand. AI-assisted SQL development only pays off when the generated code follows the same conventions as the hand-written kind — and when a human still understands what was produced. This article is the entry point to a series on how AI-assisted SQL development with Claude Code works in practice — not as autocomplete, but as three concrete levers: rules files that enforce conventions, skills for recurring tasks, and agents for multi-step data workflows. The common thread stays the data work: SQL Server, Postgres, ETL — not AI for its own sake. What you'll take away: .claude/rules/ file turns a style guide into a default at generation time; Prerequisite: a basic grasp of SQL/ETL. Claude Code Anthropic's AI coding agent is introduced here, not assumed. SQL and ETL work is full of recurring patterns: the same naming convention across hundreds of objects, the same procedure layout, the same log inserts in every load step, the same formatting across every statement. Patterns like these are the ideal ground for machine enforcement — regular enough that an AI can reproduce them reliably, and numerous enough that human discipline eventually tires. At the same time, SQL lets missing understanding slip through silently: a statement can be syntactically correct, run fast, and still answer the wrong question. An AI that generates SQL sharpens both sides — it produces patterns faster, but it also produces wrong answers faster. AI-assisted SQL development is therefore only worth it with two guardrails: enforced conventions, so the generated code stays readable and reviewable, and a human who understands the business question. Claude Code offers three mechanisms that go beyond plain autocomplete — each solves a different problem: .claude/rules/ — The following sections take each lever in turn — through the SQL lens. The most direct lever. A .claude/rules/ file sits in the repository and is handed to Claude Code as a project instruction on every request. Whatever it says becomes the default at generation time: prescribe sp