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.
npx skills add swiftwasm/Swift-Wasm-Agent-Skill --skill bridge-jsgit clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-SkillWrote 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.
[](https://agentmods.dev/skills/swiftwasm/swift-wasm-agent-skill/bridge-js)<a href="https://agentmods.dev/skills/swiftwasm/swift-wasm-agent-skill/bridge-js"><img src="https://agentmods.dev/badge/skills/swiftwasm/swift-wasm-agent-skill/bridge-js/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.
<a href="https://agentmods.dev/skills/swiftwasm/swift-wasm-agent-skill/bridge-js"><img src="https://agentmods.dev/badge/skills/swiftwasm/swift-wasm-agent-skill/bridge-js.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00082 | $0.00892 |
| Opus 5.5 | $0.00033 | $0.00357 |
| Sonnet 5.5 | $0.00016 | $0.00178 |
| Haiku 4.5 | $0.00008 | $0.00089 |
Grade A, and why
bridge-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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BridgeJS
BridgeJS is a code-generation layer in JavaScriptKit that makes Swift–JavaScript interop faster and easier than raw JSObject/JSValue: you declare the API shape in Swift (or TypeScript), and the tool generates glue code. Two directions: export Swift to JavaScript and import JavaScript into Swift.
Referencing official docs
When you need details, read DocC from the checked-out JavaScriptKit repository: Sources/JavaScriptKit/Documentation.docc/ when inside the JavaScriptKit repo, or .build/checkouts/JavaScriptKit/Sources/JavaScriptKit/Documentation.docc/ when in a project that depends on JavaScriptKit.
Two directions
- Export Swift: Use
@JS(and@JS(namespace:enumStyle:identityMode:)) on functions, classes, structs, enums, closures, protocols, etc. JavaScript then calls into your Swift code. See references/exporting.md. - Import JavaScript: (1) Declare bindings in Swift with
@JSFunction,@JSClass,@JSGetter,@JSSetter; use@JSGetter(from: .global)for globals likedocument/console; inject other implementations viagetImports(). See references/importing.md. (2) Or usebridge-js.d.tsto generate the same Swift bindings. See references/importing-ts.md.
Key concepts
- Type mapping: Primitives,
Optional↔null,JSUndefinedOr↔undefined, arrays,Record<string, V>↔[String: V],JSTypedArray<T>↔ TypedArray (by reference), unbridged →JSObject/JSValue. See references/types.md if present. - Semantics: classes, protocols,
JSTypedArray, and closures cross by reference; structs, enums, and plain arrays cross by copy. - Errors: Only
throws(JSException)is supported at the bridge; plainthrowsis not. - Async: Exported
asyncfunctions/methods/closures becomePromise-returning JS functions (requireJavaScriptEventLoop.installGlobalExecutor()). Imported standalone@JSFunctioncannot be async, but imported async callbacks (closure parameters) are supported. - Preview interfaces: For previewing d.ts → Swift locally, run the ts2swift script from the checked-out JavaScriptKit: from a project that depends on JavaScriptKit use
node .build/checkouts/JavaScriptKit/Plugins/BridgeJS/Sources/TS2Swift/JavaScript/bin/ts2swift.js <input.d.ts> [options]; Run with--helpfor usage. - Closures: Use JSTypedClosure when passing or returning Swift closures to JS, and call
release()when the closure is no longer needed by JS. Plain Swift closure types also work as parameters/returns, released automatically viaFinalizationRegistry. Closure signatures may bethrows(JSException)and/orasync. When receiving callbacks from JS (e.g. imported APIs), use regular closure types in Swift ((Args) -> Return).
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.
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.
- 3mo ago First seen · 37 lines · 82 tokens per session scan A a5b72358eaaa
bridge-js is a skill published in the GitHub repository swiftwasm/Swift-Wasm-Agent-Skill (49 stars, last pushed 3mo ago), licensed MIT. It adds 82 tokens to every session and 892 once invoked, about $0.0003 per session on Opus 5.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-08-30.
bridge-js compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bridge-jsswiftwasm/Swift-Wasm-Agent-Skill | Skill | 49 | 3mo ago | MIT | A | 82 | Claude Code |
| electron-vue-init-skilljiushiwon/wg-skills | Skill | 154 | 6d ago | Apache-2.0 | A | 192 | Claude Code, Codex |
| expo-moduleopenai/plugins | Skill | 8.5k | 12d ago | none | A | 59 | Codex |
| migrate-to-strict-apireact-native-community/skills | Skill | 28 | 3mo ago | MIT | A | 78 | Claude Code |
| ktlintmoabualruz/fulcrum | Skill | 6 | 2mo ago | MIT | A | 67 | Claude Code |
| build-nitro-modulesriteshshukla04/agent-skills | Skill | 35 | 8mo ago | none | A | 84 | Claude Code, Codex |
| firebase SDKmosif16/codex-Skills | Skill | 18 | 1y ago | none | A | 0 | Claude Code, Codex |