How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics…

Custom licenceAuto-check passedMobile

Install Write Swift

skills CLI
$ npx skills add KartikLabhshetwar/better-shot --skill write-swift -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KartikLabhshetwar/better-shot write-swift --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/KartikLabhshetwar/better-shot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-swift .claude/skills/write-swift && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
write-swift
GitHub stars
2.4k
Used in
4 other repos
Token cost
~10k tokens
SKILL.md length
5,283 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Custom licence

At a glance

How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics…

  • Works in 12 steps: Model data with value types → Errors and optionals — make the failure… → Concurrency: stay single-threaded until… → …
  • Migrating Swift
  • SKILL.md covers 1. Model data with value types, 2. Errors and optionals — make…, 3. Concurrency: stay… and 4. Sendable and sharing data, plus 13 more sections
  • Calls swift

What it does

Write Swift is an agent skill from KartikLabhshetwar/better-shot. How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet. Use when writing, reviewing, or migrating Swift, or when a concurrency error, a hang, a data race, a retain cycle, or a performance problem needs fixing.

Its SKILL.md is about 10k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering iOS development. It works with Swift and macOS. The repository describes itself as: Screenshot, screen recording, and video editor for macOS. Native SwiftUI app with capture deck, 75+ customizable shortcuts, URL scheme automation, and self-hosted cloud sharing…

When your agent uses it

  • Migrating Swift
  • A concurrency error
  • A performance problem needs fixing

Example prompts

  • “/write-swift”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Model data with value types
  2. Errors and optionals — make the failure paths visible
  3. Concurrency: stay single-threaded until profiling says otherwise
  4. Sendable and sharing data
  5. Structured concurrency
  6. Concurrency in SwiftUI
  7. Protocols and generics
  8. API design — clarity at the point of use
  9. Performance — measure, then choose
  10. ARC and object lifetime
  11. Testing — Swift Testing by default
  12. Macros

What it can do on your machine

Read from SKILL.md and the folder at commit 102b364. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • swift

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Write Swift loads about 10k tokens when it runs. Until then it costs about 124 tokens; SKILL.md has 5,283 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~124
When it runs · the whole SKILL.md, loaded when a task matches
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 5,283 words (~10,489 tokens).

“How to write Swift the way the language wants to be written, current through Swift 6.4.”

— opening of SKILL.md by KartikLabhshetwar, Custom licence
name
write-swift

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/write-swift of KartikLabhshetwar/better-shot.

Open the folder on GitHubat commit 102b364

Used in 4 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in KartikLabhshetwar/better-shot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Write Swift next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Write Swift compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write Swift this skillKartikLabhshetwar/better-shot2.4k4 repos~10kAutomated safety check: PassCustom licence
macOS Spm App PackagingDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT
Snapshot Testsmicrosoft/SwiftStreamingMarkdown378—~2.2kAutomated safety check: PassMIT
Build Run Debugrobinebers/openusage4.3k—~1.8kAutomated safety check: PassMIT
Bootstrap iOSRayFernando1337/rayfernando-skills130—~1.1kAutomated safety check: PassApache-2.0
macOS Build Run Debugrobinebers/openusage4.3k—~1.8kAutomated safety check: PassMIT

Similar skills

  • macOS Spm App Packaging

    Dimillian/Skills

    Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project.

    4k GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Snapshot Tests

    microsoft/SwiftStreamingMarkdown

    Official

    Record and validate swift-snapshot-testing snapshots in the SwiftStreamingMarkdown package: regenerate reference PNGs, run snapshot tests, and diff failed snapshots.

    378 GitHub stars~2.2k tokensUpdated 13 days ago
    MobileAuto-check passed
  • Build Run Debug

    robinebers/openusage

    Build, run, and debug local macOS apps and desktop executables using shell-first Xcode and Swift workflows.

    4.3k GitHub stars~1.8k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Bootstrap iOS

    RayFernando1337/rayfernando-skills

    Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work.

    130 GitHub stars~1.1k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • macOS Build Run Debug

    robinebers/openusage

    Build, run, and debug macOS apps with shell-first Xcode and Swift workflows.

    4.3k GitHub stars~1.8k tokensUpdated 2 days ago
    MobileAuto-check passed
  • macOS Swiftpm

    robinebers/openusage

    Build, run, and test SwiftPM macOS packages and executables.

    4.3k GitHub stars~344 tokensUpdated 2 days ago
    MobileAuto-check passed

More from KartikLabhshetwar/better-shot

All 12 skills in this repo
  • Appkit Swiftui Bridge

    KartikLabhshetwar/better-shot

    Expert guidance for hybrid AppKit-SwiftUI development. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.1k tokens
    Auto-check passed
  • Ip As Logo

    KartikLabhshetwar/better-shot

    Generate extremely simple, cute, personified square character images with rounded heavy forms, two purposeful character colors, one solid background color, and a dominant lower-corner composition.

    2.4k GitHub starsUsed in 1 repo~4.3k tokens
    Auto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    Auto-check passed
  • Coding Best Practices

    KartikLabhshetwar/better-shot

    Reviews macOS Swift 6+ code for modern idioms, SOLID principles, SwiftData patterns, and concurrency best practices.

    2.4k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • macOS Capabilities

    KartikLabhshetwar/better-shot

    Expert guidance on macOS platform capabilities. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.1k tokens
    Auto-check passed
  • macOS Development

    KartikLabhshetwar/better-shot

    Comprehensive macOS development guidance including Swift 6+, SwiftUI, SwiftData, architecture patterns, AppKit bridging, and macOS 26 Tahoe APIs.

    2.4k GitHub starsUsed in 2 repos~735 tokens
    Auto-check passed

Works with

Categories

Questions about Write Swift

What does Write Swift do?

How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics…. Write Swift is an agent skill from KartikLabhshetwar/better-shot. How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet.

When should I use Write Swift?

Write Swift fits situations like: migrating Swift; A concurrency error; A performance problem needs fixing.

How do I install Write Swift in Claude Code?

Run `npx skills add KartikLabhshetwar/better-shot --skill write-swift -a claude-code`. Or copy the skill folder (.agents/skills/write-swift in KartikLabhshetwar/better-shot) into .claude/skills/write-swift in your project. Claude Code loads it when a task matches its description.

How do I install Write Swift in Codex?

Run `npx skills add KartikLabhshetwar/better-shot --skill write-swift -a codex`. Or copy the skill folder (.agents/skills/write-swift in KartikLabhshetwar/better-shot) into .agents/skills/write-swift in your project. Codex loads it when a task matches its description.

Can I use Write Swift in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KartikLabhshetwar/better-shot --skill write-swift -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-swift, .gemini/skills/write-swift, .github/skills/write-swift and .opencode/skills/write-swift in your project.

What does Write Swift need to run?

Going by SKILL.md and its folder, Write Swift needs the command-line tools its instructions call (swift).

Does Write Swift access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Write Swift safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Write Swift use?

Write Swift has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Write Swift use?

About 10k tokens (SKILL.md is roughly 42k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write Swift?

Skills that share tags, products or a category with Write Swift: macOS Spm App Packaging (Dimillian/Skills, 4k stars), Snapshot Tests (microsoft/SwiftStreamingMarkdown, 378 stars), Build Run Debug (robinebers/openusage, 4.3k stars) and Bootstrap iOS (RayFernando1337/rayfernando-skills, 130 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write Swift?

KartikLabhshetwar (a GitHub user) maintains it in KartikLabhshetwar/better-shot, which has 2,366 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 1, 2026.

Source: KartikLabhshetwar/better-shot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.