Agentic Aider setup for converting documentation into structured prompts with auto-testing and architect mode
A production-grade Aider configuration for the docs2prompt project, an agentic tool that converts documentation into formats suitable for complex structured prompts.
This skill configures Aider with:
Create `.env.aider` in your project root with your API keys:
```bash
ANTHROPIC_API_KEY=your_anthropic_key_here
DEEPSEEK_API_KEY=your_deepseek_key_here # optional
OPENROUTER_API_KEY=your_openrouter_key_here # optional
```
Set up the required specs directory:
```bash
mkdir -p specs
touch specs/CONVENTIONS.md specs/project.md specs/mvp.md
```
Populate these files with:
Save the following as `.aider.conf.yml` in your project root:
```yaml
model: claude-3-5-sonnet-20240620
env-file: .env.aider
cache-prompts: true
cache-keepalive-pings: 5
light-mode: true
auto-commits: true
stream: false
test-cmd: pytest
auto-test: true
architect: true
editor-model: claude-3-5-sonnet-20240620
read:
- specs/CONVENTIONS.md
- specs/project.md
- specs/mvp.md
```
Start Aider in your project directory:
```bash
aider
```
Aider will automatically:
```bash
aider> "Design a module to parse Markdown documentation and extract code blocks"
aider> "Implement the markdown parser with error handling"
```
| Setting | Value | Purpose |
|---------|-------|---------|
| `model` | claude-3-5-sonnet-20240620 | Primary model for code generation |
| `env-file` | .env.aider | Separate env file for API keys |
| `cache-prompts` | true | Reduce API costs via prompt caching |
| `cache-keepalive-pings` | 5 | Keep cache alive between requests |
| `auto-commits` | true | Commit successful changes automatically |
| `test-cmd` | pytest | Command to run tests |
| `auto-test` | true | Run tests after every change |
| `architect` | true | Enable high-level design mode |
| `read` | specs/*.md | Context files loaded on startup |
To use DeepSeek (cost-effective for iteration):
```yaml
model: deepseek/deepseek-chat
editor-model: deepseek/deepseek-chat
```
To use OpenRouter's O1 Preview (advanced reasoning):
```yaml
model: openrouter/openai/o1-preview
```
1. **Keep specs updated**: Aider reads these files on every startup—keep them current
2. **Use architect mode**: Ask design questions before implementation requests
3. **Trust auto-test**: Let Aider verify changes before committing
4. **Review auto-commits**: Check commit messages; they're usually descriptive
5. **Disable streaming for stability**: `stream: false` prevents output issues with some models
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-configuration-for-docs2prompt/raw