SkillsBench is a benchmark for measuring how effectively AI agents use modular skills—folders containing instructions, scripts, and resources—to complete specialized tasks. It helps researchers and developers evaluate both skill quality and agent behavior, including tasks that require combining multiple skills. The catalogue’s skills and instructions are evaluated as part of this workflow.
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.
npx agentmods add skills/benchflow-ai/skillsbench/trlnpx skills add benchflow-ai/skillsbench --skill trlgit clone --depth 1 https://github.com/benchflow-ai/skillsbenchWrote 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.
[](https://agentmods.dev/skills/benchflow-ai/skillsbench/trl)<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/trl"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/trl.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00100 | $0.00966 |
| Opus 5 | $0.00050 | $0.00483 |
| Sonnet 5 | $0.00020 | $0.00193 |
| Haiku 4.5 | $0.00010 | $0.00097 |
Grade A, and why
trl 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 yesterday.
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.
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.
TRL Library Reference
Package Structure
TRL is organized around a trainer hierarchy that extends Hugging Face transformers.Trainer.
trl/
├── trainer/
│ ├── grpo_trainer.py # GRPOTrainer
│ ├── grpo_config.py # GRPOConfig
│ ├── sft_trainer.py # SFTTrainer (supervised fine-tuning)
│ ├── dpo_trainer.py # DPOTrainer (direct preference optimization)
│ ├── kto_trainer.py # KTOTrainer (Kahneman-Tversky optimization)
│ ├── online_dpo_trainer.py # OnlineDPOTrainer
│ ├── utils.py # Shared utilities (log probs, decoding, padding)
│ └── ...
├── models/
│ └── modeling_value_head.py # Value head for PPO-style trainers
├── data_utils.py
├── commands/ # CLI entry points
└── ...
Trainer Hierarchy
All TRL trainers extend transformers.Trainer:
transformers.Trainer
├── SFTTrainer # Supervised fine-tuning
├── DPOTrainer # Direct preference optimization
├── GRPOTrainer # Group relative policy optimization
├── KTOTrainer # Kahneman-Tversky optimization
└── OnlineDPOTrainer # Online DPO
Each trainer overrides compute_loss with its specific objective, and RL-based trainers (GRPO, OnlineDPO) additionally override training_step to add a generation phase before the optimization step.
Shared Utility Functions (trainer/utils.py)
These utilities are used across multiple trainers. Read the source before modifying; the contracts below are what callers rely on.
selective_log_softmax(logits, index)
Memory-efficient per-token log-probability. Equivalent in value to F.log_softmax(logits, dim=-1).gather(...) at the selected token positions, but avoids materializing the full vocab-sized tensor.
Contract:
- Input:
logits [B, T, V],index [B, T] - Output:
log_probs [B, T], each entry a valid log-probability (i.e. non-positive) - Must agree with
F.log_softmaxto within numerical tolerance on the same inputs
decode_and_strip_padding(input_ids, tokenizer)
Converts a batch of token ID tensors into the cleaned text strings that the reward function will score.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday First seen · 85 lines · 100 tokens per session scan A 96e11df1379f
trl is a skill published in the GitHub repository benchflow-ai/skillsbench (1,747 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 100 tokens to every session and 966 once invoked, about $0.0005 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-09-03.
Other skills, from other repositories
pytorch-loss-implementation
Implement loss functions in PyTorch with proper tensor operations.
simpo-loss-implementation
Implements the Simple Preference Optimization (SimPO) loss function in PyTorch, focusing on length-normalized log probabilities and target reward margins.
pytorch-preference-optimization
PyTorch patterns for implementing preference optimization losses (DPO, SimPO, etc.) for LLM training.
pytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.
accelerate
Run PyTorch training across GPUs with minimal changes.
optimize-for-gpu
GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…