Guides integration of SwiftLint and SwiftFormat across CLI, Xcode, SPM plugins, Git hooks, and GitHub Actions. Generates checked-in config files. Use for clean formatting baseline before structural edits.
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 integrating and maintaining SwiftLint and SwiftFormat in Apple or Swift repositories. The skill keeps the support matrix explicit, teaches the shortest correct path for each surface, and includes a deterministic helper script for turning SwiftFormat for Xcode shared settings into a project-root .swiftformat file when the host app export path is unavailable or inconvenient. For shared Swift repositories, the preferred baseline is a checked-in repo-root .swiftformat plus a Git pre-commit hook that formats staged Swift sources and then reruns SwiftFormat in lint mode before the commit is allowed through. When both tools are in play, treat SwiftFormat as the primary owner of formatting shape and use SwiftLint as a complementary signal layer for clarity, safety, maintenance, and selectively chosen documentation expectations rather than as a second formatter. When the script path is needed, prefer feeding it the real shared plist from the SwiftFormat group container over assuming the defaults-domain export is complete, and treat the generated file as a curated starting point rather than as a guaranteed final repo config. It is also the canonical first pass before and after structure-swift-sources when a request will split, move, or reorganize Swift source files.
swiftformat, swiftlint, or both in a Swift repository..swiftformat file.structure-swift-sources pass will split files, move files, or normalize section layout and the repo needs a clean formatting baseline before structural edits begin.bootstrap-xcode-workspace --operation create --component-kind library when the user is creating a brand new Swift package and style tooling is only one part of that scaffold.bootstrap-xcode-workspace when the user is creating a native Apple product and style tooling is only one part of that scaffold.swift-package-build-run-workflow or swift-package-testing-workflow when the task shifts from style-tooling integration to ordinary SwiftPM package execution.swift-package-extension-workflow when the task shifts from formatter-specific setup to general plugin capability, permissions, generated outputs, dual-toolchain behavior, or Xcode handoff policy.xcode-build-run-workflow when the task shifts from style-tooling integration to active Xcode execution, diagnostics, or mutation work in an existing project.xcode-testing-workflow when the task shifts from style-tooling integration to active Xcode test work.structure-swift-sources when the task shifts from formatter or linter setup into file splitting, file moves, declaration grouping, or TODO/FIXME ledger cleanup.author-swift-docc-docs when the task shifts from style-tooling setup into symbol documentation, DocC article work, landing-page structure, topic groups, or DocC-oriented review.bootstrap-xcode-workspace --operation align for product guidance alignment.swiftformatswiftlintbothclixcode-build-phasexcode-source-extensionswiftpm-pluginapplescriptgit-pre-commitgithub-actionsswiftformat-xcode-config-exportreferences/integration-matrix.md before proposing or generating steps..swiftformat and a Git pre-commit hook that formats staged Swift files and then verifies them with swiftformat --lintreferences/swiftformat-xcode-config-export.mdscripts/export-swiftformat-xcode-config.fsx only when a deterministic shared-defaults export is neededdefaults export from the suite domain is empty, stale, or incomplete, point the script at the real shared plist inside the SwiftFormat group container with --input-pliststructure-swift-sources only after this formatting path is clear, then run this skill again afterward as the cleanup pass.tool_selection: swiftformat, swiftlint, or bothsurface: one of the workflow surfaces listed aboverepository_kind: optional context such as swift-package, xcode-project, or mixedconfig_goal: optional; use values such as new-config, reuse-existing, or export-xcode-settingsswiftformat_export_source: optional; use host-app-export or shared-defaults-script.swiftformat plus a Git pre-commit hook as the default baseline for shared Swift reposstatus
success: a supported path was selected and explainedhandoff: another skill should own the next stepblocked: the requested tool and surface combination is unsupported or lacks prerequisitespath_type
primary: the documented preferred path for the selected tool and surfacefallback: the documented secondary path for that tool and surfaceoutput
tool_selectionsurfacerecommended_pathconfig_filesrecommended_hookcaveatsverificationswiftlint through the Xcode source editor extension. SwiftLint does not ship that surface.--config paths. When config placement is incompatible with the plugin, switch to the documented shim or Run Script path.blocked when the user asks for one tool on a surface that only the other tool supports.blocked when the shared-defaults SwiftFormat export path is requested on a machine that does not expose a usable SwiftFormat shared defaults export and no group-container plist or other exported plist input is provided.scripts/export-swiftformat-xcode-config.fsx, preferably with --input-plist pointed at the real shared plist when the suite-domain export is not trustworthy on the current machine.structure-swift-sources to establish the formatting baseline, and run it again after that skill finishes so the post-split or post-move tree is normalized.swift-package-build-run-workflow or swift-package-testing-workflow when the task becomes ordinary SwiftPM package execution work.swift-package-extension-workflow when formatter or linter plugin work needs general SwiftPM extension policy or Swiftly/Xcode comparison.xcode-build-run-workflow when the task becomes Xcode execution or diagnostics work.xcode-testing-workflow when the task becomes Xcode test work.bootstrap-xcode-workspace --operation create --component-kind library or bootstrap-xcode-workspace when the user really needs a full project scaffold instead of isolated style-tooling setup.structure-swift-sources directly when the task becomes file splitting, source moves, MARK normalization, or TODO/FIXME ledger maintenance.author-swift-docc-docs directly when the task becomes symbol documentation, DocC article work, landing-page structure, topic groups, or DocC-oriented review.bootstrap-xcode-workspace --operation align for product guidance alignment.references/integration-matrix.mdreferences/swiftformat-surfaces.mdreferences/swiftlint-surfaces.mdreferences/swiftformat-xcode-config-export.mdreferences/automation-prompts.mdreferences/snippets/apple-xcode-project-core.md when the user wants the shared Apple and Xcode-project baseline guidance in the same repo that is adopting SwiftLint or SwiftFormat.references/snippets/apple-xcode-project-core.mdscripts/export-swiftformat-xcode-config.fsxagents/openai.yaml (opens in a new tab)references/automation-prompts.md (opens in a new tab)references/integration-matrix.md (opens in a new tab)references/snippets/apple-xcode-project-core.md (opens in a new tab)references/swiftformat-surfaces.md (opens in a new tab)references/swiftformat-xcode-config-export.md (opens in a new tab)references/swiftlint-surfaces.md (opens in a new tab)scripts/export-swiftformat-xcode-config.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:format-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-workflowOther plugins' skills for the same job