Swift Code Quality
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run this Swift package/app’s wired static-analysis and formatting tools — SwiftLint, the Swift toolchain’s
bundled swift format lint (or the third-party SwiftFormat tool when that’s what’s configured instead), and
Periphery — then report every issue found, grouped by tool and classified by rule id/severity. This is a
read-only reporting skill: it runs static analysis and formatting checks and reports results, it never fixes
issues or edits any tool’s configuration.
Purpose
iru-swift-code-quality is the Swift-stack equivalent of iru-java-code-quality/iru-typescript-code-quality/
iru-android-code-quality: a fast, focused lint/format/unused-code pass callable on its own or as a baseline
capture inside a task group. It verifies each tool is actually wired — a config file present and its binary on
PATH — before trusting a "zero issues" result from it, and never installs a missing tool itself, instead offering
Homebrew (or Mint/direct-download alternatives) via AskUserQuestion. SwiftLint and swift format lint accept
paths directly, so a scoped invocation narrows what actually runs; Periphery has no path selector, so a scoped
invocation still runs the whole module-graph scan and only filters the report.
Plugin
Shipped by the iru-swift plugin of the ai-catalog marketplace (install with /plugin install iru-swift@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
A file/directory path or a type/file simple name (e.g. |
None — checks the whole package/project. |
Outputs
-
A plain-text summary in the conversation — never a written file.
-
Findings grouped by tool (SwiftLint, the wired formatter, Periphery), then by rule id, with file:line and message.
-
Per tool: whether it ran or was skipped as "not wired"/"binary missing" (Step 1), a total issue count, and the severity breakdown where the tool has one.
-
When a baseline was supplied, only the new-vs-baseline diff per rule id/tool instead of the full current list.
-
No source file or SwiftLint/
swift-format/.swiftformat/Periphery configuration is ever modified.
Execution flow
Dependencies
Invokes
None — iru-swift-code-quality is a leaf skill; it only runs SwiftLint/swift format lint/SwiftFormat/Periphery
and parses their reports, it does not call any other skill in this catalog.
Invoked by
-
Code — Step 3 and 7, quality baseline and comparison for Swift plans, via the
iru-gate-runneragent. -
Swift Code One Task Group — Steps 1 and 3, once per task group’s bucket, via the
iru-gate-runneragent, to capture a pre-change baseline covering the bucket’s touched file(s) and later diff the post-change result against it.
Related agents
-
iru-gate-runner— both callers above always invoke this skill from inside airu-gate-runnersub-agent they spawn, not inline.
Source
SKILL.md on GitHub — the file this page was generated from.