Agent Skill
2/7/2026detect-metrics
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.
T
tidymodels
398GitHub Stars
1Views
npx skills add tidymodels/yardstick
SKILL.md
| Name | detect-metrics |
| Description | 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. |
name: detect-metrics description: 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.
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:
- Generic function calling
UseMethod() - Constructor wrap:
metric_name <- new_*_metric(metric_name, direction = "minimize"|"maximize"|"zero") - Data frame method using
*_metric_summarizer() - Vector implementation:
metric_name_vec()
Key files
R/aaa-new.R- Metric constructor definitionsR/fair-aaa.R- Groupwise metric constructorR/template.R- Metric summarizer functions
Skills Info
Original Name:detect-metricsAuthor:tidymodels
Download