Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in browsers and server-side runtimes (Node.js, Bun, Deno) with WebGPU/WASM using pre-trained models from Hugging Face Hub.
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 8/20/2026
What it changes
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill100%
Checks it passed that the model alone missed
Sets env.logLevel to LogLevel.WARNING
Recommends installing or importing '@huggingface/tokenizers'
Uses ModelRegistry.get_pipeline_files to retrieve pipeline assets
and 4 more in the full report
5 fixed17 passed either way0 still failing0 broke
Pass-rate lift
+23 pp
Tokens
+287%
Agent turns
0%
Response time
-43%
Model gemini-3.6-flashMeasured 8/20/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
My WebWorker needs to tokenize text and compute token counts without downloading or executing large ONNX neural network weights. Which npm package from the Hugging Face ecosystem should I use for tokenization alone?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends installing or importing '@huggingface/tokenizers'
Missed
Passed
case-07 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md680 lines8 files
Transformers.js - Machine Learning for JavaScript
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.
When to Use This Skill
Use this skill when you need to:
Run ML models for text analysis, generation, or translation in JavaScript
Perform image classification, object detection, or segmentation
Implement speech recognition or audio processing
Build multimodal AI applications (text-to-image, image-to-text, etc.)
Run models client-side in the browser without a backend
Installation
NPM Installation
npm install @huggingface/transformers
Browser Usage (CDN)
<script type="module">
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers';
</script>
Core Concepts
1. Pipeline API
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!');
Generate speech from text via POST /audio/speech. Covers TTS models (Kokoro, Qwen 3, xAI, Inworld, Chatterbox, Orpheus, ElevenLabs Turbo, MiniMax, Gemini Flash), voices per family, output formats (mp3/opus/aac/flac/wav/pcm), streaming, prompt/emotion styling, temperature/top_p, and language hints.