Skip to main content
skill CX Codex

transformers — Claude Code skill: Hugging Face models and training

A skill that walks your agent through Hugging Face Transformers: pulling checkpoints from the Hub, running pipeline inference, generating text and fine-tuning with Trainer.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add K-Dense-AI/scientific-agent-skills --skill transformers -a claude-code
Open on GitHub

What transformers does

The skill covers Transformers 5.18.0 and gives the agent a reference for loading Hub checkpoints, quick inference through pipeline, text generation with decoding controls, and fine-tuning on custom data via Trainer and TrainingArguments. It spans NLP, vision, audio and multimodal work.

Check your setup first. Python 3.10+, PyTorch 2.5+ and network access for Hub downloads are required. Keep the stack in its own environment: the pinned set is transformers[torch]==5.18.0, torch==2.14.1, datasets==5.0.1, accelerate==1.15.0, peft==0.21.2. Bumping packages one at a time breaks the combination — Datasets 5.0.1 needs Hub below 2, so a newer Hub makes the training stack unsatisfiable. Audio preprocessing pulls in librosa 1.0.0, which needs Python 3.12+.

Gated and private checkpoints need a Hugging Face token, either through hf auth login or the HF_TOKEN variable. Pick the narrowest scope that works: read for downloads, write only when you upload. Version 5 dropped the TensorFlow and JAX backends, and several pipeline tasks such as summarization and question-answering are gone — those need direct task models instead.

What it helps with

  • load a checkpoint from the Hugging Face Hub and run inference
  • build a text or image classification pipeline
  • tune text generation with temperature, top-k and top-p
  • fine-tune a model on a custom dataset with Trainer
  • figure out which PyTorch and datasets versions fit together

Example prompts for the agent

  • Load Qwen/Qwen2.5-1.5B and generate a continuation for my prompt
  • Set up a sentiment classification pipeline with distilbert-base-uncased-finetuned-sst-2-english
  • Configure TrainingArguments and fine-tune the model on my dataset

How to install transformers

1Skills CLI (Vercel)

npx skills add K-Dense-AI/scientific-agent-skills --skill transformers -a claude-code

2Manually: put the files in place

~/.claude/skills/transformers/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/transformers/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about transformers

How do I install transformers in Claude Code?

Run npx skills add K-Dense-AI/scientific-agent-skills --skill transformers -a claude-code. The skill lands in ~/.claude/skills/transformers/SKILL.md.

What does the transformers skill do?

It guides the agent through Hugging Face Transformers: loading Hub models, pipeline inference, text generation and Trainer fine-tuning.

What do I need before using it?

Python 3.10+, PyTorch 2.5+ and network access to download models. Gated checkpoints also need a Hugging Face token via hf auth login or HF_TOKEN.

Similar skills

Everything for AI and ML →

From the same set159

infographics Turns your data into a PNG infographic through Nano Banana 2, then scores the result against a quality threshold. Handy when a report needs a picture instead of another table. CX Codex +1 2,000installs dask A skill that teaches the agent to use Dask for DataFrames, arrays and tasks that outgrow RAM or run across a cluster. CX Codex +1 2,000installs shap Guides AI agents in explaining and auditing machine learning predictions with SHAP. Useful for selecting explainers, checking additivity, and rendering attribution plots. CX Codex +1 2,000installs pyzotero Manages Zotero libraries through the pyzotero Python client: search references, edit records, handle collections, tags, and attachments. Use it for bibliography automation. CX Codex +1 2,000installs generate-image Generates and edits images via OpenRouter Image API using Gemini, Recraft, and Seedream. Ideal for artwork, logos, concept art, and editing reference images. CX Codex +1 2,000installs networkx Build, analyse and visualise Python graphs with NetworkX. Use it for routes, centrality, communities and graph file formats. CX Codex +1 2,000installs sympy Skill for exact symbolic computation: algebra, differential equations, matrices, physics. When you need √2 exactly instead of 1.414, not numerical approximations. CX Codex +1 2,000installs pytorch-lightning Guides agents through structuring PyTorch Lightning 2.6.6 code, from LightningModules to distributed trainers. Useful when scaling training across GPUs. CX Codex +1 2,000installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor