Configure Aider with Claude 3.5 Sonnet for expert AI pair-programming with step-by-step reasoning and automated workflows
Professional Aider configuration optimized for AI pair-programming with Claude 3.5 Sonnet, featuring expert system prompting and extensible automation hooks.
This configuration sets up Aider to work as an expert AI pair-programmer using Anthropic's Claude 3.5 Sonnet model. It establishes a thoughtful, step-by-step reasoning approach and provides a foundation for automated linting and testing workflows.
Create a file named `.aider.conf.yml` in your project root with the following configuration:
```yaml
default_lm: anthropic/claude-3.5-sonnet
anthropic_api_key:
system_message: |
You are an expert AI pair-programmer.
You are working inside a larger automated system.
Carefully follow the instructions provided in the user's prompt.
Reason step-by-step and think through your plan before making code changes.
```
Set your Anthropic API key as an environment variable (recommended approach):
```bash
export ANTHROPIC_API_KEY='your-api-key-here'
```
Or add it to your shell profile (`.bashrc`, `.zshrc`, etc.):
```bash
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc
```
Run Aider to verify it picks up your configuration:
```bash
aider --help
```
Check that it's using Claude 3.5 Sonnet as the default model.
When you're ready to add automated linting or testing before code changes, uncomment and customize the hooks section:
```yaml
hooks:
pre_command: [npm run lint --if-present]
# or for Python projects:
# pre_command: [pytest, ruff check .]
```
```bash
aider src/main.py
```
Start coding with Aider using your configured settings. The system message ensures step-by-step reasoning.
```bash
aider src/main.py tests/test_main.py
```
Work across multiple files simultaneously while maintaining context.
```bash
aider --auto-commits
```
Automatically commit changes after each successful modification.
**Model Selection:** Claude 3.5 Sonnet is chosen for:
**System Message:** The custom prompt ensures:
**Automation Hooks:** Prepared structure for:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-ai-shell-configuration/raw