Use this skill when the user explicitly wants an Aider-based coding loop in a local repo.
When to use this skill
- When you need to organize Aider installation/initial setup verification through execution all at once
- When handling a small feature/bug with AI pair-programming based on test criteria
- When you need to verify/organize changes made by Aider on a per-commit basis
When not to use
- Work centered on Hosted PR review/labels/branch protection policy (
code-review, GitHub workflow family) - When only simple Git conflict/recovery is needed (
git-workflow) - Work centered on root cause debugging (
debugging)
Instructions
Step 1) Preconditions
- Check repository root:
git rev-parse --show-toplevel - Check Aider installation:
aider --version - Check basic validation commands: secure at least one test/lint command
Step 2) Scope-lock kickoff
- Specify only one task at a time (one bug/one feature).
- Must include in the Aider prompt:
- Scope of files to change
- Acceptance criteria
- Test/validation commands
Step 3) Test-backed edit loop
- Run baseline tests (secure failure/success baseline)
- Fix with Aider
- Re-run tests
- Review diff and make additional fixes if needed
Step 4) Commit hygiene
git add -pReview the scope of changes with- Commit messages include intent + validation commands
- State risks (experimental patches, flaky tests, unverified paths) in commits/reports
Step 5) Fallback
- If changes spread excessively, immediately narrow the scope and retry
- If tests break repeatedly, stop Aider's auto-fix loop and switch to root cause analysis
Output format
# Aider Run Brief
- Goal:
- Scope:
- Validation commands:
- Changed files:
- Risks / follow-ups:
Examples
Example 1: small bugfix loop
- Goal: restore 1 failing unit test to green
- Scope: edit only the test file + related implementation files
- Validation:
pytest -q tests/path/test_x.py
Example 2: narrow feature increment
- Goal: add 1 API field + maintain backward compatibility
- Scope: schema + handler + tests
- Validation: existing tests + new tests
Best practices
- Always secure baseline test results first.
- Do not start an Aider session without specifying file scope.
- Before committing,
git add -premove unnecessary changes with. - For flaky/experimental changes, state the risk and leave a follow-up TODO.
References
- Aider: https://github.com/Aider-AI/aider
- Aider docs: https://aider.chat/