Agent skill

Torchmetrics

by VectorSpaceLab in VectorSpaceLab/AREX-Skill

Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Torchmetrics

skills CLI
$ npx skills add VectorSpaceLab/AREX-Skill --skill torchmetrics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VectorSpaceLab/AREX-Skill torchmetrics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repositories/repo-skills/torchmetrics .claude/skills/torchmetrics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
torchmetrics
GitHub stars
330
Token cost
~964 tokens
SKILL.md length
368 words
Files
7 (incl. scripts, references)
Skills in repo
159
Repo updated
First seen
Licence
Apache-2.0

At a glance

Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.

  • Works in 5 steps: If the task is about implementing or… → If the task names a familiar metric… → If the task is about combining metrics,… → …
  • Tasks that involve Deep learning
  • SKILL.md covers Start here, Route map, How to choose and Install guidance, plus 2 more sections
  • Runs Python scripts from its folder; calls python and pip

What it does

Torchmetrics is an agent skill from VectorSpaceLab/AREX-Skill. Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.

Its SKILL.md is about 960 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/metric-selection-cheatsheet.md`, `references/repo-provenance.md` and `references/repo-routing-metadata.json`).

It sits in AI & LLM Engineering, covering Deep learning. It works with PyTorch. The repository describes itself as: A Skill Library for Automated Machine Learning. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Deep learning

Example prompts

  • “/torchmetrics”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. If the task is about implementing or debugging a custom Metric, start with core-api.
  2. If the task names a familiar metric family such as accuracy, F1, MSE, nDCG, or Cramer's V, use the sub-skill that owns that family.
  3. If the task is about combining metrics, renaming outputs, tracking metrics over epochs, or plotting results, use…
  4. If the metric may instantiate a pretrained model, feature extractor, or large optional asset, route to model-based-metrics.
  5. If a request spans families, choose the primary metric family first, then follow the route back to core-api or…

What it can do on your machine

Read from SKILL.md and the folder at commit ac3fe1a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Torchmetrics loads about 964 tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 43 tokens; SKILL.md has 368 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~964
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from VectorSpaceLab/AREX-Skill at commit ac3fe1a, republished under its Apache-2.0 licence (© VectorSpaceLab). 368 words, ~964 tokens.

Download SKILL.mdSave it as .claude/skills/torchmetrics/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
torchmetrics
description
Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.
disable-model-invocation
true
metadata.disco-role
operating
license
Apache 2.0

TorchMetrics

TorchMetrics is a metric library for PyTorch evaluation. Use this skill when the request is about choosing, calling, combining, or debugging TorchMetrics APIs rather than about training a model itself.

Start here

Route map

  • core-api — Metric, functional versus module metrics, update / compute / forward / reset, custom metric state, Lightning logging, DDP behavior, persistence.
  • basic-metric-domains — classification, regression, retrieval, clustering, nominal, and other tensor-only metric families.
  • vision-detection-metrics — image quality, segmentation, detection, and panoptic metrics.
  • audio-text-metrics — audio and speech quality metrics plus no-download text metrics such as ROUGE, WER, CER, BLEU, SacreBLEU, and Perplexity.
  • model-based-metrics — BERTScore, InfoLM, CLIPScore, CLIP-IQA, FID/KID/LPIPS/DISTS/ARNIQA/PPL, DNSMOS, NISQA, VMAF, and similar metrics that need pretrained assets or external model planning.
  • collections-wrappers-plotting — MetricCollection, wrappers, trackers, and plotting.

How to choose

  1. If the task is about implementing or debugging a custom Metric, start with core-api.
  2. If the task names a familiar metric family such as accuracy, F1, MSE, nDCG, or Cramer's V, use the sub-skill that owns that family.
  3. If the task is about combining metrics, renaming outputs, tracking metrics over epochs, or plotting results, use collections-wrappers-plotting.
  4. If the metric may instantiate a pretrained model, feature extractor, or large optional asset, route to model-based-metrics.
  5. If a request spans families, choose the primary metric family first, then follow the route back to core-api or collections-wrappers-plotting as needed.
Show full SKILL.md (102 more words)Show less

Install guidance

TorchMetrics has no verified console CLI. Install it from Python:

bash
pip install torchmetrics

Then add only the extra that matches the route you chose when needed, for example torchmetrics[audio], torchmetrics[image], torchmetrics[text], torchmetrics[detection], torchmetrics[multimodal], torchmetrics[video], torchmetrics[visual], or torchmetrics[clustering]. Avoid torchmetrics[all] unless you truly need a very broad evaluation environment.

Fast checks

  • python -c "import torchmetrics; print(torchmetrics.__version__)"
  • python scripts/check_torchmetrics_environment.py --device auto

Common signals

  • Metric, add_state, compute_with_cache, LightningModule, or DDP -> core-api
  • Accuracy, F1, MSE, nDCG, ClusterAccuracy, or CramersV -> basic-metric-domains
  • PSNR, DiceScore, MeanAveragePrecision, or PanopticQuality -> vision-detection-metrics
  • SNR, PESQ, WER, ROUGE, or Perplexity -> audio-text-metrics
  • BERTScore, CLIPScore, FID, LPIPS, DNSMOS, or VMAF -> model-based-metrics
  • MetricCollection, ClasswiseWrapper, MetricTracker, or .plot() -> collections-wrappers-plotting

© VectorSpaceLab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/repositories/repo-skills/torchmetrics of VectorSpaceLab/AREX-Skill.

  • SKILL.md
  • references/metric-selection-cheatsheet.md
  • references/repo-provenance.md
  • references/repo-routing-metadata.json
  • references/troubleshooting.md
  • scripts/check_torchmetrics_environment.py
  • sub-skills

Open the folder on GitHubat commit ac3fe1a

Compare with similar skills

Torchmetrics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Torchmetrics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Torchmetrics this skillVectorSpaceLab/AREX-Skill330—~964Automated safety check: PassApache-2.0
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k7 repos~1.7kAutomated safety check: PassMIT
Add Torch Shapes Examplefacebook/pyrefly7.1k—~1.3kAutomated safety check: PassMIT
MUSA GPU Training Optimizeropen-infra-skills/infra-skills141—~1.7kAutomated safety check: PassApache-2.0
Ghstack CIpytorch/pytorch104k—~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 7 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Torch Shapes Example

    facebook/pyrefly

    Official

    A skill your agent uses when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e.

    7.1k GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • MUSA GPU Training Optimizer

    open-infra-skills/infra-skills

    Profiles, benchmarks and tunes AI training workloads on Moore Threads MUSA GPUs with a measurement-first process that keeps model behavior unchanged.

    141 GitHub stars~1.7k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Ghstack CI

    pytorch/pytorch

    Manage CI for PyTorch ghstack stacks by running CI where its results are useful now and deferring other PRs with [no-ci].

    104k GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Depth Estimation

    SharpAI/DeepCamera

    Real-time depth map privacy transforms using Depth Anything v2 (CoreML + PyTorch)

    3.1k GitHub stars~945 tokensUpdated 23 days ago
    AI & LLM EngineeringAuto-check passed

More from VectorSpaceLab/AREX-Skill

All 159 skills in this repo
  • Agent Lightning

    VectorSpaceLab/AREX-Skill

    Use this repo skill for Agent Lightning package tasks: authoring trainable agents, tracing rewards and spans, running LightningStore/Trainer loops, using agl CLI services, choosing examples, and…

    330 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Agent Tools

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when configuring LiteLLM for MCP tools, A2A agents, Claude Code/Cursor agent gateway traffic, MCP auth/OAuth, tool permissions, semantic filtering, or agent-specific proxy…

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Awel

    VectorSpaceLab/AREX-Skill

    Build and debug DB-GPT agents, tools, skills, teams, and AWEL workflows, including deterministic local DAG runs and HTTP-trigger topology without assuming an LLM, credential, or external service.

    330 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Middleware

    VectorSpaceLab/AREX-Skill

    Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents Workflows

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for giskard.agents async chat workflows, tools, prompt templates, structured outputs, retries, rate limiting, embeddings, and optional LiteLLM backend.

    330 GitHub stars~500 tokensUpdated 1 mo ago
    Auto-check passed
  • Alphafold3

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Torchmetrics

What does Torchmetrics do?

Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers. Torchmetrics is an agent skill from VectorSpaceLab/AREX-Skill. Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.

When should I use Torchmetrics?

Torchmetrics fits situations like: tasks that involve Deep learning.

How do I install Torchmetrics in Claude Code?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill torchmetrics -a claude-code`. Or copy the skill folder (skills/repositories/repo-skills/torchmetrics in VectorSpaceLab/AREX-Skill) into .claude/skills/torchmetrics in your project. Claude Code loads it when a task matches its description.

How do I install Torchmetrics in Codex?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill torchmetrics -a codex`. Or copy the skill folder (skills/repositories/repo-skills/torchmetrics in VectorSpaceLab/AREX-Skill) into .agents/skills/torchmetrics in your project. Codex loads it when a task matches its description.

Can I use Torchmetrics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VectorSpaceLab/AREX-Skill --skill torchmetrics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/torchmetrics, .gemini/skills/torchmetrics, .github/skills/torchmetrics and .opencode/skills/torchmetrics in your project.

What does Torchmetrics need to run?

Going by SKILL.md and its folder, Torchmetrics needs Python for the scripts in its folder and the command-line tools its instructions call (python and pip). Our summary lists: Python 3.

Does Torchmetrics access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Torchmetrics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Torchmetrics use?

Torchmetrics is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Torchmetrics use?

About 964 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Torchmetrics?

Skills that share tags, products or a category with Torchmetrics: Add Uint Support (pytorch/pytorch, 104k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars), Add Torch Shapes Example (facebook/pyrefly, 7.1k stars) and MUSA GPU Training Optimizer (open-infra-skills/infra-skills, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Torchmetrics?

VectorSpaceLab (a GitHub organization) maintains it in VectorSpaceLab/AREX-Skill, which has 330 GitHub stars. The repository holds 159 skills in this directory. The repository was last updated on September 3, 2026.

Source: VectorSpaceLab/AREX-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.