Using Atlas with AI Agents
Instruction files for AI agents
AI agents like GitHub Copilot, Cursor, and Claude Code are great at general purpose coding tasks, but they can be even more powerful when extended using domain-specific tools, such as Atlas.
AI agents can be configured to adapt their behavior on a project or repository level by providing them with specific instructions or rules. This allows them to better understand the context of the code they are working with and provide more relevant suggestions.
Schema management is a complex task that requires precision and determinism to ensure reliable operation of the application. For this reason, we believe it is best to delegate schema management to a specialized tool like Atlas.
To help your AI agent get the most out of Atlas, we have created a set of instructions and rules that can be used to configure them to work with Atlas. These instructions and rules are designed to help the AI agent understand how and when to use optimally use Atlas.
Prompt Library
GitHub Copilot Instructions
Configure GitHub Copilot with Atlas-specific instructions.
Cursor Instructions
Set up Cursor with Atlas-specific rules.
Claude Code Instructions
Set up Claude Code with Atlas-specific instructions.
Example workflow - generating migrations
The above instructions teach the AI agent to use a specific workflow when generating migrations. When generating migrations, there are several steps that the AI agent should follow:
1. Analyze the current schema and make necessary changes.

2. Generate the necessary migration files.
The AI agent should use atlas migrate diff
to generate the migration file. After generating the migration, the AI agent
should validate the migration file by running atlas migrate lint
and fix any issues that arise.

3. Apply the migration files to the database.
The last step is applying the migration files to the database using atlas migrate apply
. The assistant should first
try applying a dry-run.
