Transformers.js

SkillWeb & browsing

Lets your agent build and test machine learning models that run locally in the browser using Transformers.js.

Use Transformers.js in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Transformers.js and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Transformers.js skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Transformers.jsStart free
About this skill

Build and validate local browser or Bun inference with Hugging Face Transformers.js, WebGPU or WASM backends, quantization, caching, and cleanup.

What this skill tells your AI

The instructions your AI receives, as published by metaspartan/cybara in plugins/huggingface-workflows/skills/transformers-js/SKILL.md and read by Ahel’s review.

Use @huggingface/transformers for JavaScript or TypeScript inference in Bun, Node-compatible runtimes, and browsers.

Setup

bun add @huggingface/transformers
import { pipeline } from "@huggingface/transformers";

const classifier = await pipeline("text-classification");
try {
  const result = await classifier("Cybara runs this model locally.");
  console.log(result);
} finally {
  await classifier.dispose();
}

Workflow

  1. Choose a model whose card lists Transformers.js or ONNX compatibility for the required task.
  2. Pin the model ID and revision when reproducibility matters.
  3. Start with CPU/WASM compatibility, then enable WebGPU only after feature detection.
  4. Select dtype or quantization from measured memory, latency, and quality requirements.
  5. Configure the cache explicitly for desktop or server runtimes.
  6. Warm the model before benchmarking and separate download time from inference latency.
  7. Dispose pipelines and tensors when the workflow ends.
  8. Test unavailable WebGPU, interrupted downloads, offline cache reuse, and malformed inputs.

Do not load untrusted custom model code. For browser applications, keep model downloads visible to the user and avoid blocking the main thread during initialization or long inference.

Signals

GitHub stars
31
Forks
9
Last commit
Oct 2026
Advanced
Item type
skill
Key
transformers-js
Source
github.com/metaspartan/cybara