metrillm CLAUDE.md

metrillm CLAUDE.md is an instructions file for coding agents from MetriLLM/metrillm. It costs 1,647 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for a command-line benchmark tool that tests locally run language models through Ollama or LM Studio. It covers the project structure, commands, architecture, database, tests, and build process.

In plain words
What is it for?
Use it when developing or testing MetriLLM, including benchmarking flows, scoring, hardware detection, database work, type checking, coverage tests, builds, and end-to-end checks.
Why use it?
It gives coding agents the project-specific context needed to make compatible changes and run the right checks.

Instructions file

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 instructions/metrillm/metrillm/claude-md
Clone the repo
git clone --depth 1 https://github.com/MetriLLM/metrillm

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 metrillm CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/metrillm/metrillm/claude-md.svg)](https://agentmods.dev/instructions/metrillm/metrillm/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/metrillm/metrillm/claude-md"><img src="https://agentmods.dev/badge/instructions/metrillm/metrillm/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,647 This file is loaded in full into every session.
When invoked 1,647 The same file — it is already loaded in full.
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 $0.01647 $0.01647
Opus 5 $0.00823 $0.00823
Sonnet 5 $0.00329 $0.00329
Haiku 4.5 $0.00165 $0.00165

Measured 5d ago against content hash 47e6b401c011, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

metrillm CLAUDE.md 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.

CLAUDE.md · 109 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

MetriLLM — CLI benchmark tool for local LLM models (Ollama and LM Studio). Measures performance (tok/s, TTFT, memory, CPU load), quality (reasoning, math, coding, instruction following, structured output, multilingual), and computes a hardware fitness verdict.

Commands

npm run build          # tsup → dist/index.mjs (ESM, Node20, bundled)
npm run dev            # Run from source via tsx
npm run typecheck      # tsc --noEmit
npm run test           # vitest run
npm run test:watch     # vitest watch
npm run test:coverage  # vitest with v8 coverage (thresholds enforced)
npm run ci:verify      # typecheck + test:coverage + build (full CI check)
npm run test:e2e:smoke # Real Ollama integration test (requires running Ollama)

Run a single test file: npx vitest run tests/scoring.test.ts Run a single test by name: npx vitest run -t "test name pattern"

Architecture

Entry point: src/index.ts — Commander.js CLI with interactive menu fallback.

Benchmark flow (src/commands/bench.ts):

  1. Detect hardware (src/core/hardware.ts) via systeminformation
  2. List/select Ollama models (src/core/ollama-client.ts)
  3. Run performance benchmark (5 prompts + warmup) → src/benchmarks/performance.ts
  4. Run quality benchmarks (6 categories) → src/benchmarks/*.ts against src/datasets/*.json
  5. Compute scores → src/scoring/ (performance-scorer, quality-scorer, fitness)
  6. Display results → src/ui/ (tables, verdict, colors)
  7. Persist locally → ~/.metrillm/results/
  8. Optional upload → Supabase via src/core/uploader.ts

Scoring system:

  • Performance score (0-100): speed (50pts) + TTFT (20pts) + memory (30pts), hardware-adaptive tuning by profile (ENTRY/BALANCED/HIGH-END)
  • Quality score (0-100): weighted categories — reasoning/coding/instruction=20pts, structured-output/math=15pts, multilingual=10pts. Time penalties for slow responses.
  • Global score: 30% performance + 70% quality
  • Verdicts: EXCELLENT (>=80) | GOOD (>=60) | MARGINAL (>=40) | NOT RECOMMENDED (<40 or disqualified)

Read the full file on GitHub · 109 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 · 109 lines · 1,647 tokens per session scan A 47e6b401c011

Subscribe to this mod's changes

metrillm CLAUDE.md is an instructions file published in the GitHub repository MetriLLM/metrillm (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,647 tokens to every session, about $0.0082 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-31.