Configure and use Aider, an AI pair programming tool that makes direct edits to your code. Architect mode enabled with Claude 3.7 Sonnet via local proxy.
Configure and use Aider for AI-powered pair programming with architect mode and advanced model routing through a local OpenAI-compatible proxy.
This skill configures Aider with:
When the user invokes this skill:
1. **Verify Aider Installation**
- Check if `aider` is installed and available in PATH
- If not installed, provide installation instructions: `pip install aider-chat`
2. **Check Local Proxy**
- Verify the OpenAI-compatible API proxy is running at `http://localhost:4141/`
- This proxy should route requests to various model providers (Claude, Gemini, GPT-4, etc.)
- If proxy is not running, warn the user that the configuration depends on it
3. **Create Configuration Directory**
- Ensure `~/.config/aider/` directory exists
- Create if missing: `mkdir -p ~/.config/aider`
4. **Generate .aider.conf.yaml**
- Create the configuration file at `~/.config/aider/.aider.conf.yaml` with these settings:
```yaml
architect: true
# Main model via local proxy
model: openai/claude-3.7-sonnet-thought
edit-format: diff
editor-edit-format: editor-diff
editor-model: openai/claude-3.7-sonnet
# API configuration
openai-api-key: not-needed
openai-api-base: http://localhost:4141/
# Model aliases for quick switching
alias:
- "sonnet:openai/claude-3.7-sonnet"
- "sonnet-t:openai/claude-3.7-sonnet-thought"
- "flash:openai/gemini-2.0-flash-001"
- "o3:openai/o3-mini"
# Custom model metadata files
model-settings-file: ~/.config/aider/.aider.model.settings.yml
model-metadata-file: ~/.config/aider/.aider.model.metadata.json
show-model-warnings: false
# Repo mapping
map-tokens: 2048
# UI preferences
dark-mode: true
# Git behavior
auto-commits: false
dirty-commits: false
attribute-author: false
attribute-committer: false
# Reference files (adjust paths as needed)
read:
- "llms/gscc.md"
- "llms/conventions.md"
# Other settings
detect-urls: false
yes-always: false
```
5. **Explain Configuration Highlights**
- **Architect mode**: Aider will plan changes before implementing
- **Main model**: Claude 3.7 Sonnet (thought variant) for deep reasoning
- **Editor model**: Claude 3.7 Sonnet (standard) for focused edits
- **Diff format**: Precise line-by-line changes
- **Map tokens**: 2048 tokens for comprehensive codebase understanding
- **Git control**: Manual commits (auto-commits disabled)
6. **Usage Examples**
Basic usage:
```bash
# Start aider in current repo
aider
# Add specific files to context
aider src/main.py src/utils.py
# Use a different model via alias
aider --model sonnet
# Quick one-off change
aider --message "Add error handling to login function"
```
Advanced usage:
```bash
# Architect mode with specific files
aider --architect src/**/*.py
# Switch models mid-session (in aider chat)
/model flash
# Add files to chat context
/add src/new_module.py
# Review pending changes
/diff
```
7. **Reference Files Setup**
- If the repo has `llms/gscc.md` or `llms/conventions.md`, these will be auto-loaded as read-only context
- Users can customize the `read:` section to point to their own convention files
- Example: coding standards, architecture decisions, or API documentation
8. **Model Metadata Files**
- Inform user they may need to create `~/.config/aider/.aider.model.settings.yml` and `.aider.model.metadata.json` if using custom models
- These files define context windows and costs for models not in Aider's defaults
9. **Troubleshooting**
- If Aider fails to connect: verify `localhost:4141` proxy is running
- If model not found: check proxy supports the requested model path
- If edits fail: try switching edit format with `--edit-format whole` or `--edit-format udiff`
Users can override config per-session:
```bash
aider --no-architect
aider --model openai/gpt-4o
aider --auto-commits
aider --map-tokens 4096
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-ai-coding-assistant/raw