alterlab-transformers

alterlab-transformers is a skill for Claude Code from AlterLab-IEU/AlterLab-Academic-Skills. It costs 70 tokens per session (1,133 once invoked), scanned A, a copy of transformers, MIT.

A Python library that provides pre-trained models for text, images, audio, and combined media. These models can generate, classify, translate, summarize, answer questions, recognize speech, or be adapted to custom data.

In plain words
What is it for?
Use it for text generation and classification, question answering, translation, summarization, image recognition, object detection, speech recognition, and model fine-tuning.
Why use it?
It gives you ready-made machine-learning models so you can run common AI tasks without training a model from the beginning.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the alterlab-data-science plugin — 22 skills shipped together

Good fit Use it for text generation and classification, question answering, translation, summarization, image recognition, object detection, speech recognition, and model fine-tuning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers
Install

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.

Any agent
npx skills add AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-transformers
Clone the repo
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills

Made for: Claude Code.

Or install alterlab-data-science, the plugin that ships this one along with the rest of its 22 skills.

Wrote 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.

agentmods badge for alterlab-transformers

README.md
[![agentmods](https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers/github.svg)](https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers)
Your own site
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alterlab-transformers

Your own site · 80×15
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,133 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01133
Opus 5 $0.00035 $0.00566
Sonnet 5 $0.00014 $0.00227
Haiku 4.5 $0.00007 $0.00113

Measured 6d ago against content hash 1301523f18da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

alterlab-transformers 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 6d ago.

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.

Origin

This is a copy

94% identical to transformers — 16 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/data-science/alterlab-transformers/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Transformers

Overview

The Hugging Face Transformers library provides access to thousands of pre-trained models for tasks across NLP, computer vision, audio, and multimodal domains. Use this skill to load models, perform inference, and fine-tune on custom data.

Installation

Install transformers and core dependencies:

uv pip install torch transformers datasets evaluate accelerate

For vision tasks, add:

uv pip install timm pillow

For audio tasks, add:

uv pip install librosa soundfile

Authentication

Many models on the Hugging Face Hub require authentication. Set up access:

from huggingface_hub import login
login()  # Follow prompts to enter token

Or set the environment variable the Hub client reads (HF_TOKEN):

export HF_TOKEN="your_token_here"

Get tokens at: https://huggingface.co/settings/tokens

Quick Start

Use the Pipeline API for fast inference without manual configuration:

from transformers import pipeline

# Text generation
generator = pipeline("text-generation", model="gpt2")
result = generator("The future of AI is", max_length=50)

# Text classification
classifier = pipeline("text-classification")
result = classifier("This movie was excellent!")

# Question answering
qa = pipeline("question-answering")
result = qa(question="What is AI?", context="AI is artificial intelligence...")

Core Capabilities

1. Pipelines for Quick Inference

Use for simple, optimized inference across many tasks. Supports text generation, classification, NER, question answering, summarization, translation, image classification, object detection, audio classification, and more.

When to use: Quick prototyping, simple inference tasks, no custom preprocessing needed.

See references/pipelines.md for comprehensive task coverage and optimization.

2. Model Loading and Management

Load pre-trained models with fine-grained control over configuration, device placement, and precision.

Read the full file on GitHub · 165 lines

Files

What ships with it

6 files 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.

Changes

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.

  1. 6d ago First seen · 165 lines · 70 tokens per session scan A 1301523f18da

Subscribe to this mod's changes

alterlab-transformers is a skill published in the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills (66 stars, last pushed 5d ago), licensed MIT. It adds 70 tokens to every session and 1,133 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to transformers, differing in 16 lines, and is treated as a copy.

Related

Other skills, from other repositories

r-spss-syntax-architect

A guide for turning research hypotheses into repeatable R or SPSS code for statistical analysis. It covers panel data, where the same companies or other units are observed over time, as well as interaction effects, curves, and mediation.

Nero1688/claude-academic-skills · 406 tokens

multi-source-data-integrator

A method for combining independent data sources into one traceable, reproducible research dataset.

Nero1688/claude-academic-skills · 685 tokens

guidance

Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance - Microsoft Research's constrained generation framework.

davila7/claude-code-templates · 38 tokens

outlines

Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library.

davila7/claude-code-templates · 50 tokens

ml-expert

Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.

personamanagmentlayer/pcl · 58 tokens

llm-engineering-expert

Build reliable applications on large language models: prompt design, structured output, evaluation, guardrails, and cost and latency control. Use when the user mentions LLMs, prompts, prompt engineering, few-shot examples, structured or JSON output, function calling, hallucination, model evaluation, token costs…

personamanagmentlayer/pcl · 92 tokens