Data & Analysis

Transformers.js Inference Skill

Run Hugging Face models directly inside JavaScript applications.

46/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 11k
Last updated
19d ago
License
Apache-2.0
transformers-jsjavascripttypescriptmachine-learning
+4webgpuwasmcomputer-visionspeech-recognition

What does this skill do, and when should you use it?

This skill guides agents in using Transformers.js to run pretrained machine-learning models in JavaScript and TypeScript without a Python server. It covers text, vision, audio, and multimodal tasks across browsers, Node.js, Bun, and Deno. Execution can use WASM on CPU or WebGPU when the runtime and hardware support it. The guidance also covers model selection, quantization, caching, progress reporting, batching, error handling, and resource disposal.

It explains how to install @huggingface/transformers and load Hugging Face Hub or local models through the pipeline API; run text classification, entity recognition, question answering, text generation, translation, summarization, image classification, object detection, segmentation, depth estimation, speech recognition, audio classification, text-to-speech, image captioning, document question answering, zero-shot detection, and feature extraction; configure WebGPU or WASM, precision, caching, remote or local model paths, and download progress; and handle batching, revision pinning, inference errors, and pipeline.dispose() cleanup.

Good fit
  • A frontend engineer needs browser-side sentiment analysis, translation, or summarization without deploying a Python backend.
  • A Node.js, Bun, or Deno developer needs server-side inference for text, image, or audio workloads using Hugging Face models.
  • An application team is building speech recognition, image detection, captioning, or other multimodal features in JavaScript.
  • A team needs to balance model size and speed by comparing fp32, fp16, q8, and q4 with WASM or WebGPU execution.
  • A developer needs controlled or offline-oriented deployment using local models, cache configuration, and pinned model revisions.

How do you install this skill?

Before you use it
  • Remote model downloads and caching are the default path; confirm model provenance, licensing, network requests, disk usage, and cache location before deployment.
  • Do not copy the HF_TOKEN or S3 examples into production without secure credential injection, least-privilege access, and log redaction.
  • The supplied main SKILL file is incomplete at the task quick-reference section, and no test or CI evidence is provided; validate the target Node.js/browser, device, and mainland-China network environment independently.
  • Model outputs are probabilistic, while the material provides no quality benchmarks, privacy boundaries, or sensitive-data handling guidance.
Before you start
Your agent needs
  • Shell / CLI
  • Network access
  • Local filesystem
Install first
  • Node.js 18+ or compatible Bun/Deno runtime, or a modern browser with ES modules support
  • @huggingface/transformers

Copy or symlink the repository folder skills/transformers-js into a standard .agents/skills location supported by the coding agent, such as a project-level .agents/skills directory. Install the runtime package with: npm install @huggingface/transformers. In a browser, the source also documents importing the package from its jsDelivr ES module URL. The source does not document a more specific installation flow for every client.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/huggingface/skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/transformers-js" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Use the transformers-js skill to build browser-side sentiment analysis with a quantized model and dispose the pipeline when finished.

Give a coding agent a request such as: "Use the transformers-js skill to build browser-side sentiment analysis with a quantized model and dispose the pipeline when finished." In code, import pipeline, choose a task and model such as pipeline('sentiment-analysis'), process inputs through the returned pipeline, and call await pipe.dispose() when finished. Select device: 'webgpu' when supported, otherwise use the WASM path, and configure dtype, caching, and progress_callback as needed.

What are this skill's strengths and limitations?

Pros
  • Runs models directly in JavaScript or TypeScript without a Python server.
  • Covers NLP, computer vision, audio, and multimodal tasks.
  • Supports browsers, Node.js, Bun, and Deno, with WASM and optional WebGPU execution.
  • Documents quantization, caching, batching, progress callbacks, and local-model configuration.
Limitations
  • Models can range from a few megabytes to several gigabytes and may consume substantial memory plus GPU/CPU resources.
  • WebGPU depends on runtime and hardware support; unsupported environments require WASM fallback.
  • Remote-model loading requires internet access initially; offline use requires local models prepared in advance.
  • The source provides no evidence of a dedicated test suite or cross-platform validation for this skill.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
Transformers.js Inference Skill this page 46 · Use with care ★ 11k 19d ago Apache-2.0
TAO Person Re-Identification ✓ NVIDIA · Official 49 · Use with care ★ 3.6k 13d ago Apache-2.0
TAO MAE Vision Pretraining ✓ NVIDIA · Official 48 · Use with care ★ 3.6k 13d ago Apache-2.0
Trackio Experiment Tracking Skill 53 · Use with care ★ 38k 15d ago MIT
TAO AutoML + DEFT Three-Phase Pipeline ✓ NVIDIA · Official 51 · Use with care ★ 3.6k 13d ago Apache-2.0

Compared with integrations that require a Python server, this skill focuses on running models directly inside JavaScript applications; the source does not provide a systematic comparison with specific competing libraries.

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
46/ 100 5-point scale 2.3 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust11 / 25 · 2.2/5

The documentation discloses remote model downloads, caching, local models, and custom fetch/S3 cache data flows, and provides controls to disable remote loading and clear selected caches. However, remote loading is the normal path; examples read images from external URLs and show Bearer-token injection and cloud caching without user confirmation, credential-safety guidance, source restrictions, complete permission boundaries, or rollback procedures. Apache-2.0 and repository metadata support attribution, but the publisher is unverified, so points are deducted.

2Reliability7 / 20 · 1.8/5

Installation, runtime, device, quantization, caching, progress, and error-handling examples are provided, and disposal is repeatedly required. There are no executable tests, CI coverage, or reproducible results; some defaults and API claims are internally tense, such as cache-path and version/API assumptions. Error handling relies mainly on message-string matching and gives limited coverage of malformed input, concurrency, initialization failure, and cleanup failure. The score is therefore limited to a modest static-review level.

3Adaptability10 / 15 · 3.3/5

The audience and scenarios are broad: browser, Node.js, Bun, Deno, React, Express, and text, vision, audio, and multimodal tasks, with a local/offline mode. Boundaries, input constraints, model-quality limitations, and non-fit cases are insufficiently explicit; Chinese-language guidance is limited; and the remote workflow depends on Hugging Face Hub/CDN reachability, with no mainland-China network assessment.

4Convention8 / 15 · 2.7/5

The material has good information architecture, tables of contents, cross-references, installation notes, parameter examples, troubleshooting, license, author, 4.x metadata, and revision-pinning advice. It lacks a changelog, explicit maintenance owner, update path, and compatibility matrix. The supplied main SKILL content is truncated at the task quick-reference table, and some referenced files or claims cannot be fully verified from the supplied material.

5Effectiveness7 / 15 · 2.3/5

The skill directly supplies installation, pipeline usage, model selection, configuration, caching, and multi-runtime examples, so it plausibly completes core inference tasks. Static evidence does not verify execution, output correctness, performance, model compatibility, or download availability; users must still select models, resolve environment differences, and review model licenses. The score follows the static calibration ceiling.

6Verifiability3 / 10 · 1.5/5

The material includes a pinned repository revision, official documentation and GitHub links, concrete code, and named APIs, providing limited traceability. It includes no committed tests, CI results, locked dependency evidence, independent review, or execution logs; key capabilities remain documentation claims, so the score cannot exceed the static-review ceiling.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 20, 2026 Reviewed revision 86cdeee824b7 Review evidence[1][2][3][4][5][6][7][8]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Do I need to deploy a Python server?
No. The skill describes direct execution in browsers and Node.js, Bun, or Deno using Transformers.js.
Is internet access required?
Internet access is needed to download models from the Hugging Face Hub. It is optional when using local models, and caching can reduce repeated downloads.
What happens if WebGPU is unavailable?
Use the WASM/CPU fallback and consider q8 or q4 quantization to reduce model size and resource usage.
Why must pipelines be disposed?
Pipelines hold model, GPU, and CPU resources. Call pipe.dispose() after inference, component unmount, batch processing, or server shutdown to release them.

More skills from this repository

All from huggingface/skills

Dev & Engineering

Hugging Face Hub CLI Skill

Give agents command-line control over Hugging Face Hub models, datasets, Spaces, jobs, and infrastructure.

★ 11k FS 42 Not recommended 19d ago
Dev & Engineering

Gradio Interactive App Builder

Build Gradio web interfaces, machine-learning demos, and chat apps in Python.

★ 11k FS 40 Not recommended 19d ago
Data & Analysis

TRL Language Model Trainer

Train and fine-tune transformer language models with TRL’s CLI for SFT, preference alignment, and reinforcement learning.

★ 11k FS 48 Use with care 19d ago
Data & Analysis

Hugging Face Local Evaluator

Run controlled inspect-ai or lighteval evaluations for Hugging Face Hub models on local hardware.

★ 11k FS 47 Use with care 19d ago
Data & Analysis

Sentence Transformers Training Assistant

Train retrieval, similarity, reranking, and sparse-search models with Sentence Transformers.

★ 11k FS 47 Use with care 19d ago
Data & Analysis

Hugging Face Vision Trainer

Train detection, classification, and segmentation models on Hugging Face Jobs GPUs and persist the results to the Hub.

★ 11k FS 43 Not recommended 19d ago
Dev & Engineering

Hugging Face ZeroGPU Builder

Build dependable Gradio AI demos and GPU workloads on Hugging Face ZeroGPU.

★ 11k FS 56 Use with care 19d ago
Dev & Engineering

LoRA Space Demo Builder

Build and publish a tailored Gradio Space for a Hugging Face LoRA.

★ 11k FS 51 Use with care 19d ago
Automation & Ops

AWS Context Discovery

Resolve the active AWS environment before any account operation.

★ 11k FS 50 Use with care 19d ago
Automation & Ops

SageMaker Deployment Planner

Choose a practical Amazon SageMaker deployment path for your model, traffic pattern, and latency needs.

★ 11k FS 50 Use with care 19d ago
Dev & Engineering

Hugging Face Spaces Builder

Build, deploy, debug, and maintain machine-learning apps on Hugging Face Spaces.

★ 11k FS 50 Use with care 19d ago
Automation & Ops

SageMaker Python Environment Setup

Build an isolated, version-aligned Python environment for SageMaker and AWS automation.

★ 11k FS 49 Use with care 19d ago
Data & Analysis

Hugging Face Dataset Explorer

Explore, query, and extract Hugging Face datasets through the Dataset Viewer API.

★ 11k FS 49 Use with care 19d ago
Dev & Engineering

Hugging Face Paper Research Assistant

Read AI papers and retrieve structured metadata from Hugging Face paper pages.

★ 11k FS 49 Use with care 19d ago
Data & Analysis

Hugging Face LLM Trainer

Train, fine-tune, and preserve models on Hugging Face cloud GPUs.

★ 11k FS 48 Use with care 19d ago
Automation & Ops

SageMaker Serving Image Selector

Choose a compatible SageMaker serving container and retrieve the current regional image URI for a Hugging Face model.

★ 11k FS 47 Use with care 19d ago
Automation & Ops

SageMaker Production Defaults

Deploy SageMaker real-time or async endpoints with autoscaling, CloudWatch alarms, and consistent tagging built in.

★ 11k FS 46 Use with care 19d ago
Data & Analysis

Hugging Face Model Memory Estimator

Estimate inference memory without downloading model weights.

★ 11k FS 44 Not recommended 19d ago
Dev & Engineering

Hugging Face Local Model Runner

Choose compatible GGUF quantizations from Hugging Face and run them locally with llama.cpp.

★ 11k FS 44 Not recommended 19d ago
Data & Analysis

Trackio Experiment Tracking

Log, monitor, and query machine-learning experiments with dashboards, diagnostic alerts, and automation-ready output.

★ 11k FS 43 Not recommended 19d ago

Related skills