Skip to content

Transformers.js Skill · Data Ai

Master Transformers.js for Browser & Node.js ML

Run 100+ Hugging Face models in Node.js or browser JS with Transformers.js for ML inference and deployment

First skill download free (Google or GitHub sign-in) · Extra packs from $4.90, never expire.

Drop straight into .agents/skills/ or .claude/skills/ — 8 verified files ready to run, 8-point safety checked.

---
source: "https://github.com/huggingface/skills/tree/main/skills/transformers-js"
name: transformers-js
description: Run Hugging Face models in JavaScript or TypeScript with Transformers.js in Node.js or the browser.
license: Apache-2.0
risk: unknown
metadata:
  author: huggingface
  version: "3.8.1"
  category: machine-learning
  repository: https://github.com/huggingface/transformers.js
compatibility: Requires Node.js 18+ or modern browser with ES modules support. WebGPU support requires compatible browser/environment. Internet access needed for downloading models from Hugging Face Hub (optional if using local models).
---

# Transformers.js - Machine Learning for JavaScript

Transformers.js enables running state-of-the-art machine learning models directly in JavaScript, both in browsers and Node.js environments, with no server required.

## Core Workflow & Reference Routing

Load only the matching verbatim reference module(s) below for the user's specific task:

- [`references/when-to-use-this-skill.md`](./references/when-to-use-this-skill.md) — Read when working on: When to Use This Skill, Installation, NPM Installation, Browser Usage (CDN), Core Concepts, 1. Pipeline API, 2. Model Selection, 3. Device Selection (+1 more sections) (verbatim `L19-L106`, 88 lines).
…
Full SKILL.md preview ↓

8 files in the ZIP

  • INSTALL.md1.8 KB
  • SKILL.md2.6 KB
  • references/advanced-configuration.md5.2 KB
  • references/finding-and-choosing-models.md4.6 KB
  • references/memory-management.md4.8 KB
  • references/supported-tasks.md4.5 KB
  • references/when-to-use-this-skill.md2.9 KB
  • scripts/verify.sh2.4 KB
4-Platform Quick Install · Unzip into
Antigravity / Codex.agents/skills/
Claude Code.claude/skills/

Cursor & Verify: follow bundled INSTALL.md, then run bash scripts/verify.sh inside the skill folder.

  • Transformers.js
  • Hugging Face
  • Browser ML
  • WebGPU
  • ONNX Runtime

4-Platform Quick Install

  1. 1 Download the 8-file ZIP above (1st skill free after signing in with Google or GitHub) and unzip into .agents/skills/ (Antigravity / Codex) or .claude/skills/ (Claude Code) so SKILL.md lands at .agents/skills/transformers-js/SKILL.md without double-nesting, or follow INSTALL.md for Cursor.
  2. 2 Run bash scripts/verify.sh from inside that skill folder to confirm every packaged file is intact.
  3. 3 Import a pipeline: `import { pipeline } from '@huggingface/transformers'`

Example Command

import { pipeline } from '@huggingface/transformers'

Core Capabilities

Browser & Node.js Runtime

Runs in Node.js 18+ or modern browsers with ES modules — no Python, no server roundtrip for inference.

WebGPU Acceleration

Uses ONNX Runtime Web with WebGPU when available, falling back to WASM for universal compatibility.

100+ Hugging Face Models

Direct access to text, vision, audio, and multi-modal models from the Hugging Face Hub via pipeline API.

Client-Side Privacy

Inference happens on the user's device — prompts and data never leave the browser.

Usage Examples

Before

Python inference service with 400ms round-trip latency per sentiment call.

After

In-browser Transformers.js pipeline returning results in <50ms with no server cost.

Before

Server-based audio transcription requiring network round-trip.

After

Client-side audio processing with Transformers.js returning transcript in <100ms.

About This Skill

Transformers.js enables running 100+ Hugging Face models directly in JavaScript — in Node.js 18+ or modern browsers with WebGPU — using 3 core pipelines (text, vision, audio) without any Python runtime. The 8-file ZIP includes SKILL.md, 5 modular reference files, INSTALL.md, and scripts/verify.sh; licensed under Apache-2.0. Best for JavaScript developers building in-browser ML features; skip this skill if you need server-side Python inference or large-scale training workflows. Works in Antigravity, Claude Code, Codex, and Cursor IDEs.

Release v2.0.0 · Updated Dec 3, 2026 · 30 KB · sha256:f6c1f69f126c

  • v2.0.0 (2026-12-03): Modularized the 644-line SKILL.md into a 32-line router + 5 verbatim references/*.md modules (zero sections dropped), plus added 4-platform INSTALL.md and read-only scripts/verify.sh (8 files total, 8-point safety checked).

SKILL.md

---
source: "https://github.com/huggingface/skills/tree/main/skills/transformers-js"
name: transformers-js
description: Run Hugging Face models in JavaScript or TypeScript with Transformers.js in Node.js or the browser.
license: Apache-2.0
risk: unknown
metadata:
  author: huggingface
  version: "3.8.1"
  category: machine-learning
  repository: https://github.com/huggingface/transformers.js
compatibility: Requires Node.js 18+ or modern browser with ES modules support. WebGPU support requires compatible browser/environment. Internet access needed for downloading models from Hugging Face Hub (optional if using local models).
---

# Transformers.js - Machine Learning for JavaScript

Transformers.js enables running state-of-the-art machine learning models directly in JavaScript, both in browsers and Node.js environments, with no server required.

## Core Workflow & Reference Routing

Load only the matching verbatim reference module(s) below for the user's specific task:

- [`references/when-to-use-this-skill.md`](./references/when-to-use-this-skill.md) — Read when working on: When to Use This Skill, Installation, NPM Installation, Browser Usage (CDN), Core Concepts, 1. Pipeline API, 2. Model Selection, 3. Device Selection (+1 more sections) (verbatim `L19-L106`, 88 lines).
…

Showing the router preview only — download the full 8-file ZIP above to unpack all 5 deep reference modules, INSTALL.md, and scripts/verify.sh (1st skill free after sign-in).

  • INSTALL.md (1.8 KB)
  • SKILL.md (2.6 KB)
  • references/advanced-configuration.md (5.2 KB)
  • references/finding-and-choosing-models.md (4.6 KB)
  • references/memory-management.md (4.8 KB)
  • references/supported-tasks.md (4.5 KB)
  • references/when-to-use-this-skill.md (2.9 KB)
  • scripts/verify.sh (2.4 KB)

Frequently Asked Questions

How do I install Transformers.js across IDEs?
Unzip the 8-file package into .agents/skills/ (Antigravity / Codex) or .claude/skills/ (Claude Code) so SKILL.md lands at .agents/skills/transformers-js/SKILL.md without double-nesting. Follow INSTALL.md for Cursor, then run bash scripts/verify.sh to validate integrity.
What files and modules are included in the 8-file ZIP?
The ZIP contains SKILL.md, 5 modular reference files, INSTALL.md, and scripts/verify.sh. Reference modules cover when to use this skill, supported tasks, finding models, advanced configuration, and memory management. Licensed under Apache-2.0.
When should I use this skill—and when should I skip it?
Use this skill for in-browser or Node.js ML inference without Python dependencies or server roundtrips. Skip if you require server-side Python workflows, large-scale training, or complex distributed computing setups.
What is the core architecture of Transformers.js?
Transformers.js leverages ONNX Runtime Web for execution, supporting WebGPU acceleration when available, with fallback to WASM for broader compatibility across environments.
Is it safe to install, and how does pricing work?
Yes, the 8-point static safety check confirms secure installation. The first skill is free after signing in with Google or GitHub. Paid tiers include Starter $4.90 for 10 never-expiring credits, Pro $15/mo or $89/yr.

More for the same job

AI agent skills · All skills · New here? Start with three

Related skills: Agent Memory Systems · Computer Use Agents · Data Analyst · Agent Tool Builder

Discussion

0 comments

Transformers.jsFirst download free

Recently updated