metrics

metrics is an agent for coding agents from prikotov/task-agents-playbook. It costs 0 tokens per session (1,131 once invoked), scanned A, original, MIT.

A process for measuring and reviewing how AI coding agents are used in a project. It uses Git history and GitHub pull requests to track changes by week, then aggregates results in Google Sheets.

In plain words
What is it for?
Counting commits, changed files, and added or removed lines, analyzing merged pull requests by agent label, and maintaining weekly productivity metrics.
Why use it?
It helps teams see development trends, compare agent-assisted work, and reduce the number of correction rounds needed for each task.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/prikotov/task-agents-playbook/metrics
Clone the repo
git clone --depth 1 https://github.com/prikotov/task-agents-playbook

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for metrics

README.md
[![agentmods](https://agentmods.dev/badge/agents/prikotov/task-agents-playbook/metrics.svg)](https://agentmods.dev/agents/prikotov/task-agents-playbook/metrics)
Your own site
<a href="https://agentmods.dev/agents/prikotov/task-agents-playbook/metrics"><img src="https://agentmods.dev/badge/agents/prikotov/task-agents-playbook/metrics.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01131
Opus 5 $0.00000 $0.00566
Sonnet 5 $0.00000 $0.00226
Haiku 4.5 $0.00000 $0.00113

Measured 5d ago against content hash ca4e4f136889, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

metrics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/metrics.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Метрики и статистика использования AI-агентов

В этом документе описывается процесс сбора статистики и анализа эффективности использования AI-агентов (Gemini, Claude, etc.) в проекте.

Цель

Отслеживание динамики продуктивности разработки с использованием ИИ. Основная задача — минимизировать количество итераций (правок) на одну задачу, повышая качество контекста и промптов.

Инструменты сбора статистики

1. Общая статистика по репозиторию

Скрипт bin/stat-by-week.sh собирает данные из git log по неделям.

  • Метрики: Добавленные/удаленные строки, количество коммитов, количество измененных файлов.
  • Фильтрация: Исключает автогенерируемые файлы (Phoenix assets, public, styles и т.д.).
  • Команда:
    bin/stat-by-week.sh
    

2. Статистика по PR агентов

Скрипт bin/agent-prs-by-week.sh использует GitHub CLI (gh) для анализа смерженных PR с определенной меткой (например, gemini-cli).

  • Метрики: Количество PR, добавленные/удаленные строки, количество измененных файлов.
  • Команда:
    bin/agent-prs-by-week.sh <agent-label>
    # Пример:
    bin/agent-prs-by-week.sh gemini-cli
    

Таблица метрик

Данные агрегируются в Google Sheets.

Основные метрики:

  • Lines Added/Deleted: Объем кода.
  • PR Count: Количество завершенных задач.
  • Commits per PR: (Вычисляемая) Среднее количество коммитов в одном PR.

Проблематика метрики "Commits per PR"

Текущая метрика "Commits per PR" показывает значения 1-3, что является "Ложноположительным" показателем качества, так как:

  1. Локальные итерации: Основная работа по исправлению замечаний происходит локально (в IDE) до пуша в репозиторий.
  2. Сквош коммитов: Агенты могут изменять существующие коммиты или пользователь делает squash перед мержем.

В результате метрика отражает чистоту истории, а не количество итераций "Промпт -> Правка".

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 70 lines · 0 tokens per session scan A ca4e4f136889

Subscribe to this mod's changes

metrics is an agent published in the GitHub repository prikotov/task-agents-playbook (21 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,131 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.