Configure Aider to use Claude 3.5 Sonnet via OpenRouter with optimized settings for AI storytelling projects
Configure Aider to use Claude 3.5 Sonnet through OpenRouter with optimal settings for AI-powered development workflows.
Follow these steps to set up Aider with OpenRouter integration:
1. **Create the configuration file**
- Copy the configuration to `.aider.conf.yml` in your project root
- This file configures Aider's model, API access, and workflow settings
2. **Set up OpenRouter API access**
- Obtain an OpenRouter API key from https://openrouter.ai/
- Set the key either:
- In the config file: `openrouter-api-key: sk-or-v1-your-api-key`
- As an environment variable: `export OPENROUTER_API_KEY=sk-or-v1-your-api-key`
- Environment variable is recommended for security
3. **Configure the model**
- Model is set to `openrouter/anthropic/claude-3.5-sonnet`
- This uses Claude 3.5 Sonnet through OpenRouter's unified API
- To change models, update the `model:` line with another OpenRouter model identifier
4. **Configure Git integration**
- `git: true` enables Git tracking for all changes
- `auto-commits: false` requires manual commit approval
- This gives you full control over what gets committed
- Review changes with `git diff` before committing
5. **Set editor format**
- `edit-format: diff` shows changes in diff format
- Makes it easy to review what Aider modified
- Alternative formats: `whole`, `udiff`
6. **Start using Aider**
- Run `aider` in your project directory
- Aider will automatically load settings from `.aider.conf.yml`
- Begin pair programming with Claude 3.5 Sonnet
```yaml
model: openrouter/anthropic/claude-3.5-sonnet
git: true
auto-commits: false
edit-format: diff
```
This configuration is optimized for:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-openrouter-configuration/raw