/swift:organizing-swift-typesfrom Swift
Organizes Swift source files with conventions for type declarations, protocol conformances, extensions, and access control. Use when adding or restructuring Swift code to match a consistent layout.
Ships in Swift. 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.
Use these suggested conventions for Swift source when the repository has no established layout. Repository style wins, including MARK comments, organizational extensions, nested types, and constants namespaces. These are layout choices, not platform restrictions; apply them only within the requested surface.
ordering-symbols skill when available. If that skill is unavailable, use deterministic ordering: compiler-required declarations first, then lexicographic order by symbol name. Never compensate for missing ordering rules with MARK comments.When a rule here conflicts with compiler correctness, compiler correctness wins. Make the smallest possible exception and preserve the rest of the structure.
Every generated or edited Swift file should converge toward this shape:
fileprivate static let.#if DEBUG previews last.The file should not contain MARK comments, organizational extensions, unnecessary self, global implementation constants, private enum Constants, private struct Constants, private enum Metrics, or equivalent namespace buckets.
When editing Swift under this skill:
private enum Constants, private struct Constants, global implementation constants, and type-polluting private static constants with fileprivate static let primitive extensions unless the constant is true type API.self while preserving required disambiguation and capture semantics.#if DEBUG.Do not create churn outside the touched file unless moving a legitimate external-type extension or top-level production type into its own file is necessary for correctness or explicitly requested.
Load only the reference relevant to the task:
final, and declaration modifier ordering.self, and constants namespaces to remove.agents/openai.yaml (opens in a new tab)references/access-control-and-modifiers.md (opens in a new tab)references/availability-and-version-spanning.md (opens in a new tab)references/complete-shape-example.md (opens in a new tab)references/constants-file-structure-and-previews.md (opens in a new tab)references/extensions-and-nested-types.md (opens in a new tab)references/primary-declaration-and-conformances.md (opens in a new tab)references/prohibited-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kylehughes/agent-plugins-for-making-good-software --plugin swift10 skills in this plugin
/designing-swift-apisDesign Swift API names, labels, signatures, and documentation contracts. Use proactively when adding or changing APIs or reviewing call-site clarity against Apple's API Design Guidelines./modeling-swift-types-for-correctnessModel Swift invariants, validated decoding, legal transitions, ownership, and generic relationships. Load before assessing or changing enforcement boundaries; not ordinary output tests or naming./ordering-symbolsOrder Swift members by declaration kind, access, and name when semantics permit. Use proactively when adding or moving members; preserve initialization, enum, UI, and other meaningful order.Other plugins' skills for the same job