Agent skill
swift-wasm
Swift WASM development for setup, build, optimize, debug, and test workflows in Raven and related apps.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/swift-wasm
SKILL.md
Swift WASM Development Skill
Comprehensive guidance for Swift 6.2 WebAssembly workflows used by Raven.
Quick Actions
setup: Set up Swift toolchain and WASM SDKbuild: Build the current project for WASMdev: Start development workflow/serveroptimize: Build an optimized production bundledebug: Diagnose build/runtime WASM issuestest: Run tests and browser validation
Project Docs To Prefer
QUICKSTART.mdDocumentation/GettingStarted.mdDocs/bundle-size-quickstart.md
Setup Commands
brew install swiftly
swiftly install 6.2.3
swiftly use 6.2.3
swift --version
swift sdk install \
https://download.swift.org/swift-6.2.3-release/wasm-sdk/swift-6.2.3-RELEASE/swift-6.2.3-RELEASE_wasm.artifactbundle.tar.gz \
--checksum 394040ecd5260e68bb02f6c20aeede733b9b90702c2204e178f3e42413edad2a
swift sdk list
Build Commands
swift build --swift-sdk swift-6.2.3-RELEASE_wasm
swift build --swift-sdk swift-6.2.3-RELEASE_wasm -c release -Xswiftc -Osize
Optimization Commands
swift build \
--swift-sdk swift-6.2.3-RELEASE_wasm \
-c release \
-Xswiftc -Osize \
-Xswiftc -whole-module-optimization \
-Xlinker --lto-O3 \
-Xlinker --gc-sections \
-Xlinker --strip-debug
Typical Issues
- "No available targets compatible with wasm32-unknown-wasip1": wrong Swift toolchain or missing WASM SDK
- large WASM bundle: missing
-Osize/ LTO / strip - stale browser behavior: cached WASM artifact
Working Norms
- Prefer official swift.org toolchains for reproducible builds.
- For example apps, build inside each example directory when possible.
- Confirm output location under
.build/wasm32-unknown-wasip1/.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?