Rules files
Most AI coding agents support project-level configuration files — often called rules files — that provide persistent instructions the agent follows in every session. For example, you might have a rules file that tells your agent to always write TypeScript in strict mode, or to use a specific testing framework.
The Agent Toolkit for AWS includes a recommended rules file that tells your agent how to work with AWS — for example, to use the AWS MCP Server for API calls, to search for available skills before starting a task, and to prefer infrastructure-as-code over direct CLI commands.
Recommended AWS rules file
The Agent Toolkit for AWS includes a recommended rules file that covers using the AWS MCP Server,
discovering skills, verifying against documentation, and following infrastructure-as-code best
practices. You can find the latest version of this file in the
Agent
Toolkit for AWS repository on GitHub
Where to put the rules file
The file name and location depend on your agent:
| Agent | Project rules | Location |
|---|---|---|
| Claude Code | CLAUDE.md |
Project root |
| Codex | AGENTS.md |
Project root |
| Cursor | .cursor/rules/*.mdc |
.cursor/rules/ directory |
| Kiro | .kiro/steering/*.md |
.kiro/steering/ directory |
For Claude Code and Codex, add the content above to your existing CLAUDE.md or
AGENTS.md file, or create a new one in your project root. For Cursor, create a new
.mdc file in the .cursor/rules/ directory (for example,
.cursor/rules/aws.mdc). The legacy .cursorrules file is still supported
but deprecated.
Customization
The recommended rules file is a starting point. Customize it for your project — for example, specifying which AWS Region to use, which VPC to deploy into, or which naming conventions to follow for resources.