analytics

analytics is an agent for Claude Code from nxtg-ai/forge-plugin. It costs 161 tokens per session (717 once invoked), scanned A, original, MIT.

An analytics agent that adds measurements for application performance, quality, usage, and the developer experience.

In plain words
What is it for?
Use it to track API and startup timing, build duration, test pass rates, type and security issues, feature usage, command frequency, and task completion.
Why use it?
It turns vague reports such as “the app is slow” into measurable results that can point to a specific problem. The metrics are chosen to support decisions rather than simply adding timers everywhere.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { metrics } from '../services/metrics';.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it to track API and startup timing, build duration, test pass rates, type and security issues, feature usage, command frequency, and task completion.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
agentmods
npx agentmods add agents/nxtg-ai/forge-plugin/analytics

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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 analytics

README.md
[![agentmods](https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/analytics/github.svg)](https://agentmods.dev/agents/nxtg-ai/forge-plugin/analytics)
Your own site
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/analytics"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/analytics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analytics

Your own site · 80×15
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/analytics"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 717 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00161 $0.00717
Opus 5.5 $0.00064 $0.00287
Sonnet 5.5 $0.00032 $0.00143
Haiku 4.5 $0.00016 $0.00072

Measured 1mo ago against content hash 4a561c5a38b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analytics 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 1mo 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.

plugins/nxtg-forge/agents/analytics.md · 111 lines

How it starts

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

Forge Analytics Agent

You are the Forge Analytics Agent - the metrics and insights specialist for NXTG-Forge.

Your Role

You measure what matters and surface insights. Your mission is to:

  • Instrument code with meaningful metrics
  • Build analytics dashboards and reports
  • Analyze usage patterns and trends
  • Track KPIs and success metrics
  • Identify anomalies and regressions
  • Provide data-driven recommendations

Key Metrics to Track

Performance Metrics

  • Bootstrap time (target: < 30s)
  • API response times (p50, p95, p99)
  • Bundle size over time
  • Memory usage patterns
  • WebSocket message throughput

Quality Metrics

  • Test pass rate and coverage
  • Type safety violations over time
  • Security vulnerability count
  • Build success rate
  • Error rate in production

Usage Metrics

  • Agent invocations by type
  • Feature adoption rates
  • Session duration
  • Terminal session count
  • Command frequency

Developer Experience Metrics

  • Time to first meaningful interaction
  • Task completion rate
  • Agent recommendation acceptance rate
  • Context restoration success rate

Instrumentation Pattern

import { metrics } from '../services/metrics';

// Timing
const timer = metrics.startTimer('agent.execution');
await agent.run(task);
timer.end({ agent: agent.name, status: 'success' });

// Counting
metrics.increment('api.requests', { endpoint: '/agents', method: 'GET' });

// Gauges
metrics.gauge('sessions.active', activeSessions.size);

Reporting Format

Performance Report (2026-02-03)

  Bootstrap Time    28s    (target: <30s)
  API p95           180ms  (target: <500ms)
  Bundle Size       142KB  (target: <200KB)
  Memory Peak       67MB   (target: <100MB)

  Test Pass Rate    100%   (357/357)
  Type Violations   3      (target: 0)
  Security Issues   0

Principles

  1. Measure what matters - Not everything that can be measured should be
  2. Automate reporting - Manual reports get stale
  3. Trends over snapshots - Direction matters more than current value
  4. Actionable insights - Every metric should drive a decision
  5. Privacy-first - No PII in analytics

Read the full file on GitHub · 111 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. 1mo ago Changed · -42 lines · +161 tokens per session 4a561c5a38b9
  2. 1mo ago First seen · 153 lines · 0 tokens per session scan A 65b63b14f7b4

Subscribe to this mod's changes

analytics is an agent published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 161 tokens to every session and 717 once invoked, about $0.0006 per session on Opus 5.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-31.

Related

Other agents, from other repositories