Agent skill

Trl Sft

by burtenshaw in burtenshaw/training-agents

A skill your agent uses when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or trl sft, especially for agentic models trained on chat messages…

Apache-2.0Auto-check passedAI & LLM Engineering

Install Trl Sft

skills CLI
$ npx skills add burtenshaw/training-agents --skill trl-sft -a claude-code

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

GitHub CLI
$ gh skill install burtenshaw/training-agents trl-sft --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/burtenshaw/training-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trl-sft .claude/skills/trl-sft && 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
trl-sft
GitHub stars
153
Token cost
~685 tokens
SKILL.md length
305 words
Files
6 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or trl sft, especially for agentic models trained on chat messages…

  • Works in 6 steps: Confirm the target behavior: chat, tool… → Inspect the dataset shape before… → Pick loss masking: assistant-only for… → …
  • Debugging supervised fine-tuning with TRL SFTTrainer
  • SKILL.md covers Workflow, Defaults, Agent Trace Training and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Trl Sft is an agent skill from burtenshaw/training-agents. Use when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or trl sft, especially for agentic models trained on chat messages, prompt/completion data, tool-calling examples, assistant-only loss, completion-only loss, LoRA/PEFT adapters, Trackio logging, or agent trace datasets such as julien-c/synthtraces.

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `agents/openai.yaml`, `references/sft-commands.md` and `references/sft-dataset-formats.md`).

It sits in AI & LLM Engineering, covering Fine-tuning. The repository describes itself as: A repo on resources for training agents. The licence is Apache-2.0.

When your agent uses it

  • Debugging supervised fine-tuning with TRL SFTTrainer
  • Especially for agentic models trained on chat messages
  • Prompt/completion data
  • Tool-calling examples

Example prompts

  • “/trl-sft”

Requirements

  • Python 3

Workflow steps

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

  1. Confirm the target behavior: chat, tool calling, trace imitation, domain
  2. Inspect the dataset shape before choosing trainer arguments.
  3. Pick loss masking: assistant-only for conversational data when the chat
  4. Start with a smoke run that loads the dataset, tokenizes examples, trains for
  5. Add Trackio for non-trivial local runs or any remote run.
  6. Record the exact model, dataset, split, command, seed, and output path.

What it can do on your machine

Read from SKILL.md and the folder at commit ec7cc54. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

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

  • Network

    No URLs in SKILL.md.

    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

Trl Sft loads about 685 tokens when it runs, and up to ~1.5k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 305 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from burtenshaw/training-agents at commit ec7cc54, republished under its Apache-2.0 licence (© burtenshaw). 305 words, ~685 tokens.

Download SKILL.mdSave it as .claude/skills/trl-sft/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
trl-sft
description
Use when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or `trl sft`, especially for agentic models trained on chat messages, prompt/completion data, tool-calling examples, assistant-only loss, completion-only loss, LoRA/PEFT adapters, Trackio logging, or agent trace datasets such as `julien-c/synthtraces`.

TRL SFT

Use this skill for the first rung of the Training Agents ladder: supervised fine-tuning models to follow chat formats, use tools, and imitate verified agent traces.

Workflow

  1. Confirm the target behavior: chat, tool calling, trace imitation, domain instruction following, or recovery behavior.
  2. Inspect the dataset shape before choosing trainer arguments.
  3. Pick loss masking: assistant-only for conversational data when the chat template supports it, completion-only for prompt/completion data, full LM only when intentional.
  4. Start with a smoke run that loads the dataset, tokenizes examples, trains for a few steps, evaluates or generates one sample, and saves an artifact.
  5. Add Trackio for non-trivial local runs or any remote run.
  6. Record the exact model, dataset, split, command, seed, and output path.

Defaults

  • Prefer SFTTrainer and SFTConfig for Python scripts.
  • Prefer trl sft --config sft_config.yaml once a command has more than a few arguments.
  • Use --dataset_name in TRL CLI examples; the current TRL docs use underscore argument names.
  • Use LoRA/PEFT for fast challenge iteration unless full fine-tuning is the explicit goal.
  • If eval_strategy is enabled, provide an eval_dataset.
  • Keep generated checkpoints, processed datasets, and logs out of this context repository.

Agent Trace Training

Agent traces can become SFT data when they are reviewed, redacted, filtered, and converted into teachable message sequences. Do not train directly on raw private traces without checking for secrets, personal data, private code, and tool output that should not be learned.

Minimal trace-dataset command pattern:

bash
trl sft \
  --model_name_or_path Qwen/Qwen2.5-0.5B \
  --dataset_name julien-c/synthtraces \
  --output_dir outputs/sft-synthtraces-smoke

Treat this as a starting point, not a final recipe. Inspect the dataset columns and write a formatting function or preprocessing step if the raw trace rows are not already in a TRL-supported SFT format.

References

  • references/sft-dataset-formats.md: SFT dataset shapes and masking choices.
  • references/tool-calling-sft.md: tool-call examples and schema checks.
  • references/trace-sft.md: training on Hub agent traces and synthtraces.
  • references/sft-commands.md: CLI and config patterns.

© burtenshaw, 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 5 other files (references) in .agents/skills/trl-sft of burtenshaw/training-agents.

  • SKILL.md
  • agents/openai.yaml
  • references/sft-commands.md
  • references/sft-dataset-formats.md
  • references/tool-calling-sft.md
  • references/trace-sft.md

Open the folder on GitHubat commit ec7cc54

Compare with similar skills

Trl Sft 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.

Trl Sft compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trl Sft this skillburtenshaw/training-agents153—~685Automated safety check: PassApache-2.0
Sentence-Transformers Training Routerhuggingface/skills11k1 repos~2.6kAutomated safety check: PassApache-2.0
Train RlOpenPipe/ART11k—~2.4kAutomated safety check: PassApache-2.0
Qwopus27b Rl TrainingR6410418/Jackrong-llm-finetuning-guide1.7k—~830Automated safety check: PassApache-2.0
Dataset Evaluationawslabs/agent-plugins9161 repos~1.3kAutomated safety check: PassApache-2.0
Train SftOpenPipe/ART11k—~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.

    11k GitHub starsUsed in 1 repo~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Train Rl

    OpenPipe/ART

    RL training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Qwopus27b Rl Training

    R6410418/Jackrong-llm-finetuning-guide

    Prepare, validate, launch-plan, monitor, resume, and stop configurable Qwopus 27B reinforcement-learning workflows for GRPO or GSPO.

    1.7k GitHub stars~830 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Dataset Evaluation

    awslabs/agent-plugins

    Official

    Validates dataset formatting and quality for SageMaker model fine-tuning (SFT, DPO, or RLVR).

    916 GitHub starsUsed in 1 repo~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Train Sft

    OpenPipe/ART

    SFT training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Fine Tuning With Trl

    Orchestra-Research/AI-Research-SKILLs

    Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training.

    13k GitHub starsUsed in 6 repos~2.9k tokens
    AI & LLM EngineeringAuto-check passed

More from burtenshaw/training-agents

  • Trl Post Training

    burtenshaw/training-agents

    A skill your agent uses when building, reviewing, or editing TRL post-training workflows for agentic applications, including SFT, DPO, GRPO, RLOO, reward modeling, dataset formats, chat templates…

    153 GitHub stars~599 tokensUpdated 28 days ago
    Auto-check passed
  • Agentic Self Distillation

    burtenshaw/training-agents

    A skill your agent uses when designing or reviewing self-distillation workflows for agentic models, including trace collection, teacher or judge feedback, rejection sampling, critique, conversion to…

    153 GitHub stars~354 tokensUpdated 28 days ago
    Auto-check passed
  • Hugging Face CLI Workflows

    burtenshaw/training-agents

    A skill your agent uses when working with Hugging Face CLI or Hub workflows for TRL training, including auth, repositories, uploads, downloads, Jobs, buckets, model persistence, dataset checks…

    153 GitHub stars~298 tokensUpdated 28 days ago
    Auto-check passed
  • Openenv Agentic Rl

    burtenshaw/training-agents

    A skill your agent uses when designing, reviewing, or implementing OpenEnv-style environment interfaces for agentic RL with TRL, including reset/step/state contracts, tasksets, Docker or…

    153 GitHub stars~381 tokensUpdated 28 days ago
    Auto-check passed
  • Trackio Observability

    burtenshaw/training-agents

    A skill your agent uses when instrumenting or inspecting TRL training runs with Trackio, run names, metric schemas, dashboards, logs, grep or ripgrep, SFTP, Hugging Face Job logs, remote artifacts…

    153 GitHub stars~351 tokensUpdated 28 days ago
    Auto-check passed

Questions about Trl Sft

What does Trl Sft do?

A skill your agent uses when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or trl sft, especially for agentic models trained on chat messages…. Trl Sft is an agent skill from burtenshaw/training-agents. Use when designing, implementing, reviewing, or debugging supervised fine-tuning with TRL SFTTrainer or trl sft, especially for agentic models trained on chat messages, prompt/completion data, tool-calling examples, assistant-only loss, completion-only loss, LoRA/PEFT adapters, Trackio logging, or agent trace datasets such as julien-c/synthtraces.

When should I use Trl Sft?

Trl Sft fits situations like: debugging supervised fine-tuning with TRL SFTTrainer; especially for agentic models trained on chat messages; prompt/completion data; tool-calling examples.

How do I install Trl Sft in Claude Code?

Run `npx skills add burtenshaw/training-agents --skill trl-sft -a claude-code`. Or copy the skill folder (.agents/skills/trl-sft in burtenshaw/training-agents) into .claude/skills/trl-sft in your project. Claude Code loads it when a task matches its description.

How do I install Trl Sft in Codex?

Run `npx skills add burtenshaw/training-agents --skill trl-sft -a codex`. Or copy the skill folder (.agents/skills/trl-sft in burtenshaw/training-agents) into .agents/skills/trl-sft in your project. Codex loads it when a task matches its description.

Can I use Trl Sft 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 burtenshaw/training-agents --skill trl-sft -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trl-sft, .gemini/skills/trl-sft, .github/skills/trl-sft and .opencode/skills/trl-sft in your project.

What does Trl Sft need to run?

SKILL.md names no scripts, command-line tools or credentials: Trl Sft is instructions for the agent only. Our summary lists: Python 3.

Does Trl Sft access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trl Sft 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. Review the folder before installing.

What licence does Trl Sft use?

Trl Sft is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trl Sft use?

About 685 tokens (SKILL.md is roughly 2.7k 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 846 tokens, read only when the agent opens those files.

What are the alternatives to Trl Sft?

Skills that share tags, products or a category with Trl Sft: Sentence-Transformers Training Router (huggingface/skills, 11k stars), Train Rl (OpenPipe/ART, 11k stars), Qwopus27b Rl Training (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars) and Dataset Evaluation (awslabs/agent-plugins, 916 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trl Sft?

burtenshaw (a GitHub user) maintains it in burtenshaw/training-agents, which has 153 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on September 13, 2026.

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