Communitygithub.com

agent-eval

コーディングエージェント(Claude Code、Aider、Codexなど)のカスタムタスクにおける成功率、コスト、時間、一貫性をヘッド・ツー・ヘッドで比較します。コーディングエージェントの選択や、エージェント設定の変更が成功率、コスト、時間に与える影響を、印象ではなく測定したい場合に使用します。

agent-eval とは?

Agent Evalは、複数のコーディングエージェント(Claude Code、Aider、Codexなど)を同一のカスタムタスク上で直接比較するための軽量CLIツールです。従来の「どのエージェントが優れているか」という感覚的な判断ではなく、成功率(Pass rate)、APIコスト(Cost)、実行時間(Time)、および複数回実行時の一貫性(Consistency)という客観的なメトリクスを提供します。このツールは、YAML形式で定義されたタスクを使用し、各エージェントの実行をGit Worktreeで分離することで、再現性を確保しながら並行してテストできます。新しいエージェントやモデルの導入前評価、エージェントアップデート後の回帰テスト、チームでのデータに基づくエージェント選定に最適です。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/agent-eval

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Agent Eval スキル

コーディングエージェントを再現可能なタスクで直接比較するための軽量CLIツールです。「どのコーディングエージェントが最適か?」という比較は、これまで感覚に頼っていましたが、このツールはそれを体系化します。

使用すべきタイミング

  • コーディングエージェント(Claude Code、Aider、Codexなど)を自身のコードベースで比較する場合
  • 新しいツールやモデルを採用する前に、エージェントのパフォーマンスを測定する場合
  • エージェントがモデルやツールをアップデートした際の回帰テストを実行する場合
  • チーム向けにデータに基づいたエージェント選定の意思決定を行う場合

インストール

注: ソースコードを確認した上で、リポジトリからagent-evalをインストールしてください。

基本概念

YAMLタスク定義

タスクを宣言的に定義します。各タスクは、何を行うか、どのファイルを操作するか、成功をどのように判断するかを指定します:

name: add-retry-logic
description: HTTPクライアントに指数バックオフリトライを追加する
repo: ./my-project
files:
  - src/http_client.py
prompt: |
  すべてのHTTPリクエストに指数バックオフを使用したリトライロジックを追加してください。
  最大リトライ回数は3回、初期遅延1秒、最大遅延30秒とします。
judge:
  - type: pytest
    command: pytest tests/test_http_client.py -v
  - type: grep
    pattern: "exponential_backoff|retry"
    files: src/http_client.py
commit: "abc1234"  # 再現性のために特定のコミットに固定

Git Worktreeによる分離

各エージェントの実行は独自のgit worktreeを取得します。Dockerは不要です。これにより、エージェントが互いに干渉したり、ベースリポジトリを破損したりするのを防ぐ再現性のある分離環境が提供されます。

収集されるメトリクス

メトリクス測定内容
成功率エージェントが判定条件を満たすコードを生成したか?
コストタスクあたりのAPI消費額(利用可能な場合)
時間完了までの経過時間(秒)
一貫性複数回実行における成功率(例:3/3 = 100%)

ワークフロー

1. タスクを定義する

tasks/ディレクトリを作成し、タスクごとにYAMLファイルを配置します:

mkdir tasks
# タスク定義を作成(上記テンプレートを参照)

2. エージェントを実行する

タスクに対してエージェントを実行します:

agent-eval run --task tasks/add-retry-logic.yaml --agent claude-code --agent aider --runs 3

各実行では:

  1. 指定されたコミットから新しいgit worktreeを作成します
  2. エージェントにプロンプトを渡します
  3. 判定基準を実行します
  4. 成功/失敗、コスト、時間を記録します

3. 結果を比較する

比較レポートを生成します:

agent-eval report --format table
Task: add-retry-logic (各3回実行)
┌──────────────┬───────────┬────────┬────────┬─────────────┐
│ Agent        │ Pass Rate │ Cost   │ Time   │ Consistency │
├──────────────┼───────────┼────────┼────────┼─────────────┤
│ claude-code  │ 3/3       │ $0.12  │ 45s    │ 100%        │
│ aider        │ 2/3       │ $0.08  │ 38s    │  67%        │
└──────────────┴───────────┴────────┴────────┴─────────────┘

判定タイプ

コードベース(決定論的)

judge:
  - type: pytest
    command: pytest tests/ -v
  - type: command
    command: npm run build

パターンベース

judge:
  - type: grep
    pattern: "class.*Retry"
    files: src/**/*.py

モデルベース(LLMによる判定)

judge:
  - type: llm
    prompt: |
      この実装は指数バックオフを正しく処理していますか?
      チェック項目:最大リトライ回数、増加する遅延、ジッター

ベストプラクティス

  • 実際のワークロードを代表する3~5個のタスクから始めてください。おもちゃの例ではありません。
  • エージェントは非決定論的であるため、ばらつきを捉えるために少なくとも3回の試行を実行してください。
  • タスクYAMLでコミットを固定し、結果が日をまたいでも再現可能にしてください。
  • タスクごとに少なくとも1つの決定論的な判定(テスト、ビルド)を含めてください。LLM判定はノイズを追加します。
  • コストを成功率と一緒に追跡してください。成功率95%でもコストが10倍であれば、最適な選択とは限りません。
  • タスク定義をバージョン管理してください。これらはテストフィクスチャであり、コードとして扱ってください。

リンク

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

api-connector-builder

Build a new API connector or provider by matching the target repo

関連スキル