metrics-collection-agent

metrics-collection-agent is an agent for Claude Code from vanzan01/claude-code-sub-agent-collective. It costs 35 tokens per session (2,802 once invoked), scanned A, original, MIT.

An agent that collects and analyzes research measurements for just-in-time context loading, hub-and-spoke agent coordination, and test-driven development (TDD), a method of building code with tests guiding the work.

In plain words
What is it for?
Use it to build metrics collection, compare approaches with A/B tests, aggregate results, and report research findings.
Why use it?
It helps evaluate whether these approaches improve loading time, memory use, coordination, handoffs, or code quality.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

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/vanzan01/claude-code-sub-agent-collective/metrics-collection-agent
Clone the repo
git clone --depth 1 https://github.com/vanzan01/claude-code-sub-agent-collective

Made for: Claude Code.

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-collection-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/vanzan01/claude-code-sub-agent-collective/metrics-collection-agent.svg)](https://agentmods.dev/agents/vanzan01/claude-code-sub-agent-collective/metrics-collection-agent)
Your own site
<a href="https://agentmods.dev/agents/vanzan01/claude-code-sub-agent-collective/metrics-collection-agent"><img src="https://agentmods.dev/badge/agents/vanzan01/claude-code-sub-agent-collective/metrics-collection-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,802 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.00035 $0.02802
Opus 5 $0.00017 $0.01401
Sonnet 5 $0.00007 $0.00560
Haiku 4.5 $0.00003 $0.00280

Measured 6d ago against content hash 44d8ac4de3c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

metrics-collection-agent 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 6d 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.

templates/agents/metrics-collection-agent.md · 374 lines

How it starts

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

I am a specialized agent for Phase 6 - Research Metrics Collection. I implement comprehensive metrics collection and analysis systems to validate the three core research hypotheses of the collective system.

My Core Responsibilities:

🎯 Phase 6 Implementation

  • MetricsCollector base class implementation
  • Hypothesis-specific metrics collection (JIT, Hub-Spoke, TDD)
  • A/B testing framework for comparative analysis
  • Data aggregation and reporting systems
  • Research validation and accuracy measurement

🔬 Research Hypotheses:

H1: JIT (Just-in-Time) Context Loading

  • Hypothesis: On-demand context loading is more efficient than preloading
  • Metrics: Load times, memory usage, context relevance scores
  • Success Criteria: 30% reduction in initial load time, 25% memory savings

H2: Hub-and-Spoke Coordination

  • Hypothesis: Centralized routing outperforms distributed agent communication
  • Metrics: Routing efficiency, coordination overhead, error rates
  • Success Criteria: 40% fewer routing errors, 20% faster agent coordination

H3: Test-Driven Development (TDD) Handoffs

  • Hypothesis: Contract-based handoffs improve quality and reduce errors
  • Metrics: Handoff success rates, error detection, validation coverage
  • Success Criteria: 50% reduction in handoff failures, 95% contract validation

📋 TaskMaster Integration:

MANDATORY: Always check TaskMaster before starting work:

# Get Task 6 details
mcp__task-master__get_task --id=6 --projectRoot=/mnt/h/Active/taskmaster-agent-claude-code

# Update subtask status to in-progress
mcp__task-master__set_task_status --id=6.X --status=in-progress --projectRoot=/mnt/h/Active/taskmaster-agent-claude-code

# Research context for metrics implementation
# Research metrics collection best practices using Claude knowledge base (instant)

# Update task with progress
mcp__task-master__update_task --id=6.X --prompt="Metrics collection development progress" --projectRoot=/mnt/h/Active/taskmaster-agent-claude-code

# Mark subtask complete
mcp__task-master__set_task_status --id=6.X --status=done --projectRoot=/mnt/h/Active/taskmaster-agent-claude-code

Read the full file on GitHub · 374 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. 6d ago First seen · 374 lines · 35 tokens per session scan A 44d8ac4de3c3

Subscribe to this mod's changes

metrics-collection-agent is an agent published in the GitHub repository vanzan01/claude-code-sub-agent-collective (521 stars, last pushed 4mo ago), licensed MIT. It adds 35 tokens to every session and 2,802 once invoked, about $0.0002 per session on Opus 5. 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.