dpearson2699/swift-ios-skills / skills/swiftlint
swiftlint
VerifiedConfigures and enforces SwiftLint in Swift projects using build tool plugins, run scripts, and CI. Covers .swiftlint.yml configuration, disabled_rules, opt_in_rules, only_rules, analyzer_rules, baselines, autocorrect, swiftlint:disable suppressions, reporter formats (sarif, json, checkstyle), strict and lenient modes, SwiftLintBuildToolPlugin via SimplyDanny/SwiftLintPlugins, swift package plugin swiftlint, Xcode run script phases, CI integration, multiple configuration files, and rollout strategies for existing codebases. Use when setting up SwiftLint, configuring lint rules, suppressing warnings, creating baselines, choosing between build tool plugin and run script, or integrating SwiftLint into CI.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.9 KB |
| evals/evals.json | config | 3.9 KB |
| references/adoption-and-configuration.md | markdown | 9.3 KB |
| references/custom-rules-and-analyze.md | markdown | 6.3 KB |
| references/plugins-run-scripts-and-integrations.md | markdown | 10.3 KB |
| references/rule-reference.md | markdown | 7.1 KB |
| references/rules-suppressions-and-baselines.md | markdown | 11.3 KB |
evals/evals.json
View on GitHub{
"skill_name": "swiftlint",
"evals": [
{
"id": 0,
"name": "plugin-setup-ci",
"prompt": "Set up SwiftLint for a new iOS app that has a SwiftPM `Package.swift` and Xcode targets. The team wants local linting on builds, a pinned SwiftLint version, GitHub Actions output that can be uploaded as SARIF, and guidance for unattended CI builds. Give a concise setup plan with the key snippets and warnings.",
"expected_output": "A SwiftLint setup plan that defaults to the SwiftLintPlugins build tool plugin, pins the package version, applies the plugin per target, notes Xcode plugin trust and unattended validation risk, and uses a direct SwiftLint CLI/SARIF step in CI.",
"files": [],
"assertions": [
"Uses `https://github.com/SimplyDanny/SwiftLintPlugins` and `SwiftLintBuildToolPlugin` as the default local integration.",
"Says the plugin dependency should be pinned or reviewed rather than floating implicitly.",
"Applies the build tool plugin to each target that should be linted.",
"Mentions the Xcode trust prompt and warns that `-skipPackagePluginValidation` / `-skipMacroValidation` bypass validation and should be limited to trusted CI dependencies.",
"Uses a direct CI command such as `swiftlint --strict --reporter sarif > swiftlint.sarif` plus SARIF upload rather than trying to use the build tool plugin for CI-only reporting."
]
},
{
"id": 1,
"name": "baseline-suppression-rollout",
"prompt": "We are adopting SwiftLint in a large existing Swift app with thousands of current violations. Propose a rollout plan that lets CI fail only on new violations, explains how to handle intentional exceptions in code, and says how test code should be treated. Include the relevant `.swiftlint.yml` or command snippets.",
"expected_output": "An incremental adoption plan using baselines, strict CI with baseline filtering, targeted inline suppressions with reasons, generated-code exclusions, and child test configuration rather than excluding tests entirely.",
"files": [],
"assertions": [
"Creates a baseline with `swiftlint --write-baseline` or `write_baseline` and commits it for incremental adoption.",
"Runs CI with `--baseline` and `--strict` or equivalent config so only new violations fail.",
"Recommends targeted `swiftlint:disable` suppressions with reasons instead of blanket `all` suppressions.",
"Prefers config-level `excluded` paths for generated or vendored code.",
"Recommends a relaxed child `.swiftlint.yml` for tests instead of excluding the whole test suite."
]
},
{
"id": 2,
"name": "sibling-boundary-routing",
"prompt": "I need help with three cleanup tasks in a Swift package: choose better public API names for `func fetchDataWithId(_ id: String)`, decide whether `some` or `any` is right for a return type, and configure SwiftLint to enforce identifier naming and sorted imports. Which skill should own each part? Keep the answer short and give only minimal examples.",
"expected_output": "A boundary-aware routing answer that sends API naming to swift-api-design-guidelines, type-system `some`/`any` guidance to swift-language, and lint rule configuration to swiftlint with a minimal configuration snippet.",
"files": [],
"assertions": [
"Routes public API naming and argument-label clarity to `swift-api-design-guidelines`.",
"Routes `some` vs `any` protocol type-system guidance to `swift-language`.",
"Routes SwiftLint identifier naming and sorted imports configuration to `swiftlint`.",
"Provides only a minimal SwiftLint snippet, such as `identifier_name` and `opt_in_rules: sorted_imports`, without turning the answer into a full lint setup guide.",
"Does not collapse Swift language or API design guidance into the SwiftLint skill."
]
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |