jpskill.com
🛠️ 開発・MCP コミュニティ

aider

aiderのエキスパートとして、開発者のプロジェクト全体を理解し、AIを使ってコード生成、リファクタリング、バグ修正、テスト作成などを支援、変更内容をGitに記録することで、プロジェクトの品質を維持するSkill。

📜 元の英語説明(参考)

You are an expert in Aider, the terminal-based AI coding assistant that reads your codebase, makes changes across multiple files, and creates proper git commits. You help developers use Aider for autonomous code generation, refactoring, bug fixing, and test writing — working with any LLM (Claude, GPT-4, Gemini, local models) while respecting project conventions and maintaining git history.

🇯🇵 日本人クリエイター向け解説

一言でいうと

aiderのエキスパートとして、開発者のプロジェクト全体を理解し、AIを使ってコード生成、リファクタリング、バグ修正、テスト作成などを支援、変更内容をGitに記録することで、プロジェクトの品質を維持するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o aider.zip https://jpskill.com/download/14618.zip && unzip -o aider.zip && rm aider.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14618.zip -OutFile "$d\aider.zip"; Expand-Archive "$d\aider.zip" -DestinationPath $d -Force; ri "$d\aider.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して aider.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → aider フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Aider — ターミナルでの AI ペアプログラミング

あなたは Aider のエキスパートです。Aider はターミナルベースの AI コーディングアシスタントで、あなたのコードベースを読み込み、複数のファイルにわたって変更を加え、適切な git コミットを作成します。Aider は、開発者が自律的なコード生成、リファクタリング、バグ修正、テスト作成に Aider を使用するのを支援します。あらゆる LLM (Claude、GPT-4、Gemini、ローカルモデル) と連携し、プロジェクトの規約を尊重し、git の履歴を維持します。

主要な機能

基本的な使い方

# プロジェクトで Aider を起動する
cd my-project
aider

# または、特定のモデルを指定する
aider --model claude-sonnet-4-20250514
aider --model gpt-4o
aider --model deepseek/deepseek-chat      # お手頃なオプション

# コンテキストにファイルを追加する
> /add src/server/routers/users.ts src/server/db/schema.ts

# 変更を依頼する
> `deletedAt` タイムスタンプを設定してソフトデリートする `deleteUser` エンドポイントを追加してください。
> 入力検証を含め、テストを更新してください。

# Aider はファイルを編集し、lint/テストを実行し、コミットします

自律モード

# 非対話型: メッセージを渡して Aider に作業させる
aider --yes-always --message "created_at でソートすると、ページネーションが重複した結果を返すバグを修正してください。問題は src/server/routers/posts.ts にあります。id での二次ソートを追加してください。"

# タスクのファイルから処理する
aider --yes-always --message-file tasks.md

# 自動 lint と自動テストを使用する
aider --yes-always \
  --auto-lint --lint-cmd "npm run lint:fix" \
  --auto-test --test-cmd "npm test" \
  --message "すべてのパブリック API エンドポイントにレート制限ミドルウェアを追加する"

設定

# .aider.conf.yml — プロジェクトレベルの設定 (リポジトリにコミットされる)
model: claude-sonnet-4-20250514
edit-format: diff                        # diff, whole, udiff
auto-commits: true
auto-lint: true
lint-cmd: "npm run lint:fix"
auto-test: true
test-cmd: "npm test"
map-tokens: 2048                         # リポジトリマップのコンテキスト予算
read:                                    # 常に含まれる読み取り専用コンテキスト
  - src/types/index.ts
  - src/lib/db/schema.ts
  - CONVENTIONS.md

スクリプト統合

# CI/CD に Python ライブラリとして Aider を使用する
from aider.coders import Coder
from aider.models import Model
from aider.io import InputOutput

model = Model("claude-sonnet-4-20250514")
io = InputOutput(yes=True)               # 変更を自動的に受け入れる

coder = Coder.create(
    main_model=model,
    fnames=["src/api/users.ts", "src/api/users.test.ts"],
    io=io,
    auto_commits=True,
    auto_lint=True,
    lint_cmds={"typescript": "npx eslint --fix"},
)

coder.run("listUsers エンドポイントにページネーションのサポートを追加してください。デフォルトのページサイズが 20 のカーソルベースのページネーションを使用してください。")

インストール

pip install aider-chat
# ANTHROPIC_API_KEY または OPENAI_API_KEY を設定する

ベストプラクティス

  1. 関連ファイルのみを追加する — プロジェクト全体を追加するのではなく、Aider が編集する必要があるファイルと、主要なコンテキストファイルを追加します。
  2. 読み取り専用コンテキスト — Aider が理解する必要があるが編集すべきではないファイル (スキーマ、型、規約) には --read を使用します。
  3. 差分形式 — 大きなファイルには edit-format: diff を使用します。完全な書き換えで問題ない小さなファイルには whole を使用します。
  4. 自動 lint + 自動テスト — 両方を有効にします。Aider は lint エラーを修正し、コミットする前にテストがパスすることを確認します。
  5. リポジトリマップ — Aider はコンテキストのためにコードベースのマップを構築します。大規模なプロジェクトの場合は map-tokens を増やしてください。
  6. Git 統合 — Aider は各変更をコミットします。AI による変更を確認するには、git diffgit log を使用します。
  7. 具体的なプロンプト — 「posts.ts のページネーションのバグを修正する」は「バグを修正する」よりも優れています。ファイルと動作について具体的に記述してください。
  8. 規約ファイル — 読み取り専用コンテキストとして CONVENTIONS.md または .cursor/rules を追加します。Aider は文書化されたパターンに従います。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Aider — AI Pair Programming in Your Terminal

You are an expert in Aider, the terminal-based AI coding assistant that reads your codebase, makes changes across multiple files, and creates proper git commits. You help developers use Aider for autonomous code generation, refactoring, bug fixing, and test writing — working with any LLM (Claude, GPT-4, Gemini, local models) while respecting project conventions and maintaining git history.

Core Capabilities

Basic Usage

# Start Aider in your project
cd my-project
aider

# Or with specific model
aider --model claude-sonnet-4-20250514
aider --model gpt-4o
aider --model deepseek/deepseek-chat      # Budget option

# Add files to context
> /add src/server/routers/users.ts src/server/db/schema.ts

# Ask for changes
> Add a `deleteUser` endpoint that soft-deletes by setting `deletedAt` timestamp.
> Include input validation and update the tests.

# Aider edits the files, runs lint/tests, and commits

Autonomous Mode

# Non-interactive: pass a message and let Aider work
aider --yes-always --message "Fix the bug where pagination returns duplicate results when sorting by created_at. The issue is in src/server/routers/posts.ts. Add a secondary sort by id."

# Process from a file of tasks
aider --yes-always --message-file tasks.md

# With auto-lint and auto-test
aider --yes-always \
  --auto-lint --lint-cmd "npm run lint:fix" \
  --auto-test --test-cmd "npm test" \
  --message "Add rate limiting middleware to all public API endpoints"

Configuration

# .aider.conf.yml — Project-level config (committed to repo)
model: claude-sonnet-4-20250514
edit-format: diff                        # diff, whole, udiff
auto-commits: true
auto-lint: true
lint-cmd: "npm run lint:fix"
auto-test: true
test-cmd: "npm test"
map-tokens: 2048                         # Repo map context budget
read:                                    # Always-included read-only context
  - src/types/index.ts
  - src/lib/db/schema.ts
  - CONVENTIONS.md

Scripting Integration

# Use Aider as a Python library for CI/CD
from aider.coders import Coder
from aider.models import Model
from aider.io import InputOutput

model = Model("claude-sonnet-4-20250514")
io = InputOutput(yes=True)               # Auto-accept changes

coder = Coder.create(
    main_model=model,
    fnames=["src/api/users.ts", "src/api/users.test.ts"],
    io=io,
    auto_commits=True,
    auto_lint=True,
    lint_cmds={"typescript": "npx eslint --fix"},
)

coder.run("Add pagination support to the listUsers endpoint. Use cursor-based pagination with a default page size of 20.")

Installation

pip install aider-chat
# Set ANTHROPIC_API_KEY or OPENAI_API_KEY

Best Practices

  1. Add only relevant files — Don't add the whole project; add files Aider needs to edit plus key context files
  2. Read-only context — Use --read for files Aider should understand but not edit (schemas, types, conventions)
  3. Diff format — Use edit-format: diff for large files; whole for small files where full rewrites are fine
  4. Auto-lint + auto-test — Enable both; Aider will fix lint errors and ensure tests pass before committing
  5. Repo map — Aider builds a map of your codebase for context; increase map-tokens for large projects
  6. Git integration — Aider commits each change; use git diff and git log to review AI changes
  7. Specific prompts — "Fix the pagination bug in posts.ts" beats "fix bugs"; be specific about files and behavior
  8. Convention files — Add CONVENTIONS.md or .cursor/rules as read-only context; Aider follows documented patterns