Tool-specific configuration files that teach AI coding assistants to follow your engineering standards automatically.
AI coding assistants like Cursor, Claude, and GitHub Copilot are powerful, but without proper guidance, they can:
Context files solve this problem by teaching AI assistants your project's standards, security requirements, and coding conventions. Each AI tool reads its specific configuration format automatically.
Cursor uses .mdc (Markdown Configuration) files with scoped rules and priorities.
---
title: Security Standards
priority: 100
scope: "**/*"
---
# NEVER Commit Secrets
❌ API keys, tokens, passwords
❌ Private keys (SSH, TLS)
✅ Use .env files (gitignored)
## Example: Proper Secret Handling
import os
api_key = os.environ.get("API_KEY")
Cursor automatically loads all .mdc files in .cursor/rules/ when:
001_workspace.mdc - Repository context and structure002_design_principles.mdc - Core architectural principles003_bash_standards.mdc - Shell scripting standards004_python_standards.mdc - Python coding conventions005_yaml_json_standards.mdc - Data format guidelines006_security.mdc - Security requirements (HIGHEST PRIORITY)007_precommit.mdc - Pre-commit workflow008_documentation.mdc - Documentation standardsRules have priorities (0-100). Higher priority rules override lower ones:
Claude Desktop reads CLAUDE.md for comprehensive, conversational instructions.
# AI Coding Assistant Guidelines
You are assisting with a professional software engineering project.
Follow these standards:
## Security (CRITICAL)
❌ NEVER commit API keys, passwords, or credentials
✅ ALWAYS use environment variables
## Code Quality
- Python: Type hints required for public functions
- Bash: Use set -euo pipefail
- All code must pass pre-commit hooks
Claude Desktop reads CLAUDE.md when:
Tip: Add to your prompt: "Please read CLAUDE.md first"
Claude Projects uses .claudeprompt for single-line configuration.
You are a professional software engineer. Read CONTEXT.md for standards. Never commit secrets. All code must pass pre-commit hooks. Use type hints in Python and set -euo pipefail in Bash.
.claudeprompt is loaded automatically for every Claude Projects conversation.
GitHub Copilot reads instructions from .github/copilot-instructions.md.
# Copilot Instructions
## Security Rules
- Never generate hardcoded secrets
- Use environment variables for credentials
- Validate all user inputs
## Code Style
- Python: Use type hints and docstrings
- JavaScript: Use const/let, never var
- Always include error handling
GitHub Copilot reads this file continuously while coding:
Aider uses YAML configuration with auto-read files.
auto-commits: true
read:
- CONTEXT.md
- CONTRIBUTING.md
lint-cmd: "pre-commit run --files"
test-cmd: "pytest tests/"
Aider loads .aider.conf.yml on startup and:
Continue.dev uses a comprehensive YAML configuration with rules, prompts, and context providers.
rules:
- "Read CONTEXT.md for coding standards"
- "Never commit secrets or credentials"
- "All commits must pass pre-commit hooks"
customCommands:
- name: "review"
prompt: "Review this code for security issues"
- name: "test"
prompt: "Generate unit tests for this function"
contextProviders:
- "code"
- "diff"
- "terminal"
Continue.dev loads config when:
Exclude files from AI context (like .gitignore for AI).
# Dependencies
node_modules/
venv/
.venv/
# Build outputs
dist/
build/
*.pyc
# Large files
*.log
*.db
Configure formatters and linters for Windsurf.
{
"python.formatting.provider": "black",
"python.linting.enabled": true,
"editor.formatOnSave": true,
"files.exclude": {
"**/__pycache__": true,
"**/.pytest_cache": true
}
}
Windsurf uses these files continuously:
.windsurfignore - Filters files from AI context.vscode/settings.json - Configures editor behavior# Clone the Guardrails-AI repository
git clone https://github.com/christopherpaquin/Guardrails-AI .ai-guardrails
# Copy context files
cp .ai-guardrails/AGENTS.md .
cp .ai-guardrails/CONTEXT.md .
cp .ai-guardrails/CONTRIBUTING.md .
# Copy tool-specific configs
cp .ai-guardrails/.cursor/ . -r # Cursor
cp .ai-guardrails/CLAUDE.md . # Claude Desktop
cp .ai-guardrails/.claudeprompt . # Claude Projects
cp .ai-guardrails/.github/copilot-instructions.md .github/ # Copilot
cp .ai-guardrails/.aider/ . -r # Aider
cp .ai-guardrails/.continue/ . -r # Continue.dev
cp .ai-guardrails/.windsurfignore . # Windsurf
cp .ai-guardrails/.vscode/ . -r # VS Code/Windsurf
.cursor/rules/ directory to your project rootCLAUDE.md to your project root.github/copilot-instructions.mdTest that context files are working:
# Test 1: Ask AI to create a script with secrets
# Expected: AI should refuse and suggest environment variables
# Test 2: Ask AI to write Python without type hints
# Expected: AI should include type hints automatically
# Test 3: Ask AI to write a bash script
# Expected: Should include set -euo pipefail