transformers-js
Build and validate local browser or Bun inference with Hugging Face Transformers.js, WebGPU or WASM backends, quantization, caching, and cleanup.
от metaspartan★ 41 звезда на GitHub
Установить transformers-js в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Transformers.js
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
- Choose a model whose card lists Transformers.js or ONNX compatibility for the required task.
- Pin the model ID and revision when reproducibility matters.
- Start with CPU/WASM compatibility, then enable WebGPU only after feature detection.
- Select dtype or quantization from measured memory, latency, and quality requirements.
- Configure the cache explicitly for desktop or server runtimes.
- Warm the model before benchmarking and separate download time from inference latency.
- Dispose pipelines and tensors when the workflow ends.
- 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.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл transformers-js?
Build and validate local browser or Bun inference with Hugging Face Transformers.js, WebGPU or WASM backends, quantization, caching, and cleanup.
Как установить скилл transformers-js?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл transformers-js запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…