Configure and use Aider, an AI pair programming tool that works with your git repository to make coordinated code changes across multiple files with LLM assistance.
Configure and use Aider, an AI pair programming tool that integrates with your git repository to make intelligent, coordinated code changes across multiple files.
This skill helps you configure and effectively use Aider, an AI-powered coding assistant that:
1. **API Keys**: Store all API keys in a `.env` or `.env.local` file
2. **Model Selection**: Use `--model` flag or set in config to choose your LLM
3. **Model Metadata**: Optionally specify custom model settings files for unknown models
4. **SSL Verification**: Keep `verify-ssl: true` for secure API connections
1. **Map Tokens**: Control context size with `--map-tokens` (0 to disable)
2. **Refresh Strategy**: Set `map-refresh` to auto, always, files, or manual
3. **Repository Understanding**: Aider builds a map of your codebase for better context
1. **Auto-commits**: Set `auto-commits: false` to manually review changes before committing
2. **Dirty Commits**: Configure whether to commit when repo has pending changes
3. **Commit Attribution**: Use `attribute-commit-message-author` or `attribute-co-authored-by` for proper attribution
4. **Gitignore**: Automatically adds `.aider*` files to `.gitignore`
5. **Pre-commit Hooks**: Control with `git-commit-verify` setting
1. **Color Scheme**: Configure colors for different output types (user input, assistant output, errors, warnings)
2. **Code Theme**: Set markdown code highlighting (e.g., `gruvbox-dark`, `monokai`, `solarized-dark`)
3. **Streaming**: Enable/disable streaming responses with `stream` setting
4. **Dark/Light Mode**: Choose color scheme appropriate for your terminal
1. **Linting**: Configure `lint-cmd` for different languages
2. **Auto-lint**: Set `auto-lint: true` to automatically lint after changes
3. **Testing**: Specify `test-cmd` and enable `auto-test` for automatic testing
4. **Pre-commit Verification**: Keep hooks enabled with `git-commit-verify: true`
```bash
aider file1.py file2.js
aider --read AGENTS.md --file src/main.py
aider --model claude-sonnet-4.5
aider --apply-clipboard-edits
```
1. **/add <file>**: Add files to the chat context
2. **/drop <file>**: Remove files from context
3. **/read <file>**: Add read-only reference files
4. **/commit**: Commit all pending changes with AI-generated message
5. **/undo**: Undo last changes
6. **/diff**: Show pending changes
7. **/lint**: Run linting on modified files
8. **/test**: Run tests
9. **/editor**: Open in external editor
10. **/help**: Show all available commands
1. **Start Small**: Begin with 1-3 related files for focused changes
2. **Use Read-Only Context**: Add architecture docs or READMEs with `--read` for context
3. **Review Before Committing**: Set `auto-commits: false` to manually review changes
4. **Enable Linting**: Configure `lint-cmd` for your languages to maintain code quality
5. **Watch Files**: Enable `watch-files: true` to detect AI coding comments in your IDE
6. **Leverage Repository Map**: Let Aider understand your codebase structure automatically
7. **Use Specific Requests**: Be clear and specific in your coding requests
8. **Iterative Refinement**: Review changes and ask for refinements if needed
When `watch-files: true`:
1. Add special comments in your code: `# aider: <instruction>`
2. Aider detects these comments and processes them automatically
3. Useful for marking TODOs or improvements while coding
Create `.aider.conf.yml` in your project root or home directory with your preferences. Key settings to customize:
```yaml
auto-commits: false # Review before committing
auto-lint: true # Automatic linting
git: true # Enable git integration
stream: true # Stream responses
editor: nvim
encoding: utf-8
env-file: .env.local
read:
- AGENTS.md
- README.md
- ARCHITECTURE.md
```
```bash
aider --read ARCHITECTURE.md --file src/auth.py src/middleware.py
```
```bash
aider --test-cmd "pytest tests/" --auto-test --file src/payment.py tests/test_payment.py
```
```bash
aider src/api/users.py src/models/user.py src/schemas/user.py
```
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-ndnv5r/raw