Skip to content
Skill

transformers-js

by huggingface

AI Summary

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. Use this skill when you need to: The pipeline API is the easiest way to use models. It groups together preprocessing, model inference,

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "transformers-js" skill in my project.

Please run this command in my terminal:
# Install skill into your project (8 files)
mkdir -p .claude/skills/transformers-js && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/SKILL.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/SKILL.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/CACHE.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/CACHE.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/CONFIGURATION.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/CONFIGURATION.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/EXAMPLES.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/EXAMPLES.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/MODEL_ARCHITECTURES.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/MODEL_ARCHITECTURES.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/MODEL_REGISTRY.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/MODEL_REGISTRY.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/PIPELINE_OPTIONS.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/PIPELINE_OPTIONS.md" && mkdir -p .claude/skills/transformers-js/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/transformers-js/references/TEXT_GENERATION.md "https://raw.githubusercontent.com/huggingface/skills/main/skills/transformers-js/references/TEXT_GENERATION.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

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.

Browser Usage (CDN)

`javascript <script type="module"> import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers'; </script> `

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

NPM Installation

`bash npm install @huggingface/transformers `

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
Adoption1K+ stars on GitHub
10.3k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars10.3k
Forks643
Issues27
Updated1mo ago
View on GitHub
Apache-2.0 License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code