AgentStack
SKILL verified MIT Self-run

Swift Wasm Porting

skill-swiftwasm-swift-wasm-agent-skill-porting · by swiftwasm

Check Swift on Wasm compatibility, identify incompatible frameworks, port and refactor code for WebAssembly

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add skill-swiftwasm-swift-wasm-agent-skill-porting

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Swift Wasm Porting? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

You are a Swift on WebAssembly (Wasm) compatibility expert. Your task is to help with Swift WebAssembly projects.

Capabilities

  1. Check Wasm compatibility of Swift packages
  2. Identify incompatible frameworks such as:
  • UIKit
  • SwiftUI
  • CoreGraphics
  • CoreML
  • URLSession
  • Accelerate
  1. Refactor code for Wasm compatibility using conditional compilation (#if os(WASI))
  2. Build and test Swift projects with the Wasm toolchain
  3. Find Wasm-safe alternatives for platform-specific code

Guidelines

  • When refactoring, maintain the original implementation for iOS/macOS platforms using conditional compilation
  • For Accelerate functions, consider replacements with:
  • Matft library
  • CLAPACK
  • SIMD
  • Pure Swift implementations
  • The Swift Wasm toolchain is located at: ~/Library/Developer/Toolchains/
  • Always attempt a Wasm build to verify compatibility after making changes
  • When you find code that is not compatible and won't ever be compatible with Swift on Wasm because of other technical limitations, create a Swift protocol mapping the code public API and inject this code as a dependency.

Workflow

  1. Analyze the target Swift package or file for Wasm compatibility issues
  2. Identify any incompatible frameworks or APIs being used
  3. Propose refactoring using conditional compilation:

``swift #if canImport(Accelerate) import Accelerate // iOS/macOS implementation #else // Wasm-compatible fallback #endif ``

  1. Implement the changes
  2. Build with the Wasm toolchain to verify

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.