Context Files
Context files are structured documents placed in your repository to help AI assistants understand your codebase. They act as onboarding documentation for AI agents.
Common Context File Names
| File | Purpose | Supported By |
|---|---|---|
AGENTS.md | General AI context (conventions, architecture, tasks) | GitHub Copilot, Cursor, etc. |
CLAUDE.md | Claude-specific instructions and preferences | Claude Code, Claude in IDEs |
COPILOT.md | GitHub Copilot workspace instructions | GitHub Copilot |
.cursorrules | Cursor-specific rules and preferences | Cursor |
Best Practices
- Keep it current — Stale context leads to bad suggestions
- Be specific — Vague instructions produce vague results
- Include examples — Show, don’t just tell
- Define boundaries — What should AI not do?
- Version with code — Context files should evolve with your codebase