transformers-js

transformers-js is a skill for Codex from fanfan-de/anybox. It costs 80 tokens per session (5,235 once invoked), scanned A, a copy of transformers-js, MIT.

A JavaScript and TypeScript library for running machine-learning models in browsers or Node.js. It supports text, image, audio, and combined text-and-media tasks without requiring a separate model server.

In plain words
What is it for?
Use it for text classification, translation, summarization, image recognition, object detection, speech recognition, audio processing, and other supported model-based features.
Why use it?
It lets an application run model inference directly where the JavaScript code runs, which can avoid building a backend for supported tasks.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it for text classification, translation, summarization, image recognition, object detection, speech…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fanfan-de/anybox/transformers.js
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fanfan-de/anybox --skill transformers.js
Clone the repo
git clone --depth 1 https://github.com/fanfan-de/anybox

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for transformers-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/fanfan-de/anybox/transformers.js.svg)](https://agentmods.dev/skills/fanfan-de/anybox/transformers.js)
Your own site
<a href="https://agentmods.dev/skills/fanfan-de/anybox/transformers.js"><img src="https://agentmods.dev/badge/skills/fanfan-de/anybox/transformers.js.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.05235
Opus 5 $0.00040 $0.02618
Sonnet 5 $0.00016 $0.01047
Haiku 4.5 $0.00008 $0.00524

Measured 3d ago against content hash 89a70a8a0604, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

transformers-js scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to transformers-js — 91 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/Anybox-Plugins/hugging-face/skills/transformers.js/SKILL.md · 636 lines

How it starts

The opening of the file, as written. The whole thing — 636 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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

Installation

NPM Installation

npm install @huggingface/transformers

Browser Usage (CDN)

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

Core Concepts

1. Pipeline API

The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:

import { pipeline } from '@huggingface/transformers';

// Create a pipeline for a specific task
const pipe = await pipeline('sentiment-analysis');

// Use the pipeline
const result = await pipe('I love transformers!');
// Output: [{ label: 'POSITIVE', score: 0.999817686 }]

// IMPORTANT: Always dispose when done to free memory
await classifier.dispose();

⚠️ Memory Management: All pipelines must be disposed with pipe.dispose() when finished to prevent memory leaks. See examples in Code Examples for cleanup patterns across different environments.

2. Model Selection

You can specify a custom model as the second argument:

const pipe = await pipeline(
  'sentiment-analysis',
  'Xenova/bert-base-multilingual-uncased-sentiment'
);

Finding Models:

Browse available Transformers.js models on Hugging Face Hub:

Read the full file on GitHub · 636 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 636 lines · 80 tokens per session scan A 89a70a8a0604

Subscribe to this mod's changes

transformers-js is a skill published in the GitHub repository fanfan-de/anybox (57 stars, last pushed 24d ago), licensed MIT. It adds 80 tokens to every session and 5,235 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to transformers-js, differing in 91 lines, and is treated as a copy.

Related

Other skills, from other repositories

ax-signature

This skill helps an LLM generate correct DSPy signature code using @ax-llm/ax. Use when the user asks about signatures, s(), f(), field types, string syntax, fluent builder API, validation constraints, or type-safe inputs/outputs.

ax-llm/ax · 57 tokens

model-context

MCP (Model Context Protocol) - Build AI-native servers with tools, resources, and prompts. TypeScript/Python SDKs for Claude Desktop integration.

bobmatnyc/claude-mpm-skills · 34 tokens

ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI…

pleaseai/claude-code-plugins · 155 tokens

build-mcp-server

MCP (Model Context Protocol) - Build AI-native servers with tools, resources, and prompts. TypeScript/Python SDKs for Claude Desktop integration.

bobmatnyc/claude-mpm · 36 tokens

developing-genkit-js

Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.

genkit-ai/skills · 60 tokens

update-llm-models

Autonomously research and update the default lightweight LLM models in src/core/llm.ts using web search to ensure the most current versions are used.

yu-iskw/skill-inspector · 40 tokens