Configure Aider to use OpenRouter's KAT-Coder Pro model with auto-commit, custom prompts, and R/Emacs expertise for converting R markdown to Typst format
Configure Aider to use OpenRouter's free KAT-Coder Pro model with specialized settings for R programming, Emacs workflows, and R markdown to Typst conversion.
Sets up Aider with:
1. **Set up the configuration file**
- Create `.aider.conf.yml` in your project root
- Copy the configuration structure below
2. **Configure the model provider**
```yaml
model:
provider: openrouter
model: kwaipilot/kat-coder-pro:free
```
3. **Set up prompts**
```yaml
prompts:
file: prompts.md
```
- Create a `prompts.md` file with your custom prompts
- This allows you to maintain reusable prompt templates
4. **Configure Git integration**
```yaml
git:
auto_commit: true
commit_message: "Auto-commit from aider"
```
- Enables automatic commits after each change
- Customize commit message as needed
5. **Configure OpenRouter API**
```yaml
openrouter:
api_key: ${OPENROUTER_API_KEY}
```
- Set `OPENROUTER_API_KEY` environment variable
- Get your API key from [OpenRouter](https://openrouter.ai/)
6. **Set environment variables**
```yaml
env:
- OPENROUTER_API_KEY
```
7. **Configure additional settings**
```yaml
settings:
verbose: true
allow_edits: true
default_branch: main
```
8. **Customize the system prompt**
```yaml
system_prompt: |
You are an expert R programmer and emacs user.
You are working on a Debian 13 system.
Goal is to read .qmd files (R markdown) and write a new file in typst format (*.typ)
Your responses should be concise and to the point.
Focus on practical solutions and best practices.
```
- Modify this to match your specific use case
- Include relevant expertise areas, tools, and goals
After creating `.aider.conf.yml` with the configuration above:
```bash
export OPENROUTER_API_KEY="your_key_here"
aider
aider --config .aider.conf.yml
aider --model openrouter/kwaipilot/kat-coder-pro:free
```
```bash
export OPENROUTER_API_KEY="your_openrouter_api_key"
echo "OPENROUTER_API_KEY=your_key_here" >> .env
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-with-openrouter-kat-coder-pro/raw