Transformers Practitioner Skill
Guides Claude through Hugging Face Transformers work: Hub model loading, pipeline inference, text generation, and Trainer fine-tuning on transformers 5.x.
Dev & CodingIntermediate★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Gives Claude concrete rules for
pipeline,AutoModel,AutoTokenizer, andTrainingArgumentsunder transformers 5.x (PyTorch-only). - Supplies pinned install commands plus optional vision (timm, pillow) and audio (librosa, soundfile) extras, and a version check snippet.
- Covers Hub authentication for gated/private models with token hygiene: no hardcoding, narrowest scope,
HF_HUB_DISABLE_IMPLICIT_TOKEN, cache env vars. - Provides three canonical patterns (quick pipeline inference, manual model+tokenizer loading, Trainer fine-tuning) and points to detailed reference docs.
Who it's for
- ML engineers and researchers prototyping NLP, vision, audio, or multimodal models.
- Teams migrating from transformers v4 to v5 who need API-change awareness.
- MLOps folks handling HF tokens safely in CI or on servers.
Examples
- "Write a text-generation script with Qwen2.5-1.5B" → pipeline code using
max_new_tokenscorrectly. - "Fine-tune a classifier on my CSV dataset" →
TrainingArguments+Trainertraining script with sensible epochs/batch size. - "I get a 401 loading a gated model" → walks through
hf auth login,HF_TOKEN, and license acceptance.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/transformers/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/transformers folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/transformers/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/transformers ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r scientific-agent-skills/skills/transformers ~/.claude/skills/ - Verify
~/.claude/skills/transformers/SKILL.mdand itsreferences/folder exist. - In a Python 3.10+ environment install dependencies:
uv pip install "transformers[torch]==5.12.0" huggingface_hub==1.19.0 datasets==5.0.0 accelerate==1.14.0 - If you need gated or private models, run
hf auth login. - Restart Claude Code and test with a prompt like "use the transformers skill to write pipeline inference code".
View source on GitHub ↗License: MIT