Using Atlas with AI Agents
AI agents are great at writing code, but generating database migrations is a different challenge. As schemas grow, ensuring migrations are deterministic, safe, and policy-compliant becomes critical.
Atlas lets AI agents focus on editing the schema while it handles the infrastructure:
- Migration Generation — correct, safe, and deterministic migrations.
- Migration Linting — semantic validation and best-practice enforcement.
- Policy Enforcement — organizational rules for allowed changes.
- Schema Testing — AI writes logic (functions, views, queries) and tests; Atlas executes and reports failures.
- Data Migration Testing — seed data, run tests, detect errors, and let the AI fix them.
Agent Skills
Agent Skills are an open standard for packaging domain expertise for AI agents. Atlas provides a skill that handles schema migrations, linting, testing, and policy enforcement — so the agent doesn't need to learn the Atlas CLI from scratch.
To help agents produce better results, provide structured schema context. See the Database Schema as Context guide for how to organize schema files and the benchmark showing 10/10 query accuracy with the right structure.
Agent Skills
Install the Atlas migration skill for AI agents.
Database Schema as Context
Organize schema files for maximum AI agent accuracy.
Setup Instructions
Configure your AI agent to work with Atlas using project-level instruction files:
GitHub Copilot
Configure GitHub Copilot with Atlas-specific instructions.
Cursor
Set up Cursor with Atlas-specific rules.
Claude Code
Set up Claude Code with Atlas-specific instructions.
OpenAI Codex
Set up OpenAI Codex with Atlas-specific instructions.
Example Workflow
The instructions above teach the AI agent to follow this workflow when generating migrations:
1. Edit the schema

2. Generate and validate migrations
The agent runs atlas migrate diff to generate the migration, then atlas migrate lint to validate it.

3. Apply the migration
The agent applies with atlas migrate apply, starting with a dry-run.
