Communitygithub.com

agent-eval

コーディングエージェント(Claude Code、Aider、Codex など)をカスタムタスクで直接比較し、合格率、コスト、時間、一貫性を測定します。コーディングエージェントの選択時や、エージェント設定の変更が合格率やコスト、時間に与える影響を測定する際に使用します。

agent-eval とは?

このスキルは、軽量なCLIツール「agent-eval」を提供し、コーディングエージェントを再現可能なタスクで直接比較できるようにします。これにより、これまで「雰囲気」で行われていたエージェント比較を、データに基づいた意思決定に置き換えます。主な機能として、YAML形式でタスクを宣言的に定義し、git worktreeによる分離された実行環境で各エージェントを独立してテストし、合格率、APIコスト、実行時間、複数回実行による一貫性を自動収集します。サポートするエージェントはClaude Code、Aider、Codexなど多岐にわたり、比較レポートは表形式で出力されます。CLIツールとして動作するため、特定のプラットフォームに依存せず、手元のコードベースに対してすぐに利用できます。また、pytestやgrepを用いたコードベース判定、LLM-as-judgeによるモデルベース判定など、複数の判定方法をサポートし、タスクの再現性を高めるためにコミットを固定するベストプラクティスを推奨しています。

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

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

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

ドキュメント

エージェント評価スキル

コーディングエージェントを再現可能なタスクで直接比較するための軽量CLIツールです。「どのコーディングエージェントが最適か」という比較は、これまで雰囲気で判断されがちでしたが、このツールはそれを体系化します。

いつアクティブにするか

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

インストール

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

コアコンセプト

YAMLタスク定義

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

name: リトライロジックの追加
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
タスク: add-retry-logic (各3回実行)
┌──────────────┬───────────┬────────┬────────┬─────────────┐
│ Agent        │ 合格率    │ コスト │ 時間   │ 一貫性      │
├──────────────┼───────────┼────────┼────────┼─────────────┤
│ 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-as-judge)

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

ベストプラクティス

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

リンク

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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

関連スキル