Organizes Swift source trees by feature and layer, splits oversized files, normalizes MARK sections, enforces block-comment file headers, and extracts TODO/FIXME text into ledger files.
Ships in apple-dev-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; scripts run unread.
Use this skill as the top-level workflow for structural cleanup inside existing Swift components. It governs file splitting, file moves, section grouping, plain-language file headers, and TODO or FIXME ledger extraction. scripts/run-workflow.fsx classifies the cleanup, loads policy, and hands off only DocC content or Xcode-owned membership operations. It is not the formatter or linter integration authority, and it is not the DocC authoring authority.
// MARK: sections, declaration grouping, or view-modifier extraction in SwiftUI code.format-swift-sources first when formatter or linter setup is missing, unclear, or stale.author-swift-docc-docs when the task becomes symbol documentation, DocC article work, landing-page structure, topic groups, or DocC-oriented review.swift-package-build-run-workflow or swift-package-testing-workflow when structural cleanup turns into ordinary package execution or SwiftPM validation.xcode-build-run-workflow when structural cleanup turns into active Xcode execution, scheme validation, file-membership follow-through, or guarded project mutation work.xcode-testing-workflow when structural cleanup turns into active Xcode test validation or test-target diagnosis.bootstrap-xcode-workspace --operation align for product guidance alignment. A deliberately standalone package uses its own explicit repository-maintenance contract.cleanup_kind: one of the request classes abovetarget_scope: optional narrowed scope such as one file, one feature directory, or the whole reposplit_mode: optional; use values such as advisory, required, or full-passtodo_fixme_mode: optional; use values such as report-only, rewrite-ledgers, or normalize-existingfile_header_mode: optional; use values such as advisory or requiredfile_header_style: optional; currently project-bannerformat-swift-sources before and after structural mutationTODO.md and FIXME.md as separate ledger filesreferences/file-headers.mdstatus
success: a supported structure path was selected and explainedhandoff: another skill should take the next stepblocked: the request lacks a safe structural path or cleanup kindpath_type
primary: the documented structure path completedfallback: a narrower safe pass was chosenoutput
cleanup_kindrecommended_pathlayout_targetssplit_targetsledger_filesheader_policyhelper_scriptscaveatsverificationreferences/file-header-inventory.template.yaml when --apply --inventory is the right path.author-swift-docc-docs.blocked when the cleanup kind or target scope is too ambiguous to mutate safely.handoff when project-file mutation or Xcode membership updates need guarded execution through xcode-build-run-workflow.format-swift-sources before any structural mutation.author-swift-docc-docs.xcode-build-run-workflow.scripts/run-workflow.fsx is the top-level runtime entrypoint and converts component inspection plus request inference into the documented JSON contract.bootstrap-xcode-workspace --operation align when the request is really about durable product rules.scripts/run-workflow.fsx uses the managed header policy and fixed split thresholds.references/glossary.mdreferences/layout-rules.mdreferences/source-organization-rules.mdreferences/file-headers.mdreferences/todo-fixme-ledgers.mdreferences/automation-prompts.mdformat-swift-sources first for formatter or linter setup and again after structural edits complete.references/layout-rules.md when the user needs the package-versus-app directory contract explained.scripts/run-workflow.fsxscripts/normalize-swift-structure.fsxscripts/normalize-swift-structure.fsxreferences/file-header-inventory.template.yamlagents/openai.yaml (opens in a new tab)references/automation-prompts.md (opens in a new tab)references/file-header-inventory.template.yaml (opens in a new tab)references/file-headers.md (opens in a new tab)references/glossary.md (opens in a new tab)references/layout-rules.md (opens in a new tab)references/source-organization-rules.md (opens in a new tab)references/todo-fixme-ledgers.md (opens in a new tab)scripts/normalize-swift-structure.fsx (opens in a new tab)scripts/run-workflow.fsx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/apple-dev-skills:structure-swift-sourcesfrom apple-dev-skills
npx claudepluginhub gaelic-ghost/socket --plugin apple-dev-skills65 skills in this plugin
/app-extension-architecture-workflowRoute Apple app-extension work across extension points, targets, isolation, entitlements, shared containers, lifecycle, privacy, testing, signing, distribution, and handoffs. Use when the extension point is not settled./app-intents-workflowDesign, implement, validate, and troubleshoot App Intents, App Entities, App Shortcuts, and system-surface integrations. Use when exposing a focused app action or content to Siri, Spotlight, Shortcuts, widgets, controls, Live Activities, or hardware interactions./appkit-app-architecture-workflowGuide AppKit app-structure decisions for macOS apps across app delegates, status-item menu bar apps, responder-chain menus, windows, controllers, restoration, archiving, Observation, and mixed AppKit/SwiftUI composition. Use when the user wants help deciding where AppKit responsibilities belong or how to avoid steering a macOS app into SwiftUI-only structure when AppKit owns the behavior./apple-developer-provisioning-workflowPlan and safely automate officially supported Apple Developer provisioning and CloudKit workflows through the App Store Connect REST API, Xcode-aware local discovery, cktool, and CKTool JS. Use when inspecting or changing bundle IDs, capabilities, certificates, devices, provisioning profiles, CloudKit schemas, or sandbox test data while keeping portal-only configuration, credentials, dry runs, and confirmation gates explicit./apple-image-representation-workflowGuide Apple image decoding, encoding, metadata, thumbnails, multi-frame sources, and representation bridging across Image I/O, Core Graphics, AppKit NSImage and NSImageRep, UIKit UIImage, Core Image, and Core Video. Use when image work involves files, data, representations, orientation, scale, color, metadata, or conversion rather than pixel effects or visual recognition./apple-runtime-telemetry-workflowAdd and verify privacy-aware Apple unified logging and signposts in macOS, iOS, and related Apple apps. Use when designing Logger categories, diagnosing intermittent runtime behavior, collecting focused evidence, or measuring an operation with OSSignposter.Other plugins' skills for the same job