transformers-js – skill Lập trình cho agent AI
Dùng Transformers.js để chạy trực tiếp các mô hình machine learning hiện đại trong JavaScript/TypeScript.
Cài skill transformers-js bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/transformers-js-665ce.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /transformers-js – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/transformers-js-665ce.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $transformers-js – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/transformers-js-665ce.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /transformers-js – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/transformers-js-665ce.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /transformers-js – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
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
Limitations
- Use this skill only when the task clearly matches its upstream product or API scope.
- Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
- Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Runtime and model boundaries
The references mix stable APIs with v4/main-only examples (including ModelRegistry and env.fetch). Pin a tested library version and check its matching documentation; the unversioned main docs may require a source build. Model repositories need compatible ONNX exports, tokenizer/config files and supported backend operators; an onnx/ folder alone does not prove compatibility. Respect each model's license and gated-access terms. Keep tokens server-side. Offline operation also requires local runtime/WASM assets; cache presence alone is insufficient.
Examples are illustrative and were not executed against downloaded models in this review. Larger models and lower precision do not guarantee better quality or faster inference. Browser unload handlers cannot guarantee asynchronous disposal; await explicit cleanup while the application is active. React examples require cancellation/unmount handling for pending loads and inference. Server deployments need authentication, input/rate limits, readiness checks and bounded shutdown before exposure.
Modified for catalog review on 2026-10-23; upstream attribution and Apache-2.0 metadata retained.
Skill liên quan
- trigger-dev – Chuyên gia Trigger.dev cho background job, workflow AI và thực thi bất đồng bộ đáng tin…
- trip-coupon – Gọi API phiếu giảm giá du lịch để lấy phiếu, gồm gói quà đi xe DiDi và gói phiếu khách…
- trpc-fullstack – Xây dựng API type-safe đầu cuối với tRPC: router, procedure, middleware, subscription và…
- twilio-communications – Xây dựng tính năng giao tiếp với Twilio: nhắn tin SMS, cuộc gọi thoại, WhatsApp Business…
- typescript – Bộ quy tắc viết code theo ngôn ngữ cho TypeScript.
- typescript-advanced-types – Hướng dẫn chuyên sâu về hệ thống kiểu nâng cao của TypeScript, gồm generic, kiểu có điều…
- typescript-expert – Chuyên gia TypeScript và JavaScript, am hiểu sâu về lập trình ở cấp độ kiểu…
- typescript-pro – Làm chủ TypeScript với kiểu nâng cao, generics và an toàn kiểu nghiêm ngặt. Xử lý hệ…