DevTrack Aider Configuration
A comprehensive Aider configuration skill that demonstrates all available settings for customizing the AI pair programming assistant. This configuration covers model selection, API keys, git integration, linting, testing, output customization, and workflow preferences.
Instructions
You are configuring Aider, an AI pair programming tool, for a development project. Follow these steps to create a complete `.aider.conf.yml` configuration file tailored to the project's needs.
Step 1: Determine Model Configuration
Ask the user which AI model they want to use for the main chat:
Claude 3.5 Sonnet (recommended for most tasks)Claude 3 Opus (for complex reasoning)GPT-4o (OpenAI's latest)GPT-4o Mini (faster, cheaper)DeepSeek Coder (for specialized code tasks)Other models from the listDetermine if they want a separate weak model for commit messages and summarization (usually cheaper/faster model).
Step 2: Configure API Keys and Base URLs
Determine where API keys should be stored:
In the `.aider.conf.yml` file (only for OpenAI and Anthropic)In a `.env` file (recommended for all providers)Via environment variablesIf using custom API endpoints, ask for:
`openai-api-base` (custom base URL)`openai-api-type` (API type)`openai-api-version` (API version)`openai-organization-id` (if applicable)Step 3: Configure Git Integration
Determine git workflow preferences:
Enable/disable auto-commits (default: enabled)Enable/disable commits when repo is dirty (default: enabled)Enable/disable author attribution (default: enabled)Prefix commit messages with "aider:" (default: disabled)Custom commit message prompt (optional)Ask if they want to:
Only work within a subtree of the repositoryCustomize the `.aiderignore` file locationShow diffs when committing changesStep 4: Configure Code Quality Tools
**Linting:**
Enable/disable automatic linting after changes (default: enabled)Specify lint commands for different languages (e.g., `python: flake8`, `javascript: eslint`)Enable manual lint-and-fix mode**Testing:**
Specify test command (e.g., `pytest`, `npm test`)Enable/disable automatic testing after changes (default: disabled)Enable test-driven fixing modeStep 5: Configure Output and UI Settings
Determine display preferences:
Dark mode or light modeEnable/disable colorized outputEnable/disable streaming responsesCustomize colors for user input, tool output, errors, warningsSet markdown code theme (default, monokai, solarized-dark, solarized-light)Enable VI editing mode in terminal (if user prefers vim keybindings)Step 6: Configure Repo Map and Context
Set context window preferences:
Map tokens (suggested tokens for repo map, default: 1024, 0 to disable)Map refresh frequency (auto, always, manual)Enable/disable prompt caching (for supported models)Cache keepalive pings (for long sessions)Max chat history tokens (optional override)Map multiplier when no files specified (default: 2)Step 7: Configure History Files
Customize history file locations:
Input history file (default: `.aider.input.history`)Chat history file (default: `.aider.chat.history.md`)Enable/disable restoring previous chat historyLLM conversation log file (optional, for debugging)Step 8: Configure Advanced Options
Determine additional preferences:
Voice language for voice input (ISO 639-1 code)Chat language (default: system language)Enable/disable shell command suggestionsEnable/disable update checksEncoding (default: utf-8)Always say yes to confirmations (for automation)Verbose outputStep 9: Generate Configuration File
Create a `.aider.conf.yml` file with the selected options. Structure it in logical sections:
```yaml
##########################################################
Aider Configuration for [Project Name]
##########################################################
#######
Main:
Model selection
model: [selected-model]
weak-model: [selected-weak-model] # Optional
API Configuration
openai-api-key: [key] # Only if not using .env
anthropic-api-key: [key] # Only if not using .env
#################
Model Settings:
map-tokens: 1024
cache-prompts: false
edit-format: [format] # If specific format required
###############
Git Settings:
auto-commits: true
dirty-commits: true
attribute-author: true
attribute-committer: true
commit-prompt: [custom prompt] # Optional
########################
Fixing and committing:
auto-lint: true
lint-cmd:
- "python: flake8 --select=E,W,F"
- "javascript: eslint"
test-cmd: [test command]
auto-test: false
##################
Output Settings:
dark-mode: true # or light-mode: true
pretty: true
stream: true
code-theme: default
################
History Files:
Defaults are usually fine, customize if needed
input-history-file: .aider.input.history
chat-history-file: .aider.chat.history.md
#################
Other Settings:
suggest-shell-commands: true
check-update: true
vim: false # Set true for VI editing mode
```
Step 10: Create .aiderignore File (Optional)
If the user wants to exclude certain files or directories from Aider's context, create a `.aiderignore` file with gitignore-style patterns:
```
Dependencies
node_modules/
venv/
__pycache__/
Build outputs
dist/
build/
*.pyc
Sensitive files
.env
*.key
*.pem
Large data files
*.csv
*.json # If data files
datasets/
```
Step 11: Document Usage
Provide usage instructions for the team:
**Basic usage:**
```bash
Start aider with config file (auto-detected in git root)
aider
Edit specific files
aider file1.py file2.js
Add read-only context files
aider --read docs.md --file main.py
Use a different model for this session
aider --model gpt-4o
Run in lint-and-fix mode
aider --lint
Run in test-and-fix mode
aider --test
```
**Configuration override:**
```bash
Use a different config file
aider --config .aider.custom.yml
Disable auto-commits for this session
aider --no-auto-commits
Show repo map and exit (debugging)
aider --show-repo-map
```
Step 12: Provide Best Practices
Share these recommendations with the user:
1. **API Keys**: Store in `.env` file, never commit to git
2. **Model Selection**: Use Sonnet for most tasks, Opus for complex reasoning, Mini for speed
3. **Auto-commits**: Keep enabled for better history tracking
4. **Linting**: Configure lint commands to match project's CI/CD pipeline
5. **Testing**: Enable auto-test only if tests are fast (<30s)
6. **Repo Map**: Increase `map-tokens` for large codebases (2048-4096)
7. **Prompt Caching**: Enable for models that support it (saves costs on long sessions)
8. **Chat History**: Review `.aider.chat.history.md` periodically for learnings
9. **Subtree Mode**: Use `--subtree-only` when working on a specific module
10. **Read-only Files**: Use `--read` for context files you don't want modified (docs, specs)
Examples
Example 1: Python Data Science Project
```yaml
model: claude-3-5-sonnet-20240620
weak-model: claude-3-haiku-20240307
auto-lint: true
lint-cmd:
- "python: black --check ."
- "python: mypy --strict"
test-cmd: "pytest --cov=src tests/"
auto-test: false
map-tokens: 2048
dark-mode: true
```
Example 2: JavaScript Full-Stack Project
```yaml
model: gpt-4o-2024-08-06
weak-model: gpt-4o-mini
auto-lint: true
lint-cmd:
- "javascript: eslint --fix"
- "typescript: tsc --noEmit"
test-cmd: "npm test"
auto-test: false
map-tokens: 1024
code-theme: monokai
```
Example 3: Enterprise Project with Custom API
```yaml
model: azure/gpt-4
openai-api-base: "https://custom.openai.azure.com/"
openai-api-type: "azure"
openai-api-version: "2024-02-15-preview"
openai-api-deployment-id: "gpt-4-deployment"
auto-commits: true
attribute-commit-message-committer: true
map-tokens: 4096
verify-ssl: true
```
Constraints
Only OpenAI and Anthropic API keys can be stored in `.aider.conf.yml`Keys for other providers must be in `.env` fileConfiguration file must be named `.aider.conf.yml` or specified via `--config`Place config file in git root, current directory, or home directory (searched in that order)YAML syntax must be valid (use 2-space indentation)Model names must match Aider's supported models listLint and test commands must be valid shell commands for the project's environmentNotes
Aider automatically adds `.aider*` files to `.gitignore` (can be disabled)The `--yes` flag is useful for CI/CD automation but use cautiouslyChat history files can grow large; consider periodic cleanupPrompt caching is only available for certain models (Claude 3.5+, GPT-4+)Map tokens of 0 disables the repo map entirely (not recommended)Voice input requires additional setup and may need language specificationDry-run mode (`--dry-run`) is useful for testing configuration changes safely