SuperAPI AI Directory

aider-cli-workflow

Coding & development

View repository

Updated 10-15 16:29

About this skill

Aider CLI Workflow

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

  1. Check repository root: git rev-parse --show-toplevel
  2. Check Aider installation: aider --version
  3. 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

  1. Run baseline tests (secure failure/success baseline)
  2. Fix with Aider
  3. Re-run tests
  4. 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

  1. Always secure baseline test results first.
  2. Do not start an Aider session without specifying file scope.
  3. Before committing, git add -premove unnecessary changes with.
  4. For flaky/experimental changes, state the risk and leave a follow-up TODO.

References