wasm-emscripten

wasm-emscripten is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 117 tokens per session (1,897 once invoked), scanned A, original, MIT.

A guide to compiling C and C++ programs into WebAssembly with Emscripten. WebAssembly is a compact format that lets code run in a browser or other supported environment.

In plain words
What is it for?
Use it to build C or C++ for the web, export functions, configure WebAssembly memory, support asynchronous code, and debug the resulting files.
Why use it?
It helps developers choose the right compilation settings, expose native functions to JavaScript, and understand browser and non-browser targets.

Skill for Claude CodeCodex

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

not rated 196repo +4 2mo ago A scan Socket: passSnyk: passSkillSpector: pass 117 tokens original MIT

Good fit Use it to build C or C++ for the web, export functions, configure WebAssembly memory, support asynchronous code, and debug the resulting files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/wasm-emscripten
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 mohitmishra786/low-level-dev-skills --skill wasm-emscripten
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

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 wasm-emscripten

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/wasm-emscripten.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/wasm-emscripten)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/wasm-emscripten"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/wasm-emscripten.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 4 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00117 $0.01897
Opus 5 $0.00059 $0.00949
Sonnet 5 $0.00023 $0.00379
Haiku 4.5 $0.00012 $0.00190

Measured 4d ago against content hash 5bb5ec987bf9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

wasm-emscripten scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const resp = await fetch(UTF8ToString(url));
skills/runtimes/wasm-emscripten/SKILL.md · 228 lines

How it starts

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

WebAssembly with Emscripten

Purpose

Guide agents through compiling C/C++ to WebAssembly using Emscripten: emcc flag selection, function exports, memory model configuration, Asyncify for asynchronous C code, debugging WASM binaries, and targeting WASI vs browser.

Triggers

  • "How do I compile C to WebAssembly with Emscripten?"
  • "How do I export a C function to JavaScript?"
  • "How does WebAssembly memory work with Emscripten?"
  • "How do I debug a .wasm file?"
  • "How do I use Asyncify to make synchronous C code async?"
  • "What's the difference between WASI and Emscripten browser target?"

Workflow

1. Setup and first build

# Install Emscripten SDK
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh    # add emcc to PATH

# Verify
emcc --version

# Compile C to WASM (browser target)
emcc hello.c -o hello.html          # generates hello.html + hello.js + hello.wasm
emcc hello.c -o hello.js            # just JS + WASM (no HTML shell)

# Serve locally (WASM requires HTTP, not file://)
python3 -m http.server 8080
# Open: http://localhost:8080/hello.html

2. Exporting functions to JavaScript

// math.c
#include <emscripten.h>

// EMSCRIPTEN_KEEPALIVE prevents dead-code elimination
EMSCRIPTEN_KEEPALIVE
int add(int a, int b) {
    return a + b;
}

EMSCRIPTEN_KEEPALIVE
double sqrt_approx(double x) {
    return x * 0.5 + 1.0;
}
# Export specific functions
emcc math.c -o math.js \
  -s EXPORTED_FUNCTIONS='["_add","_sqrt_approx"]' \
  -s EXPORTED_RUNTIME_METHODS='["ccall","cwrap"]' \
  -s MODULARIZE=1 \
  -s EXPORT_NAME=MathModule

# The leading underscore is required for C functions
// Using exported functions in JS
const Module = await MathModule();

// Direct call
const result = Module._add(3, 4);

// Via ccall (type-safe)
const result2 = Module.ccall('add', 'number', ['number', 'number'], [3, 4]);

// Via cwrap (creates a callable JS function)
const add = Module.cwrap('add', 'number', ['number', 'number']);
console.log(add(3, 4));  // 7

Read the full file on GitHub · 228 lines

Files

What ships with it

1 file 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. 4d ago First seen · 228 lines · 117 tokens per session scan A 5bb5ec987bf9

Subscribe to this mod's changes

wasm-emscripten is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (196 stars, last pushed 2mo ago), licensed MIT. It adds 117 tokens to every session and 1,897 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

cpp-on-the-web

Compiling C and C++ for the modern web using WebAssembly. Use this skill when you need to port C++ code, build C++ libraries with Emscripten, or set up high-performance C++ components in the browser.

GoogleChrome/modern-web-guidance-src · 53 tokens

webassembly-expert

Create production-ready WebAssembly modules for web and server environments with optimal performance and seamless JavaScript integration. Use when the user mentions WebAssembly or Wasm, WASI, compiling Rust/C/C++ to the browser, Emscripten, wasmtime, or JavaScript-to-Wasm interop for performance-critical code.

personamanagmentlayer/pcl · 69 tokens

coding-guidance-qt

Qt C++ implementation and review guidance for QObject, QWidget/model-view, signals and slots, thread affinity, .ui forms, and Qt build tooling; use coding-guidance-cpp for non-Qt C++ design. Portable across Qt5/Qt6 repositories with a QWidget desktop focus.

n-n-code/n-n-code-skills · 67 tokens

header-only-c-cpp-ingestion

How autonomous agents inspect .h/.hpp header files first to understand class contracts and struct layouts before reading heavy .cpp implementation files, slashing C++ context token spend by 85%.

alivirgo/Major-AI-Skills · 45 tokens

templating

Okapi renders HTML through a Renderer. The built-in Template type wraps html/template and loads from a directory, a glob pattern, an embedded FS, or a config struct.

jkaninda/okapi-skills · 0 tokens

drogon-gen-csp-view

A code generator for Drogon, a C++ web framework, that creates HTML view templates in its CSP format and the controller code needed to render them.

voidvec/drogon-claude-plugin · 53 tokens