vetmanager-mcp: Command for Claude Code

.claude/commands/product-metrics.md

product-metrics is a command for Claude Code from otis22/vetmanager-mcp. It costs 51 tokens per session (1,297 once invoked), scanned A, original, MIT.

A command that reads product-usage figures from the production Vetmanager MCP service, such as accounts, tokens, requests, failures, and inactive accounts. It connects to the production server and reports the results in Markdown or JSON.

In plain words
What is it for?
Use it to check recent product metrics, identify failures or inactive accounts, and view the most-used tools. It can also show how long the tool-call counters have been accumulating.
Why use it?
It provides a quick snapshot without manually connecting to the server, running containers, or preparing the report. Only approved report options are passed to the server command.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is otis22/vetmanager-mcp's own configuration. It tells Claude Code how to work on vetmanager-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vetmanager-mcp configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ssh "root@${VETMANAGER_MCP_PROD_HOST:?set VETMANAGER_MCP_PROD_HOST}" 'cd /opt/vetmanager-mcp && docker compose --profile production exec -T mcp python scripts/p.

Reuse

Borrowing it

Nothing to install: this file belongs to otis22/vetmanager-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/otis22/vetmanager-mcp/main/.claude/commands/product-metrics.md
Clone the repo
git clone --depth 1 https://github.com/otis22/vetmanager-mcp

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 product-metrics

README.md
[![agentmods](https://agentmods.dev/badge/commands/otis22/vetmanager-mcp/product-metrics/github.svg)](https://agentmods.dev/commands/otis22/vetmanager-mcp/product-metrics)
Your own site
<a href="https://agentmods.dev/commands/otis22/vetmanager-mcp/product-metrics"><img src="https://agentmods.dev/badge/commands/otis22/vetmanager-mcp/product-metrics/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 product-metrics

Your own site · 80×15
<a href="https://agentmods.dev/commands/otis22/vetmanager-mcp/product-metrics"><img src="https://agentmods.dev/badge/commands/otis22/vetmanager-mcp/product-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 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,297 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00051 $0.01297
Opus 5 $0.00026 $0.00648
Sonnet 5 $0.00010 $0.00259
Haiku 4.5 $0.00005 $0.00130

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

Security

Grade A, and why

product-metrics scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

ssh "root@${VETMANAGER_MCP_PROD_HOST:?set VETMANAGER_MCP_PROD_HOST}" 'curl -fsS http://127.0.0.1:8000/metrics' | rg '^vetmanager_tool_calls_total'
.claude/commands/product-metrics.md · 85 lines

How it starts

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

Product metrics — ad-hoc snapshot

Ты product-metrics reporter для vetmanager-mcp. Задача — позвать скрипт scripts/product_metrics_report.py на prod через SSH, показать результат пользователю.

Как

  1. Args из user-prompt пробрасываем в команду только из whitelist, чтобы не пропустить шелл-инъекцию в ssh "...":

    • --top-n=<N> где N — целое, 1..100
    • --format=markdown или --format=json Любой другой аргумент — отказать пользователю, не передавать в shell. (Stage 116.1: --window-days флаг удалён из скрипта; 30-дневное окно hardcoded.)
  2. Выполни через Bash:

    ssh "root@${VETMANAGER_MCP_PROD_HOST:?set VETMANAGER_MCP_PROD_HOST}" 'cd /opt/vetmanager-mcp && docker compose --profile production exec -T mcp python scripts/product_metrics_report.py {validated_args}'
    

    (одинарные кавычки: никакой intermediate shell-эвалюации не нужно)

    Таймаут: 30 сек (скрипт должен отработать за < 2 сек на реальной БД).

  3. Дополнительно собери top-5 tool-call counters и период их накопления:

    • source для counters: production /metrics, только строки vetmanager_tool_calls_total{...}.
    • source для начала периода: docker compose --profile production ps mcp --format json, поле CreatedAt контейнера mcp.
    • конец периода: timestamp генерации основного product metrics отчёта, если он есть в stdout (_generated at ... UTC); иначе текущий date -u.
    • counters process-local: явно подпиши, что период — с последнего старта/restart контейнера mcp, а не 30-дневное окно БД.
    • агрегируй по tool/endpoint: если endpoint содержит :tool_name, используй часть после : как имя tool; иначе используй весь endpoint label. Суммируй success/error rows одного tool/endpoint.
    • выведи ровно top-5 по убыванию calls; если есть error rows, сохрани их в сумме и не скрывай, что это общий count по всем outcomes.

    Удобные команды:

    ssh "root@${VETMANAGER_MCP_PROD_HOST:?set VETMANAGER_MCP_PROD_HOST}" 'cd /opt/vetmanager-mcp && docker compose --profile production ps mcp --format json'
    ssh "root@${VETMANAGER_MCP_PROD_HOST:?set VETMANAGER_MCP_PROD_HOST}" 'curl -fsS http://127.0.0.1:8000/metrics' | rg '^vetmanager_tool_calls_total'
    

Read the full file on GitHub · 85 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. 10d ago First seen · 85 lines · 51 tokens per session scan A 8bcb28213da3

Subscribe to this mod's changes

product-metrics is a command published in the GitHub repository otis22/vetmanager-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 1,297 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.