local-slm-edge-ai-expert

local-slm-edge-ai-expert is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 61 tokens per session (1,785 once invoked), scanned A, original, MIT.

A guide to running small language and embedding models inside web browsers or edge runtimes. It covers browser GPU execution, local text embeddings, and falling back to a server when the device cannot run a model.

In plain words
What is it for?
Use it when designing browser-based AI features, local embeddings, privacy-focused processing, or hybrid browser-and-server model execution.
Why use it?
Running models locally can keep data on the user's device and support offline or low-latency features. It also addresses how to handle devices with limited hardware support.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing browser-based AI features, local embeddings, privacy-focused processing, or hybrid browser-and-server model execution.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert
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 roedyrustam/vibes-plug --skill local-slm-edge-ai-expert
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, 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 local-slm-edge-ai-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-slm-edge-ai-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/local-slm-edge-ai-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,785 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 original No closer match found 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.00061 $0.01785
Opus 5 $0.00030 $0.00892
Sonnet 5 $0.00012 $0.00357
Haiku 4.5 $0.00006 $0.00178

Measured today against content hash 738308dea30c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

local-slm-edge-ai-expert 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 today.

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.

skills/local-slm-edge-ai-expert/SKILL.md · 168 lines

How it starts

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

Local SLM & Edge AI Expert (WebGPU & In-Browser Intelligence)

English | Bahasa Indonesia


English

Purpose & Overview

Production-grade architectural guide for running Small Language Models (SLMs) and embedding models directly inside client browsers and edge runtimes. Eliminates cloud API costs, guarantees 100% data privacy (zero cloud data leakage), and enables instant, offline-capable AI features using WebGPU, Transformers.js v3, WebLLM, and ONNX Runtime Web.

Key Capabilities

  1. Client-Side Model Execution: Running quantized 1B–4B SLMs (Llama 3.2 1B/3B, Gemma 2 2B, Phi-3.5 Mini, Qwen 2.5 1.5B/3B) entirely inside the user's browser via WebGPU.
  2. In-Browser Embeddings: Fast client-side vector embeddings with models like all-MiniLM-L6-v2 or bge-small-en-v1.5 using Transformers.js v3.
  3. Hybrid Edge-Cloud Fallback: Gracefully falling back to server-side LLMs when client hardware lacks WebGPU or sufficient VRAM.
  4. Zero-Latency PII Masking: Anonymizing sensitive user data locally on the client before sending queries to external LLMs.

Production Implementation Recipes

Recipe 1: In-Browser Semantic Embedding Generation with Transformers.js v3
import { pipeline, env } from '@huggingface/transformers';

// Configure cache and worker settings
env.allowLocalModels = false;
env.useBrowserCache = true;

let embedder: any = null;

export async function getLocalEmbedding(text: string): Promise<number[]> {
  if (!embedder) {
    embedder = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2', {
      dtype: 'fp32',
      device: 'webgpu', // Accelerate via WebGPU if supported
    });
  }

  const output = await embedder(text, { pooling: 'mean', normalize: true });
  return Array.from(output.data);
}
Recipe 2: WebLLM In-Browser Chat Assistant with WebGPU
import * as webllm from '@mlc-ai/web-llm';

export async function createLocalChatEngine(onProgress?: (report: webllm.InitProgressReport) => void) {
  // Check WebGPU compatibility
  if (!('gpu' in navigator)) {
    throw new Error('WebGPU is not supported in this browser. Fallback to cloud API.');
  }

  const selectedModel = 'Llama-3.2-1B-Instruct-q4f32_1-MLC';

  const engine = await webllm.CreateMLCEngine(selectedModel, {
    initProgressCallback: onProgress,
  });

  return {
    generateResponse: async (prompt: string): Promise<string> => {
      const reply = await engine.chat.completions.create({
        messages: [{ role: 'user', content: prompt }],
        temperature: 0.2,
      });
      return reply.choices[0]?.message.content || '';
    },
  };
}

Read the full file on GitHub · 168 lines

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. today First seen · 168 lines · 61 tokens per session scan A 738308dea30c

Subscribe to this mod's changes

local-slm-edge-ai-expert is a skill published in the GitHub repository roedyrustam/vibes-plug (53 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 1,785 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

Other skills, from other repositories

browser-testing-with-devtools

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…

addyosmani/agent-skills · 68 tokens

iflytek-image-understanding

An image-analysis tool that describes pictures and answers questions about what they contain. It uses an AI vision service, which interprets visual content rather than only reading text files.

iflytek/iFly-Skills · 61 tokens

playwright-skill

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions…

tech-leads-club/agent-skills · 95 tokens

chrome-devtools

Browser debugging, performance profiling, and automation via Chrome DevTools MCP. Use when user says "debug this page", "take a screenshot", "check network requests", "profile performance", "inspect console errors", or "analyze page load". Do NOT use for full E2E test suites (use playwright-skill) or non-browser…

tech-leads-club/agent-skills · 74 tokens

gemini-cli

Generates images and text via reverse-engineered Gemini Web API. Suitable for AI Pro and higher tier subscription users. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests…

hankunpeng/skills · 80 tokens

prompt-engineer

Expert prompt engineering for AI systems. Use when the user wants to write or review prompts for AI, create instructions for AI systems, build system prompts, review or improve existing prompts, optimize AI instructions, or create any form of written communication intended for AI consumption (Claude, GPT, or other…

SZoloth/skill-pack · 66 tokens