swift · wendylabsinc — Claude Code skill: Swift patterns and memory safety
Topic notes on Swift configuration, logging, swift-otel, testing and strict memory safety that the agent pulls in when the work touches that code.
no license ★ 64 updated 2026-10-22
npx skills add wendylabsinc/claude-skills --skill swift -a claude-codeWhat swift does
SKILL.md points at a references/ folder with five topic files: configuration, swift-log, swift-otel, Swift Testing and debugging. The agent opens the one matching the conversation instead of loading the whole set.
Conventions cover how code is laid out. Types and functions stay internal until something outside needs them. Public members come first, sorted into // MARK: - sections named with gerund phrases; internal and private helpers sit under their own visibility headings. An is-a conformance goes on the type declaration, while an ability protocol such as Codable gets an extension at the bottom of the file. Platform code splits into +macos, +linux and +default files, so adding a protocol method means editing each of them. For Swift 6.2 there is material on .strictMemorySafety() and on Span, which borrows its backing storage and cannot outlive it or cross an async boundary.
Dropping Foundation from a public API is not cosmetic on an embedded target or in a library that must behave the same on Linux and Apple platforms: FoundationEssentials costs 15-40MB. Imports stay internal, with canImport(FoundationEssentials) falling back to Foundation. Linux builds need Glibc or Musl.
What it helps with
- group public members into
// MARK:sections - move XCTest cases onto Swift Testing
- keep Foundation out of a library's public API
- split platform code into
+platformfiles - pick an OTLP backend for a server app
Example prompts for the agent
- Rewrite the interface selection so it sorts once instead of repeating the same loop.
- Give every
@Testa backtick sentence-style name and switch the assertions to#expect. - Check that
Spannever escapes the closure or crosses an async boundary.
How to install swift
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift -a claude-code2Manually: put the files in place
~/.claude/skills/swift/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift/
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift -a codex2Manually: put the files in place
.agents/skills/swift/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift -a cursor2Manually: put the files in place
.cursor/skills/swift/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wendylabsinc/claude-skills swift2Manually: put the files in place
.github/skills/swift/SKILL.md1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift -a gemini-cli2Platform CLI
gemini skills install https://github.com/wendylabsinc/claude-skills --path swiftManually: put the files in place
.devin/skills/swift/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift
How do I install the swift skill in Claude Code?
Run npx skills add wendylabsinc/claude-skills --skill swift -a claude-code. The skill lands at ~/.claude/skills/swift/SKILL.md.
What does the swift skill do?
It hands the agent Swift house rules plus notes on configuration, logging, otel, testing and memory safety. A references/ file is read only when the task touches that area.
Does it cover Linux builds?
Linux is in scope: the notes walk through the Glibc/Musl import switch and the +linux file layout. Terminal debugging on Linux has a file of its own.
Similar skills
All skills for Programming languages →swift by other authors comes first.