/swift-android-skills:swift-android-sdkfrom swift-android-skills
Use this skill when Swift has to build and run on Android without Skip's app tooling, or when a Skip Fuse build fails below the Skip layer: installing the Swift SDK for Android with a matching open-source toolchain and the NDK, swift build with an Android triple and API level, linking the Swift runtime statically or shipping its .so files and libc++_shared.so, 'dlopen failed: library not found' crashes, FoundationNetworking and Android module imports, calling Swift from Kotlin or Java with swift-java jextract in JNI mode or raw @_cdecl functions, Gradle jniLibs per ABI, R8 keep rules, app size, LLDB debugging, symbolicating tombstones, and Android emulator tests in CI. Not for choosing a route or designing shared view models (swift-android-architecture), Skip project setup or skip.yml (skip-project-creation, skip-fuse), Skip's own test runners (skip-testing), or installing Android Studio and Google's SDK by themselves.
Ships in swift-android-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Swift SDK for Android is a cross-compiler, not an app framework. You pick a toolchain that matches it exactly, choose how the Swift runtime is linked, ship every library the app loads, and own the boundary with Java and Kotlin. Skip does all of this for the projects it creates; this skill is for Swift without Skip, and for failures underneath a Skip Fuse build.
references/sdk-setup.mdreferences/packaging.mdreferences/swift-java.mdreferences/portability.mdreferences/size-and-debugging.mdreferences/bridge-surface.mdreferences/ci.mdreferences/versions.mdreferences/measured-behavior.mdreferences/official-skip-skills.mdreferences/recommendation-format.mdreferences/sources.mdreferences/recommendation-format.md).swift sdk install, an NDK download or an emulator image changes the machine:
propose the exact commands, ask, then run them.references/versions.md
and references/sdk-setup.md with their dates, never from memory;
where swift.org's article and the docs.swift.org guide disagree, say which you followed.
Anything else is labelled inference.toolchain_report.py says what this machine can do.
A host build is not an Android build;
an Android build is not a run;
a run on an emulator is not a run on a device.swift sdk install <url> --checksum <sha256>;
the URL and checksum for the current release are in references/versions.md.references/sdk-setup.md).
Use the release the SDK was built with: with older NDKs, linking the static Swift runtime failed
on an undefined C++ library symbol (Measured M5).python3 scripts/toolchain_report.py reports the host toolchain, installed SDKs,
the NDK, Java and adb, and whether this machine can build or run anything for Android.swift build --swift-sdk <sdk> [--triple <arch>-unknown-linux-android<api>] --static-swift-stdlib
(references/sdk-setup.md has the exact forms the two official guides use).aarch64 for devices and x86_64 for most emulators;
the API level in the triple is the minimum Android version the code may call into
(references/versions.md).@available(Android <n>, *) and #available
where the SDK provides availability attributes (references/portability.md).dlopen failed: library "lib….so" not found
(references/packaging.md).libc++_shared.so from the NDK either way.jniLibs/<abi>/, one set per ABI the app declares.lib/ folder, then by launching it;
say which of the two was done.jextract in JNI mode generates Java wrappers
that Kotlin can call; its FFM mode needs a newer Java than Android has (references/swift-java.md).
async functions come back as futures; closures and generics are limited.@_cdecl("Java_<package>_<Class>_<method>")
suits a few functions with simple types.references/versions.md).references/swift-java.md).import FoundationNetworking behind #if canImport(FoundationNetworking).canImport ladder that includes Android;
FILE handles differ (references/portability.md).@objc, #selector, key-value observing and swizzling fail;
subclassing NSObject alone does not.print output does not reach Android's log in Skip apps (skip.dev › Debugging);
log through a logging API that writes to logcat (references/portability.md).python3 scripts/android_scan.py <path> --route bare-sdk flags these.FoundationEssentials instead of Foundation where the code allows it,
and size-oriented compiler flags are the levers (references/size-and-debugging.md).references/versions.md);
measure the app in question before and after.references/size-and-debugging.md).swift demangle (references/size-and-debugging.md).references/ci.md has the official reusable workflow and a GitHub Action, pinned.references/measured-behavior.md).skip.yml, bridging options and Skip's commands belong to Skip's skip-fuse skill.python3 scripts/toolchain_report.py; the project's own agent instructions
(AGENTS.md, CLAUDE.md); Package.swift, the Gradle files, and any crash log.--route bare-sdk (or the project's route).references/recommendation-format.md:
toolchain and installs first, then build, then the runtime and packaging,
then the Java boundary, then size, debugging and CI.toolchain_report.py says this machine can;
where a sandbox blocks swift build, fall back to swiftc -typecheck and say so.references/versions.md or swift.org.libc++_shared.so.evals/evals.json (opens in a new tab)evals/files/Compress/Package.swift (opens in a new tab)evals/files/Compress/README.md (opens in a new tab)evals/files/Compress/Sources/Compress/Compressor.swift (opens in a new tab)evals/files/Shop/apk-contents.txt (opens in a new tab)evals/files/WeatherCore/android/app/build.gradle.kts (opens in a new tab)evals/files/WeatherCore/crash.txt (opens in a new tab)evals/files/WeatherCore/swift/Package.swift (opens in a new tab)evals/files/WeatherCore/swift/Sources/WeatherCore/Forecast.swift (opens in a new tab)evals/trigger-evals.json (opens in a new tab)references/bridge-surface.md (opens in a new tab)references/ci.md (opens in a new tab)references/measured-behavior.md (opens in a new tab)references/official-skip-skills.md (opens in a new tab)references/packaging.md (opens in a new tab)references/portability.md (opens in a new tab)references/recommendation-format.md (opens in a new tab)references/sdk-setup.md (opens in a new tab)references/size-and-debugging.md (opens in a new tab)references/sources.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub alexey1312/swift-android-agent-skill --plugin swift-android-skills