Aider configuration optimized for AI-assisted coding with auto-testing, linting, and model aliases for efficient development workflows
This skill provides a production-ready Aider configuration optimized for AI-assisted development with automated testing, linting, and multi-model support.
1. **Model Aliases**:
- `sonnet` → Claude 3.5 Sonnet (main model)
- `gpt` → GPT-4o
- `o1` → OpenAI O1 Preview
- `gemini` → Gemini 2.0 Flash (editor model)
2. **Automated Linting** (runs after every change):
- `uv run black .` - Code formatting
- `uv run isort --profile black .` - Import sorting
- `uv run ruff check --fix` - Fast linting with auto-fixes
3. **Automated Testing**:
- Test command: `uv run pytest -v --disable-warnings tests/`
- Runs automatically after changes when `--auto-test` is enabled
4. **Quality of Life**:
- Auto-commits disabled (manual control)
- Yes-always mode for smoother flow
- Dark mode terminal colors
- Architect edit format for better code changes
Save this content as `.aider.conf.yml` in your project root or home directory:
```yaml
model: sonnet
architect: true
editor-model: gemini
alias:
- sonnet:claude-3-5-sonnet-20241022
- gpt:gpt-4o
- o1:openai/o1-preview-2024-09-12
- gemini:gemini/gemini-2.0-flash-exp
lint-cmd:
- uv run black .
- uv run isort --profile black .
- uv run ruff check --fix
auto-lint: true
test-cmd: uv run pytest -v --disable-warnings tests/
auto-test: true
auto-commits: false
yes-always: true
dark-mode: true
suggest-shell-commands: false
detect-urls: false
read:
- CONVENTIONS.md
```
**Required changes**:
1. **Linting commands**: Replace with your project's linters
```yaml
lint-cmd:
- npm run lint --fix # For JavaScript/TypeScript
- cargo fmt # For Rust
- go fmt ./... # For Go
```
2. **Test command**: Update for your test framework
```yaml
test-cmd: npm test # JavaScript/TypeScript
test-cmd: cargo test # Rust
test-cmd: go test ./... # Go
```
3. **Read-only files**: Add project-specific context files
```yaml
read:
- CONVENTIONS.md
- ARCHITECTURE.md
- API_SPEC.md
```
```bash
aider
aider --model gpt
aider --editor-model gemini
```
In the Aider chat:
```
/model gpt # Switch to GPT-4o
/model o1 # Switch to O1 Preview
/model sonnet # Back to Claude Sonnet
```
Enables more thoughtful, step-by-step code changes. Best for complex refactoring and feature implementation.
Catches issues immediately after changes. Combines well with `auto-commits: false` for manual review before committing.
Not explicitly set, uses default 1024 tokens for repo context. Increase for larger codebases:
```yaml
map-tokens: 2048
```
1. **Start Simple**: Enable `auto-test` only after your test suite is reliable and fast
2. **Manual Commits**: Keep `auto-commits: false` for code review before committing
3. **Context Files**: Add architecture docs to `read:` for better AI understanding
4. **Model Selection**: Use `sonnet` for complex tasks, `gpt` for speed, `o1` for reasoning
5. **Lint First**: Ensure linters run cleanly before enabling `auto-lint`
**Linting fails**: Ensure dependencies are installed
```bash
uv pip install black isort ruff
```
**Tests timeout**: Disable auto-test or increase timeout
```yaml
auto-test: false
timeout: 120
```
**Model not found**: Verify API keys are set in `.env` file or environment variables
**Dark mode colors wrong**: Switch to light mode
```yaml
light-mode: true
dark-mode: false
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/ai-coding-knowledge-base-configuration/raw