Configure and use Aider, an AI pair programming tool that runs in your terminal and makes changes directly to your local git repository with support for multiple AI models and intelligent code editing.
This skill has safety concerns that you should review before use. Some patterns were detected that may pose a risk.Safety score: 60/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
An AI-powered pair programming assistant that integrates directly with your git repository to make intelligent code changes. Aider supports multiple AI models, automatic git commits, code refactoring, and conversational coding workflows.
This skill helps you configure and use Aider effectively for AI-assisted coding. Aider runs in your terminal, understands your codebase through repository maps, makes direct edits to files, and automatically commits changes with meaningful messages. It supports major AI providers (OpenAI, Anthropic, etc.) and offers advanced features like architect mode, automatic linting, testing, and voice input.
First, ensure Aider is installed:
Create a `.aider.conf.yml` file in either:
The configuration file uses YAML format. Only include settings you want to customize.
**API Keys** (store in config or .env file):
```yaml
openai-api-key: your-key-here
anthropic-api-key: your-key-here
```
**Main Model Selection**:
```yaml
model: claude-3-7-sonnet-20250219
model: gpt-4o
```
**Edit Format** (controls how AI makes changes):
```yaml
edit-format: diff # Most reliable for most models
architect: true # Enable architect mode for complex changes
```
Aider creates an intelligent map of your codebase:
```yaml
map-tokens: 1024
map-refresh: auto
map-multiplier-no-files: 2
```
Configure automatic commits and git behavior:
```yaml
git: true
auto-commits: true
dirty-commits: true
attribute-author: true
attribute-committer: true
attribute-co-authored-by: true
attribute-commit-message-author: false
```
**Automatic Linting**:
```yaml
auto-lint: true
lint-cmd:
- "python: ruff check --fix"
- "javascript: eslint --fix"
- "typescript: eslint --fix"
```
**Automatic Testing**:
```yaml
auto-test: false # Set true to run tests after changes
test-cmd: pytest # or npm test, cargo test, etc.
```
Use different models for different tasks:
```yaml
model: claude-3-7-sonnet-20250219
weak-model: claude-3-5-haiku-20241022
editor-model: gpt-4o
editor-edit-format: editor-diff
```
```yaml
dark-mode: true # or light-mode: true
stream: true
pretty: true
user-input-color: "#00cc00"
assistant-output-color: "#0088ff"
code-theme: monokai # or solarized-dark, default, etc.
```
```yaml
chat-history-file: .aider.chat.history.md
input-history-file: .aider.input.history
restore-chat-history: false
llm-history-file: .aider.llm.history
```
**Prompt Caching** (reduces API costs):
```yaml
cache-prompts: true
cache-keepalive-pings: 3 # Keep cache warm
```
**Chat History Management**:
```yaml
max-chat-history-tokens: 4096
```
**Voice Input**:
```yaml
voice-format: wav # or webm, mp3 (requires ffmpeg)
voice-language: en
```
**Shell Commands**:
```yaml
suggest-shell-commands: true # AI suggests shell commands
```
**URL Detection**:
```yaml
detect-urls: true # Auto-detect and offer to scrape URLs
```
**Starting Aider**:
```bash
aider
aider src/main.py tests/test_main.py
aider --read docs/api.md src/app.py
aider --message "Add error handling to login function"
```
**Common Commands in Aider**:
1. **Start with defaults**: Only override settings you need
2. **Use .aiderignore**: Like .gitignore, exclude files Aider shouldn't touch
3. **Enable auto-lint**: Catch issues immediately
4. **Use architect mode** for large refactoring tasks
5. **Leverage repo maps**: Let Aider understand your codebase structure
6. **Test incrementally**: Enable `--auto-test` for TDD workflows
7. **Review changes**: Use `--show-diffs` to see exactly what changed
8. **Branch protection**: Work in feature branches when making large changes
**Model not working?**
**Changes not applying?**
**Performance issues?**
Minimal production-ready config:
```yaml
model: claude-3-7-sonnet-20250219
weak-model: claude-3-5-haiku-20241022
auto-commits: true
dirty-commits: true
auto-lint: true
lint-cmd:
- "python: ruff check --fix"
dark-mode: true
stream: true
pretty: true
cache-prompts: true
map-tokens: 2048
restore-chat-history: false
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-ai-pair-programmer/raw