agentsclimarketplace

Modern swift

Skill pszypowicz/claude-skills/plugins/modern-swift/skills/modern-swift

A small Claude Code marketplace: ado, swift-concurrency, modern-swift, go-dev, worktrees.

Install
npx -y skills add pszypowicz/claude-skills --skill modern-swift

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Swift language features beyond concurrency: attributes (@available, @discardableResult, @frozen, @inlinable, @usableFromInline, @backDeployed, @resultBuilder, @propertyWrapper) and macro usage (#Preview, custom macros). Use when the user asks about API availability checks, library evolution, deprecating or renaming APIs, back-deploying functions to older OSes, result builders / DSLs, property wrappers, or Swift macros. Do NOT use this skill for concurrency topics (async/await, actors, Sendable, @MainActor, @Observable) - those belong to swift-concurrency.

SKILL.md

4.5 KB, 785 tokens by cl100k_base, as published. Nobody here has run it

Modern Swift

Focused reference for Swift language features that are commonly misused or forgotten but are not concurrency-related. Concurrency lives in the swift-concurrency skill; this skill deliberately does not duplicate it.

When to load which reference

TopicFileLoad when
@available, #available, deprecation, renamesreferences/attributes.md#availabilityMarking API availability, deprecating, renaming, or gating runtime behavior on OS version
@discardableResultreferences/attributes.md#discardableresultFunction returns a value callers may reasonably ignore
@frozenreferences/attributes.md#frozenLibrary author deciding whether an enum/struct layout is stable
@inlinable, @usableFromInlinereferences/attributes.md#inlinablePerformance-critical code in a resilient library
@backDeployedreferences/attributes.md#backdeployedShipping a new API to clients running older OSes
@resultBuilderreferences/attributes.md#resultbuilderBuilding a DSL (SwiftUI-style)
@propertyWrapperreferences/attributes.md#propertywrapperEncapsulating get/set behavior on stored properties
#Previewreferences/macros.md#previewWriting SwiftUI previews
Custom macrosreferences/macros.md#custom-macrosUnderstanding or authoring Swift macros

Routing guardrails

  • Concurrency topics (async, await, actor, @MainActor, Sendable, @Observable, @preconcurrency) belong to swift-concurrency. Do not answer them from this skill - defer.
  • @frozen, @inlinable, @backDeployed are relevant only to resilient libraries (frameworks distributed as binaries with ABI stability). App targets rarely need them. If the user is writing an app, say so and suggest the simpler alternative.
  • @backDeployed has real rules beyond "copy the body": public or @usableFromInline, body must follow @inlinable restrictions, methods on classes must be final, stored properties are excluded. See references/attributes.md#backdeployed.

Common mistakes

  1. Using @frozen in an app target. It's a library-evolution feature and has no effect outside resilient libraries. Remove it.
  2. @backDeployed on a stored property. Not supported. Only computed properties (no storage), functions, final methods, and subscripts.
  3. @inlinable body referencing an internal symbol. The body is emitted into client binaries, so it can only reference public or @usableFromInline symbols.
  4. Forgetting @discardableResult on a fluent API. Causes "result unused" warnings for legitimate call sites. Mark the method, don't tell the caller to add _ =.
  5. Property wrapper with didSet clamping loop. Swift prevents the recursion, but it's still clearer to clamp in the setter of a computed wrappedValue backed by a private stored value. See the canonical pattern in references/attributes.md#propertywrapper.

What ships with it: 2 files

15.8 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.