Transformers.js
huggingface/skills
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.
Run Hugging Face models in JavaScript or TypeScript with Transformers.js, WebGPU, or WASM across browser, Node.js, Bun, and Deno.
$ npx skills add waybarrios/opencode-power-pack --skill transformers-js -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install waybarrios/opencode-power-pack 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/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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/waybarrios/opencode-power-pack/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 waybarrios/opencode-power-pack --skill transformers-js -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install waybarrios/opencode-power-pack transformers-js --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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 waybarrios/opencode-power-pack --skill transformers-js -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install waybarrios/opencode-power-pack transformers-js --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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/waybarrios/opencode-power-pack.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 waybarrios/opencode-power-pack --skill transformers-js -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install waybarrios/opencode-power-pack transformers-js --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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 waybarrios/opencode-power-pack 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 waybarrios/opencode-power-pack --skill transformers-js -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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 waybarrios/opencode-power-pack --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 waybarrios/opencode-power-pack transformers-js --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waybarrios/opencode-power-pack.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/waybarrios/opencode-power-pack/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-jsRun Hugging Face models in JavaScript or TypeScript with Transformers.js, WebGPU, or WASM across browser, Node.js, Bun, and Deno.
Transformers JS is an agent skill from 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. Use for client-side or JS-runtime inference, not Python training.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/CACHE.md`, `references/CONFIGURATION.md` and `references/EXAMPLES.md`).
It sits in AI & LLM Engineering, covering Model hubs and datasets. It works with Transformers, JavaScript, WebAssembly and Node.js. The repository describes itself as: 54 rigorous skills for Codex, OpenCode, and Pi: code review, security audit, feature development, frontend design, MCP tools, Hugging Face ML/training, and more. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 9dccb6d. 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.
Transformers JS loads about 1.9k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 53 tokens; SKILL.md has 547 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 waybarrios/opencode-power-pack at commit 9dccb6d, republished under its Apache-2.0 licence (© waybarrios). 547 words, ~1,905 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.Runs state-of-the-art ML models directly in JavaScript, in browsers and server-side runtimes (Node.js, Bun, Deno), with no Python server required.
npm install @huggingface/transformers// Browser (CDN)
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers';Pipeline API — groups preprocessing, inference, and postprocessing. Always dispose() when done to free memory (see references/EXAMPLES.md for cleanup patterns):
import { pipeline } from '@huggingface/transformers';
const pipe = await pipeline('sentiment-analysis');
const result = await pipe('I love transformers!');
await pipe.dispose();Model selection — pass a model ID as the second argument, e.g. pipeline('sentiment-analysis', 'Xenova/bert-base-multilingual-uncased-sentiment'). Browse compatible models at https://huggingface.co/models?library=transformers.js&sort=trending, filtered by pipeline_tag for a specific task.
Device: { device: 'webgpu' } for GPU acceleration (falls back to WASM/CPU when unsupported); omit for CPU/WASM default.
Quantization: { dtype: 'q4' } — options fp32 (largest/most accurate), fp16, q8, q4 (smallest, some accuracy loss).
One pipeline call per task, e.g. await pipeline('image-classification')('https://example.com/image.jpg'). Task IDs by category:
text-classification/sentiment-analysis, token-classification/ner, question-answering, fill-mask, summarization, translation, text-generation, text2text-generation, zero-shot-classificationimage-classification, object-detection, image-segmentation, depth-estimation, zero-shot-image-classification, image-to-imageautomatic-speech-recognition, audio-classification, text-to-speech/text-to-audioimage-to-text, document-question-answering, zero-shot-object-detectionfeature-extraction (add { pooling: 'mean', normalize: true } for sentence embeddings), sentence-similarityFor streaming/chat text generation (system/user/assistant roles, TextStreamer, generation params), see references/TEXT_GENERATION.md.
Filter the Hub by library=transformers.js and pipeline_tag=<task>, sort by trending/downloads/likes/modified. Consider: size (<100MB fast/browser-friendly, 100-500MB balanced, >500MB high-accuracy/Node.js), quantization (fp32/fp16/q8/q4 trade accuracy for size/speed), task compatibility (check the model card for supported tasks, I/O format, language, license), and performance metrics on the model card. Start with a smaller model, verify it has ONNX files, and pin a specific revision in production for stability.
Environment (env) controls caching and model loading globally:
import { env, LogLevel } from '@huggingface/transformers';
env.allowRemoteModels = true; // load from Hugging Face Hub
env.allowLocalModels = false; // load from file system
env.localModelPath = '/models/';
env.useFSCache = true; // Node.js disk cache
env.useBrowserCache = true;
env.cacheDir = './.cache';
env.logLevel = LogLevel.INFO; // default WARNING
env.fetch = (url, options) => fetch(url, { ...options, headers: { ...options?.headers, Authorization: `Bearer ${HF_TOKEN}` } });Typical patterns: development uses remote models + FS cache; production uses local-only models from a fixed path; testing disables both caches. Full option/caching reference: references/CONFIGURATION.md.
ModelRegistry (v4) inspects model assets before loading — required files, cache status, available dtypes:
import { ModelRegistry } from '@huggingface/transformers';
const files = await ModelRegistry.get_pipeline_files(task, modelId, modelOptions);
const cached = await ModelRegistry.is_pipeline_cached(task, modelId, modelOptions);
const dtypes = await ModelRegistry.get_available_dtypes(modelId);See references/MODEL_REGISTRY.md for full API coverage.
Standalone tokenization: npm install @huggingface/tokenizers for fast tokenization without loading a full inference pipeline.
Manual tokenizer + model for finer control:
import { AutoTokenizer, AutoModel } from '@huggingface/transformers';
const tokenizer = await AutoTokenizer.from_pretrained('bert-base-uncased');
const model = await AutoModel.from_pretrained('bert-base-uncased');
const outputs = await model(await tokenizer('Hello world!'));Batch processing: pass an array of inputs to any pipeline, e.g. classifier(['I love this!', 'This is terrible.']).
WebGPU accelerates browsers and supporting server runtimes — use it when available, fall back to WASM/CPU otherwise. WASM is the most portable backend; combine with q8/q4 quantization for smaller, faster models.
Progress tracking for large multi-file downloads — pass progress_callback to pipeline(); the callback receives {status: 'initiate'|'download'|'progress'|'progress_total'|'done'|'ready', name, file?, progress?, loaded?, total?}. Full patterns (browser UI, React, CLI, retries) in references/PIPELINE_OPTIONS.md#progress-callback.
try {
const pipe = await pipeline('sentiment-analysis', 'model-id');
const result = await pipe('text to analyze');
} catch (error) {
// error.message mentions 'fetch' -> download/network issue
// error.message mentions 'ONNX' -> model execution/compatibility issue
}Always call pipe.dispose() when finished (app shutdown, component unmount, before loading a different model, after batch processing) — models hold 100MB-several GB of memory/GPU resources. See references/CACHE.md and references/EXAMPLES.md for cache and cleanup patterns across runtimes.
onnx folder in the repo).dtype: 'q4'), reduce batch size, limit max_length.fp16 if fp32 fails, or fall back to WASM.Always dispose pipelines; prefer the pipeline API unless fine-grained control is needed; test with small inputs first; watch download sizes for web apps; show progress indicators; pin model versions in production; wrap pipeline calls in try/catch; provide fallbacks for unsupported browsers/backends; reuse loaded pipelines rather than recreating them; dispose models on SIGTERM/SIGINT in servers.
This skill: references/PIPELINE_OPTIONS.md, CONFIGURATION.md, MODEL_REGISTRY.md, CACHE.md, TEXT_GENERATION.md, MODEL_ARCHITECTURES.md, EXAMPLES.md.
Official: docs, API reference, model hub, GitHub, examples.
© waybarrios, 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 waybarrios/opencode-power-pack.
Open the folder on GitHubat commit 9dccb6d
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 skillwaybarrios/opencode-power-pack | 533 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Transformers.jshuggingface/skills | 11k | 1 repos | ~6.2k | Automated safety check: Pass | Apache-2.0 | |
| Hugging Face Vision Trainerhuggingface/skills | 11k | 1 repos | ~7.5k | Automated safety check: Pass | Apache-2.0 | |
| Hugging Face Transformers Usagedavila7/claude-code-templates | 32k | 11 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Huggingface Spaceshuggingface/skills | 11k | 1 repos | ~4.4k | Automated safety check: Pass | Apache-2.0 | |
| Transformers JSsickn33/agentic-awesome-skills | 47k | 1 repos | ~444 | Automated safety check: Pass | Apache-2.0 |
huggingface/skills
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.
huggingface/skills
Trains and fine-tunes object detection, image classification and SAM or SAM2 segmentation models on Hugging Face Jobs cloud GPUs and saves the results to the Hub.
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.
huggingface/skills
Build, deploy, and maintain applications on Hugging Face Spaces — Gradio / Docker / Static SDKs, ZeroGPU and dedicated hardware, model loading, debugging, buckets, inference providers, community…
sickn33/agentic-awesome-skills
Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript.
fengshao1227/ccg-workflow
Scans code with a bundled Node script for injection, secrets, XSS and other risky patterns, ranks findings by severity and checks that security decisions are documented.
waybarrios/opencode-power-pack
Verify or select a SageMaker execution role before creating models, endpoints, or training jobs.
waybarrios/opencode-power-pack
Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion.
waybarrios/opencode-power-pack
Train object-detection, image-classification, or SAM segmentation models on Hugging Face Jobs.
waybarrios/opencode-power-pack
Run CodeQL database creation and security queries, add data-extension models, or process CodeQL SARIF.
waybarrios/opencode-power-pack
Run Semgrep static analysis across a codebase, optionally using Semgrep Pro for cross-file taint analysis.
waybarrios/opencode-power-pack
Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecurely in production.
Categories
Run Hugging Face models in JavaScript or TypeScript with Transformers.js, WebGPU, or WASM across browser, Node.js, Bun, and Deno. Transformers JS is an agent skill from waybarrios/opencode-power-pack.js, Bun, and Deno.
Transformers JS fits situations like: JS-runtime inference; not Python training.
Run `npx skills add waybarrios/opencode-power-pack --skill transformers-js -a claude-code`. Or copy the skill folder (skills/transformers-js in waybarrios/opencode-power-pack) into .claude/skills/transformers-js in your project. Claude Code loads it when a task matches its description.
Run `npx skills add waybarrios/opencode-power-pack --skill transformers-js -a codex`. Or copy the skill folder (skills/transformers-js in waybarrios/opencode-power-pack) 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 waybarrios/opencode-power-pack --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: Python 3; Node.js.
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 1.9k tokens (SKILL.md is roughly 7.6k 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: Transformers.js (huggingface/skills, 11k stars), Hugging Face Vision Trainer (huggingface/skills, 11k stars), Hugging Face Transformers Usage (davila7/claude-code-templates, 32k stars) and Huggingface Spaces (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
waybarrios (a GitHub user) maintains it in waybarrios/opencode-power-pack, which has 533 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 6, 2026.
Source: waybarrios/opencode-power-pack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.