
Swift wasm porting
Helps Swift code check, port and refactor packages to compile for WebAssembly
Swift wasm porting is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 49
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Swift wasm porting
This skill guides an agent through making Swift packages build for WebAssembly. It starts by reviewing a target package or file for APIs that do not exist on WASI, such as UIKit, SwiftUI, CoreGraphics, CoreML, URLSession and Accelerate, then proposes changes that wrap platform-specific code in conditional compilation so the original Apple implementation stays in place.
The workflow has the agent find Wasm-safe substitutes, such as SIMD, pure Swift code or a few numeric libraries named in the instructions, and implement them. For code that cannot realistically run on Wasm, the skill suggests defining a Swift protocol over its public API and injecting the implementation as a dependency. After edits, the agent is told to run a Wasm build with the Swift Wasm toolchain to confirm the result.
The skill is a single SKILL.md with no bundled scripts. It assumes a local Swift Wasm toolchain is installed and that the user is working on Swift source code.
When your agent uses it
Check Swift on Wasm compatibility, identify incompatible frameworks, port and refactor code for WebAssembly
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (2 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the porting plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add swiftwasm/Swift-Wasm-Agent-Skill
/plugin install porting@swiftwasm-skillsOr copy only this skill to ~/.claude/skills/swift-wasm-porting:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/swift-wasm-porting &&
cp -R "$tmp/porting" ~/.claude/skills/swift-wasm-porting &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/swift-wasm-porting inside it instead.
Copy the skill folder to ~/.agents/skills/swift-wasm-porting to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/swift-wasm-porting &&
cp -R "$tmp/porting" ~/.agents/skills/swift-wasm-porting &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/swift-wasm-porting inside it instead.
Copy the skill folder to ~/.cursor/skills/swift-wasm-porting to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/swift-wasm-porting &&
cp -R "$tmp/porting" ~/.cursor/skills/swift-wasm-porting &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/swift-wasm-porting inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.git --path portingOr copy the folder to ~/.gemini/skills/swift-wasm-porting yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/swift-wasm-porting:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/swift-wasm-porting &&
cp -R "$tmp/porting" ~/.copilot/skills/swift-wasm-porting &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/swift-wasm-porting inside it instead.
Get the folder:
git clone --depth 1 https://github.com/swiftwasm/Swift-Wasm-Agent-Skill.gitThen copy Swift-Wasm-Agent-Skill/porting into your agent's skills folder as swift-wasm-porting. Agents that support SKILL.md read one folder per skill.
What it does
- Wasm compatibility review
- Scans a Swift package or file for APIs that do not work under WebAssembly.
- Incompatible framework detection
- Flags Apple-only frameworks such as UIKit, SwiftUI, CoreML and Accelerate.
- Conditional compilation refactors
- Wraps platform-specific code in conditional blocks while keeping the iOS and macOS path.
- Wasm-safe alternatives
- Suggests replacements for platform-specific code using SIMD, pure Swift or numeric libraries.
- Protocol-based dependency injection
- Abstracts code that cannot run on Wasm behind a protocol injected as a dependency.
- Wasm build verification
- Directs the agent to build with the Swift Wasm toolchain after making changes.
Good for
- Check whether my Swift package compiles for WebAssembly
- Replace Accelerate calls with a Wasm-compatible fallback
- Port a SwiftUI view model so its logic builds under WASI
- Wrap CoreML or URLSession usage behind a protocol for Wasm
- Refactor platform-specific code using #if os(WASI) guards
Swift wasm porting FAQ
What does Swift wasm porting change in my code?
It proposes and implements refactors that use conditional compilation, keeping the original Apple code path and adding Wasm-compatible fallbacks, then runs a Wasm build to verify.
Which frameworks does Swift wasm porting flag as incompatible?
The instructions name UIKit, SwiftUI, CoreGraphics, CoreML, URLSession and Accelerate as examples of frameworks to identify.
Does Swift wasm porting include scripts or bundled tools?
No. The skill is a single SKILL.md file with no scripts or reference files.
Does Swift wasm porting need a particular toolchain?
It expects a Swift Wasm toolchain to be available for building; the instructions point to a toolchain location under the user's Library folder.
How do I install Swift wasm porting in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/swift-wasm-porting to use it in all your projects, or to .claude/skills/swift-wasm-porting in one project. Or install the porting plugin, which includes it: /plugin marketplace add swiftwasm/Swift-Wasm-Agent-Skill, then /plugin install porting@swiftwasm-skills.
Does Swift wasm porting run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Swift wasm porting?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Swift wasm porting?
The closest alternatives to Swift wasm porting are Javascriptkit, Build swiftui interface, Axiom analyze swiftui performance, Improve architecture and Axiom swift simplifier.
Where this comes from
- Description: from the skill's own SKILL.md.
More from swiftwasm/Swift-Wasm-Agent-Skill

Lets an agent write Swift–JavaScript interop code with BridgeJS bindings and exports
- Open source
- 49 GitHub stars
- Developer tools

Guides Swift developers building WebAssembly web apps with JavaScriptKit
- Open source
- 49 GitHub stars
- Developer tools




