Hugging Face Transformers Usage
davila7/claude-code-templates
Loads pre-trained Hugging Face Transformers models for text, vision and audio tasks, runs inference with pipelines and fine-tunes on custom datasets.
Runs pre-trained Hugging Face models in JavaScript or TypeScript with Transformers.js, in browsers or Node.js, Bun and Deno, for text, vision, audio and multimodal tasks.
$ npx skills add huggingface/skills --skill transformers-js -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install huggingface/skills transformers-js --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/transformers-js .claude/skills/transformers-js && rm -rf skills-srcUse ~/.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/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .claude/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/huggingface/skills/tree/main/skills/transformers-jsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add huggingface/skills --skill transformers-js -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install huggingface/skills transformers-js --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/transformers-js .agents/skills/transformers-js && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .agents/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add huggingface/skills --skill transformers-js -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install huggingface/skills transformers-js --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/transformers-js .cursor/skills/transformers-js && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .cursor/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/huggingface/skills.git --path skills/transformers-js--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add huggingface/skills --skill transformers-js -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install huggingface/skills transformers-js --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/transformers-js .gemini/skills/transformers-js && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .gemini/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install huggingface/skills transformers-jsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add huggingface/skills --skill transformers-js -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/transformers-js .github/skills/transformers-js && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .github/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add huggingface/skills --skill transformers-js -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install huggingface/skills transformers-js --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huggingface/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/transformers-js .opencode/skills/transformers-js && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "transformers-js" agent skill from https://github.com/huggingface/skills/tree/main/skills/transformers-js into .opencode/skills/transformers-js/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "transformers-js", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
transformers-jsRuns pre-trained Hugging Face models in JavaScript or TypeScript with Transformers.js, in browsers or Node.js, Bun and Deno, for text, vision, audio and multimodal tasks.
Transformers.js runs machine learning models directly in JavaScript with no Python server. The skill centers on the pipeline API, which bundles preprocessing, inference and postprocessing, and shows how to pick a task or a specific model from the Hugging Face Hub, choose a device, and install through npm or a CDN script tag.
Tasks include text classification, translation and summarization, image classification and object detection, speech recognition and audio classification, and multimodal work. It warns that every pipeline must be released with pipe.dispose() to avoid memory leaks. Reference files cover cache, configuration, examples, model architectures, a model registry, pipeline options and text generation. WebGPU needs runtime and hardware support, with WASM as the broad fallback.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit ca0325b. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
huggingface.cocdn.jsdelivr.netAlso links to:
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
HF_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires Node.js 18+ (or compatible Bun/Deno runtime) or modern browser with ES modules support. WebGPU requires runtime and hardware support; WASM is the broad fallback. Internet access is needed for downloading models from Hugging Face Hub (optional if using local models).
From compatibility in the SKILL.md frontmatter.
Transformers.js loads about 6.2k tokens when it runs, and up to ~24k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 1,325 words of instructions outside code blocks.
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.
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.
The full file from huggingface/skills at commit ca0325b, republished under its Apache-2.0 licence (© huggingface). 1,325 words, ~6,225 tokens.
.claude/skills/transformers-js/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Transformers.js enables running state-of-the-art machine learning models directly in JavaScript across browsers and server-side runtimes (Node.js, Bun, Deno), with no Python server required.
Use this skill when you need to:
npm install @huggingface/transformers<script type="module">
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers';
</script>The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:
import { pipeline } from '@huggingface/transformers';
// Create a pipeline for a specific task
const pipe = await pipeline('sentiment-analysis');
// Use the pipeline
const result = await pipe('I love transformers!');
// Output: [{ label: 'POSITIVE', score: 0.999817686 }]
// IMPORTANT: Always dispose when done to free memory
await pipe.dispose();⚠️ Memory Management: All pipelines must be disposed with pipe.dispose() when finished to prevent memory leaks. See examples in Code Examples for cleanup patterns across different environments.
You can specify a custom model as the second argument:
const pipe = await pipeline(
'sentiment-analysis',
'Xenova/bert-base-multilingual-uncased-sentiment'
);Finding Models:
Browse available Transformers.js models on Hugging Face Hub:
pipeline_tag parameterTip: Filter by task type, sort by trending/downloads, and check model cards for performance metrics and usage examples.
Choose where to run the model:
// Run on CPU (default for WASM)
const pipe = await pipeline('sentiment-analysis', 'model-id');
// Run on GPU (WebGPU)
const pipe = await pipeline('sentiment-analysis', 'model-id', {
device: 'webgpu',
});Control model precision vs. performance:
// Use quantized model (faster, smaller)
const pipe = await pipeline('sentiment-analysis', 'model-id', {
dtype: 'q4', // Options: 'fp32', 'fp16', 'q8', 'q4'
});Note: All examples below show basic usage.
const classifier = await pipeline('text-classification');
const result = await classifier('This movie was amazing!');const ner = await pipeline('token-classification');
const entities = await ner('My name is John and I live in New York.');const qa = await pipeline('question-answering');
const answer = await qa({
question: 'What is the capital of France?',
context: 'Paris is the capital and largest city of France.'
});const generator = await pipeline('text-generation', 'onnx-community/gemma-3-270m-it-ONNX');
const text = await generator('Once upon a time', {
max_new_tokens: 100,
temperature: 0.7
});For streaming and chat: See Text Generation Guide for:
TextStreamerconst translator = await pipeline('translation', 'Xenova/nllb-200-distilled-600M');
const output = await translator('Hello, how are you?', {
src_lang: 'eng_Latn',
tgt_lang: 'fra_Latn'
});const summarizer = await pipeline('summarization');
const summary = await summarizer(longText, {
max_length: 100,
min_length: 30
});const classifier = await pipeline('zero-shot-classification');
const result = await classifier('This is a story about sports.', ['politics', 'sports', 'technology']);const classifier = await pipeline('image-classification');
const result = await classifier('https://example.com/image.jpg');
// Or with local file
const result = await classifier(imageUrl);const detector = await pipeline('object-detection');
const objects = await detector('https://example.com/image.jpg');
// Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]const segmenter = await pipeline('image-segmentation');
const segments = await segmenter('https://example.com/image.jpg');const depthEstimator = await pipeline('depth-estimation');
const depth = await depthEstimator('https://example.com/image.jpg');const classifier = await pipeline('zero-shot-image-classification');
const result = await classifier('image.jpg', ['cat', 'dog', 'bird']);const transcriber = await pipeline('automatic-speech-recognition');
const result = await transcriber('audio.wav');
// Returns: { text: 'transcribed text here' }const classifier = await pipeline('audio-classification');
const result = await classifier('audio.wav');const synthesizer = await pipeline('text-to-speech', 'Xenova/speecht5_tts');
const audio = await synthesizer('Hello, this is a test.', {
speaker_embeddings: speakerEmbeddings
});const captioner = await pipeline('image-to-text');
const caption = await captioner('image.jpg');const docQA = await pipeline('document-question-answering');
const answer = await docQA('document-image.jpg', 'What is the total amount?');const detector = await pipeline('zero-shot-object-detection');
const objects = await detector('image.jpg', ['person', 'car', 'tree']);const extractor = await pipeline('feature-extraction');
const embeddings = await extractor('This is a sentence to embed.');
// Returns: tensor of shape [1, sequence_length, hidden_size]
// For sentence embeddings (mean pooling)
const extractor = await pipeline('feature-extraction', 'onnx-community/all-MiniLM-L6-v2-ONNX');
const embeddings = await extractor('Text to embed', { pooling: 'mean', normalize: true });Discover compatible Transformers.js models on Hugging Face Hub:
Base URL (all models):
https://huggingface.co/models?library=transformers.js&sort=trendingFilter by task using the pipeline_tag parameter:
Sort options:
&sort=trending - Most popular recently&sort=downloads - Most downloaded overall&sort=likes - Most liked by community&sort=modified - Recently updatedConsider these factors when selecting a model:
1. Model Size
2. Quantization Models are often available in different quantization levels:
fp32 - Full precision (largest, most accurate)fp16 - Half precision (smaller, still accurate)q8 - 8-bit quantized (much smaller, slight accuracy loss)q4 - 4-bit quantized (smallest, noticeable accuracy loss)3. Task Compatibility Check the model card for:
4. Performance Metrics Model cards typically show:
// 1. Visit: https://huggingface.co/models?pipeline_tag=text-generation&library=transformers.js&sort=trending
// 2. Browse and select a model (e.g., onnx-community/gemma-3-270m-it-ONNX)
// 3. Check model card for:
// - Model size: ~270M parameters
// - Quantization: q4 available
// - Language: English
// - Use case: Instruction-following chat
// 4. Use the model:
import { pipeline } from '@huggingface/transformers';
const generator = await pipeline(
'text-generation',
'onnx-community/gemma-3-270m-it-ONNX',
{ dtype: 'q4' } // Use quantized version for faster inference
);
const output = await generator('Explain quantum computing in simple terms.', {
max_new_tokens: 100
});
await generator.dispose();onnx folder in model repo)library=transformers.js to find compatible models: https://huggingface.co/models?library=transformers.jsconst pipe = await pipeline('task', 'model-id', { revision: 'abc123' });env)The env object provides comprehensive control over Transformers.js execution, caching, and model loading.
Quick Overview:
import { env, LogLevel } from '@huggingface/transformers';
// View version
console.log(env.version); // e.g., '4.x'
// Common settings
env.allowRemoteModels = true; // Load from Hugging Face Hub
env.allowLocalModels = false; // Load from file system
env.localModelPath = '/models/'; // Local model directory
env.useFSCache = true; // Cache models on disk (Node.js)
env.useBrowserCache = true; // Cache models in browser
env.cacheDir = './.cache'; // Cache directory location
// Optional: override logging level (default is LogLevel.WARNING)
env.logLevel = LogLevel.INFO;
// Optional: custom fetch for auth headers, retries, abort signals, etc.
env.fetch = (url, options) =>
fetch(url, {
...options,
headers: {
...options?.headers,
Authorization: `Bearer ${HF_TOKEN}`,
},
});Configuration Patterns:
// Development: Fast iteration with remote models
env.allowRemoteModels = true;
env.useFSCache = true;
// Production: Local models only
env.allowRemoteModels = false;
env.allowLocalModels = true;
env.localModelPath = '/app/models/';
// Custom CDN
env.remoteHost = 'https://cdn.example.com/models';
// Disable caching (testing)
env.useFSCache = false;
env.useBrowserCache = false;For complete documentation on all configuration options, caching strategies, cache management, pre-downloading models, and more, see:
ModelRegistry gives you visibility and control over model assets before loading a pipeline. Use it to estimate download size, check cache status, inspect available dtypes, and clear cached artifacts for a specific task/model/options tuple.
import { ModelRegistry } from '@huggingface/transformers';
const task = 'feature-extraction';
const modelId = 'onnx-community/all-MiniLM-L6-v2-ONNX';
const modelOptions = { dtype: 'fp32' };
// List required files for this pipeline
const files = await ModelRegistry.get_pipeline_files(task, modelId, modelOptions);
// Check if assets are already cached
const cached = await ModelRegistry.is_pipeline_cached(task, modelId, modelOptions);
// Inspect precision formats available for this model
const dtypes = await ModelRegistry.get_available_dtypes(modelId);
console.log({ files: files.length, cached, dtypes });For production patterns and full API coverage, see ModelRegistry Reference.
@huggingface/tokenizers)For tokenization-only workflows, use @huggingface/tokenizers. It is a separate lightweight package useful when you need fast tokenization/encoding without loading full model inference pipelines.
npm install @huggingface/tokenizersimport { Tokenizer } from '@huggingface/tokenizers';import { AutoTokenizer, AutoModel } from '@huggingface/transformers';
// Load tokenizer and model separately for more control
const tokenizer = await AutoTokenizer.from_pretrained('bert-base-uncased');
const model = await AutoModel.from_pretrained('bert-base-uncased');
// Tokenize input
const inputs = await tokenizer('Hello world!');
// Run model
const outputs = await model(inputs);const classifier = await pipeline('sentiment-analysis');
// Process multiple texts
const results = await classifier([
'I love this!',
'This is terrible.',
'It was okay.'
]);WebGPU provides GPU acceleration in browsers and server-side runtimes (when supported):
const pipe = await pipeline('text-generation', 'onnx-community/gemma-3-270m-it-ONNX', {
device: 'webgpu',
dtype: 'fp32'
});Note: Use webgpu when available and fall back to WASM/CPU when not supported in the current runtime.
WASM is the most compatible execution backend across runtimes:
// Optimized for browsers with quantization
const pipe = await pipeline('sentiment-analysis', 'model-id', {
dtype: 'q8' // or 'q4' for even smaller size
});Models can be large (ranging from a few MB to several GB) and consist of multiple files. Track download progress by passing a callback to the pipeline() function:
import { pipeline } from '@huggingface/transformers';
// Track progress for each file
const fileProgress = {};
function onProgress(info) {
if (info.status === 'progress_total') {
console.log(`Total: ${info.progress.toFixed(1)}%`);
return;
}
console.log(`${info.status}: ${info.file ?? ''}`);
if (info.status === 'progress') {
fileProgress[info.file] = info.progress;
console.log(`${info.file}: ${info.progress.toFixed(1)}%`);
}
if (info.status === 'done') {
console.log(`✓ ${info.file} complete`);
}
}
// Pass callback to pipeline
const classifier = await pipeline('sentiment-analysis', null, {
progress_callback: onProgress
});Progress Info Properties:
interface ProgressInfo {
status: 'initiate' | 'download' | 'progress' | 'progress_total' | 'done' | 'ready';
name: string; // Model id or path
file?: string; // File being processed (per-file events)
progress?: number; // Percentage (0-100, for 'progress' and 'progress_total')
loaded?: number; // Bytes downloaded (only for 'progress' status)
total?: number; // Total bytes (only for 'progress' status)
}For complete examples including browser UIs, React components, CLI progress bars, and retry logic, see:
try {
const pipe = await pipeline('sentiment-analysis', 'model-id');
const result = await pipe('text to analyze');
} catch (error) {
if (error.message.includes('fetch')) {
console.error('Model download failed. Check internet connection.');
} else if (error.message.includes('ONNX')) {
console.error('Model execution failed. Check model compatibility.');
} else {
console.error('Unknown error:', error);
}
}q8 or q4 for faster inferencemax_new_tokens to avoid memory issuespipe.dispose() when done to free memoryIMPORTANT: Always call pipe.dispose() when finished to prevent memory leaks.
const pipe = await pipeline('sentiment-analysis');
const result = await pipe('Great product!');
await pipe.dispose(); // ✓ Free memory (100MB - several GB per model)When to dispose:
Models consume significant memory and hold GPU/CPU resources. Disposal is critical for browser memory limits and server stability.
For detailed patterns (React cleanup, servers, browser), see Code Examples
onnx folder in model repo)dtype: 'q4')max_lengthdtype: 'fp16' if fp32 failspipeline() with progress_callback, device, dtype, etc.env configuration for caching and model loadingpipe.dispose() when done - critical for preventing memory leaks| Task | Task ID |
|---|---|
| Text classification | text-classification or sentiment-analysis |
| Token classification | token-classification or ner |
| Question answering | question-answering |
| Fill mask | fill-mask |
| Summarization | summarization |
| Translation | translation |
| Text generation | text-generation |
| Text-to-text generation | text2text-generation |
| Zero-shot classification | zero-shot-classification |
| Image classification | image-classification |
| Image segmentation | image-segmentation |
| Object detection | object-detection |
| Depth estimation | depth-estimation |
| Image-to-image | image-to-image |
| Zero-shot image classification | zero-shot-image-classification |
| Zero-shot object detection | zero-shot-object-detection |
| Automatic speech recognition | automatic-speech-recognition |
| Audio classification | audio-classification |
| Text-to-speech | text-to-speech or text-to-audio |
| Image-to-text | image-to-text |
| Document question answering | document-question-answering |
| Feature extraction | feature-extraction |
| Sentence similarity | sentence-similarity |
This skill enables you to integrate state-of-the-art machine learning capabilities directly into JavaScript applications without requiring separate ML servers or Python environments.
© huggingface, 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
SKILL.md and 7 other files (references) in skills/transformers-js of huggingface/skills.
Open the folder on GitHubat commit ca0325b
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in huggingface/skills, which our catalogue first saw on October 7, 2026.
Transformers.js 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Transformers.js this skillhuggingface/skills | 11k | 1 repos | ~6.2k | Automated safety check: Pass | Apache-2.0 | |
| Hugging Face Transformers Usagedavila7/claude-code-templates | 32k | 12 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Transformers JSwaybarrios/opencode-power-pack | 533 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Transformers JSsickn33/agentic-awesome-skills | 47k | 1 repos | ~444 | Automated safety check: Pass | Apache-2.0 | |
| Compromise NLP Libraryspencermountain/compromise | 12k | — | ~2k | Automated safety check: Pass | MIT | |
| Xybrid Initxybrid-ai/xybrid | 466 | — | ~3k | Automated safety check: Pass | Apache-2.0 |
davila7/claude-code-templates
Loads pre-trained Hugging Face Transformers models for text, vision and audio tasks, runs inference with pipelines and fine-tunes on custom datasets.
waybarrios/opencode-power-pack
Run Hugging Face models in JavaScript or TypeScript with Transformers.js, WebGPU, or WASM across browser, Node.js, Bun, and Deno.
sickn33/agentic-awesome-skills
Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript.
spencermountain/compromise
Helps write and debug JavaScript or TypeScript that uses the compromise English NLP library for matching, entity extraction, tagging and sentence transforms.
xybrid-ai/xybrid
Generate model metadata for an ML model so it works with xybrid.
microsoft/skills
Azure AI Voice Live SDK for JavaScript/TypeScript. An agent skill from microsoft/skills.
huggingface/skills
Finds or validates a usable SageMaker execution role before deploying or training, so scripts do not try to create IAM roles they lack permission to create.
huggingface/skills
Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.
huggingface/skills
Trains or fine-tunes language and vision models with TRL or Unsloth on Hugging Face Jobs cloud GPUs, then converts the results to GGUF.
huggingface/skills
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.
huggingface/skills
Sets up an isolated Python environment with a supported interpreter and current boto3 before any SageMaker deployment, training or AWS automation code runs.
huggingface/skills
Runs evaluations of Hugging Face Hub models on local hardware with inspect-ai or lighteval, and helps choose between vLLM, Transformers and accelerate backends.
Categories
Runs pre-trained Hugging Face models in JavaScript or TypeScript with Transformers.js, in browsers or Node.js, Bun and Deno, for text, vision, audio and multimodal tasks. js runs machine learning models directly in JavaScript with no Python server. The skill centers on the pipeline API, which bundles preprocessing, inference and postprocessing, and shows how to pick a task or a specific model from the Hugging Face Hub, choose a device, and install through npm or a CDN script tag.
Transformers.js fits situations like: running a sentiment or classification model in the browser without a backend; adding speech recognition to a Node.js app; doing image classification or object detection from JavaScript; choosing a Transformers.js-compatible model on the Hub.
Run `npx skills add huggingface/skills --skill transformers-js -a claude-code`. Or copy the skill folder (skills/transformers-js in huggingface/skills) into .claude/skills/transformers-js in your project. Claude Code loads it when a task matches its description.
Run `npx skills add huggingface/skills --skill transformers-js -a codex`. Or copy the skill folder (skills/transformers-js in huggingface/skills) into .agents/skills/transformers-js in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add huggingface/skills --skill transformers-js -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/transformers-js, .gemini/skills/transformers-js, .github/skills/transformers-js and .opencode/skills/transformers-js in your project.
Going by SKILL.md and its folder, Transformers.js needs the command-line tools its instructions call (npm) and credentials named HF_TOKEN. Our summary lists: Node.js 18 or later, a compatible Bun or Deno runtime, or a modern browser with ES modules; Internet access to download models from the Hugging Face Hub, unless local models are used. Compatibility (from SKILL.md): Requires Node.js 18+ (or compatible Bun/Deno runtime) or modern browser with ES modules support. WebGPU requires runtime and hardware support; WASM is the broad fallback. Internet access is needed for downloading models from Hugging Face Hub (optional if using local models)..
SKILL.md names 3 domains. In commands or code: huggingface.co and cdn.jsdelivr.net; the agent is likely to contact these when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.
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.
Transformers.js is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.2k tokens (SKILL.md is roughly 25k 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 18k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Transformers.js: Hugging Face Transformers Usage (davila7/claude-code-templates, 32k stars), Transformers JS (waybarrios/opencode-power-pack, 533 stars), Transformers JS (sickn33/agentic-awesome-skills, 47k stars) and Compromise NLP Library (spencermountain/compromise, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
huggingface (a GitHub organization, an official publisher) maintains it in huggingface/skills, which has 11,148 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 1, 2026.
Source: huggingface/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.