Production-ready Aider configuration with OpenRouter, caching, custom conventions, and optimized repo mapping
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.
Production-ready Aider configuration file that sets up an optimized AI coding assistant workflow using OpenRouter, prompt caching, and custom conventions.
This skill provides a comprehensive `.aider.conf.yml` configuration that:
1. **Create configuration directory structure**
```bash
mkdir -p aider_configs
```
2. **Create the main config file** `.aider.conf.yml` in your project root or home directory:
```yaml
# Model configuration
model: openrouter/nousresearch/hermes-3-llama-3.1-405b:free
# Cache settings for performance
cache-prompts: true
cache-keepalive-pings: 2
# Custom settings files
model-settings-file: aider_configs/.aider.model.settings.yml
model-metadata-file: aider_configs/.aider.model.metadata.json
env-file: aider_configs/.env
# Read-only conventions file
read: [aider_configs/CONVENTIONS.md]
# Git settings
git: true
gitignore: true
auto-commits: true
dirty-commits: true
attribute-author: true
attribute-committer: true
# Auto-linting
auto-lint: true
# Encoding
encoding: utf-8
```
3. **Create environment file** `aider_configs/.env`:
```bash
# Add your OpenRouter API key
OPENROUTER_API_KEY=your_key_here
# Optional: other API keys
# ANTHROPIC_API_KEY=your_key_here
# OPENAI_API_KEY=your_key_here
```
4. **Create custom conventions file** `aider_configs/CONVENTIONS.md`:
```markdown
# Project Coding Conventions
## Code Style
- Use descriptive variable names
- Add comments for complex logic
- Follow language-specific style guides
## Git Commit Messages
- Use imperative mood ("Add feature" not "Added feature")
- Keep first line under 50 characters
- Add detailed description if needed
## Testing
- Write tests for new features
- Ensure all tests pass before committing
```
5. **Create model settings file** `aider_configs/.aider.model.settings.yml` (optional):
```yaml
# Custom model configurations
# Add model-specific settings here if needed
```
6. **Create model metadata file** `aider_configs/.aider.model.metadata.json` (optional):
```json
{
"models": {}
}
```
7. **Launch Aider**:
```bash
aider
```
```yaml
model: anthropic/claude-3-5-sonnet-20240620
model: openai/gpt-4-turbo
model: deepseek/deepseek-coder
```
```yaml
lint-cmd:
- "python: ruff check --fix"
- "javascript: eslint --fix"
- "typescript: eslint --fix"
auto-lint: true
```
```yaml
test-cmd: pytest
auto-test: true
```
```yaml
map-tokens: 2048
map-tokens: 0
```
```bash
aider
```
```bash
aider src/main.py tests/test_main.py
```
```bash
aider --message "Add error handling to the login function"
```
```bash
aider --commit
```
```bash
aider --test
```
```
project-root/
├── .aider.conf.yml # Main config file
├── aider_configs/
│ ├── .env # API keys
│ ├── CONVENTIONS.md # Project conventions
│ ├── .aider.model.settings.yml
│ └── .aider.model.metadata.json
└── .aiderignore # Files to exclude (optional)
```
**Aider not finding config**: Ensure `.aider.conf.yml` is in git root, current directory, or home directory
**API key errors**: Check that `aider_configs/.env` exists and contains valid keys
**Cache not working**: Verify model supports prompt caching (most modern models do)
**Git attribution not working**: Ensure `git` is set to `true` and you're in a git repository
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/custom-aider-configuration/raw