Lists available metric functions and constructors within the yardstick package to clarify metric structures.

Install

mkdir -p .claude/skills/detect-metrics && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5016" && unzip -o skill.zip -d .claude/skills/detect-metrics && rm skill.zip

Installs to .claude/skills/detect-metrics

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Detect and list all metric functions in the yardstick package. Use when a user asks to find, list, or identify all metrics in the package.
138 chars✓ has a “when” trigger
Beginner

Key capabilities

  • List metric functions
  • Identify metric constructors
  • Verify exported metrics
  • Scan package for definitions

How it works

The skill uses grep commands to scan the yardstick package for metric definitions, constructors, and exported functions.

Inputs & outputs

You give it
Package context
You get back
List of metric functions

When to use detect-metrics

  • Listing all available metric functions
  • Finding metric definitions or constructors
  • Verifying exported metrics from the NAMESPACE file

About this skill

Detect metrics

Detection commands

Find all metric definitions (recommended):

grep -E ".* <- new_.*_metric\(" R/*.R

Find available metric constructors:

grep -E "^new_.*_metric <- function" R/*.R

Check exported metrics:

grep "^export(" NAMESPACE | sed 's/export(//' | sed 's/)//'

Metric structure

Each metric has:

  1. Generic function calling UseMethod()
  2. Constructor wrap: metric_name <- new_*_metric(metric_name, direction = "minimize"|"maximize"|"zero")
  3. Data frame method using *_metric_summarizer()
  4. Vector implementation: metric_name_vec()

Key files

  • R/aaa-new.R - Metric constructor definitions
  • R/fair-aaa.R - Groupwise metric constructor
  • R/template.R - Metric summarizer functions

When not to use it

  • Non-yardstick package analysis
  • General R package development

Prerequisites

yardstick package installed

Limitations

  • Limited to yardstick package

How it compares

It provides automated detection of internal package structures instead of manual documentation lookup.

Compared to similar skills

detect-metrics side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
detect-metrics (this skill)16moReviewBeginner
backtesting-trading-strategies1027dReviewIntermediate
data-quality-frameworks62moReviewIntermediate
trulens-running-evaluations13moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry