Skip to main content
skill CX Codex

swiftlint — Claude Code skill: setup and install

Sets up SwiftLint for Swift projects, covering rules, suppressions, baselines and CI checks. Use it when adding linting to a build or bringing existing code under review.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill swiftlint -a claude-code
Open on GitHub

What swiftlint does

This skill guides SwiftLint setup through .swiftlint.yml, including rule selection, disabled_rules, opt_in_rules, only_rules, severity modes and report formats. It covers autocorrect, focused swiftlint:disable comments, and path exclusions for generated code.

For SwiftPM targets, it describes SwiftLintBuildToolPlugin from SimplyDanny/SwiftLintPlugins, which runs linting on every build. Xcode projects without Package.swift can add the package dependency and enable the plugin through Build Phases or the trust dialog. That is the preferred route here because it avoids a separate run script.

For an established codebase, the skill explains how to write a baseline for current violations and keep new ones out through CI. It also covers the difference between strict and lenient, plus analyzer_rules for checks that need compiler logs via swiftlint analyze.

What it helps with

  • configure .swiftlint.yml for a Swift project
  • attach SwiftLint to a SwiftPM build target
  • create a baseline for existing violations
  • suppress a rule on a line or code region
  • produce lint output in sarif format

Example prompts for the agent

  • "Configure SwiftLint with .swiftlint.yml and add the rules we need."
  • "Add SwiftLintBuildToolPlugin to the target in Package.swift."
  • "Create a baseline for current violations and set up the CI check."

How to install swiftlint

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill swiftlint -a claude-code

2Manually: put the files in place

~/.claude/skills/swiftlint/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swiftlint/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swiftlint

How do I install swiftlint in Claude Code?

Run the listed commands in order: npx skills add dpearson2699/swift-ios-skills --skill swiftlint -a claude-code, then npx skills add dpearson2699/swift-ios-skills --skill swiftlint -a claude-code. The skill file is located at ~/.claude/skills/swiftlint/SKILL.md.

What does the swiftlint skill do?

It helps configure SwiftLint rules, autocorrection, suppressions, baselines and CI checks. It also covers build tool plugin and Xcode run script integration.

How do multiple .swiftlint.yml files work?

SwiftLint can merge the main configuration with the nearest nested .swiftlint.yml for each file. Passing --config turns off automatic nested configuration discovery.

Similar skills

Everything for Mobile →

From the same set86

app-store-optimization Structures App Store Connect metadata to improve organic search ranking and download conversion. It balances keywords across titles, subtitles, and the indexed keyword field. CX Codex +1 2,900installs tabletopkit Guides work on visionOS spatial board games using TabletopKit, including game pieces, turns, participant sync, and RealityKit rendering. CX Codex +1 2,900installs swift-api-design-guidelines Applies Apple's official Swift API Design Guidelines to codebases. It guides argument labels, naming conventions for mutating methods, and structured documentation comments. CX Codex +1 2,800installs core-data A skill for Core Data work in apps that have not moved to SwiftData: stack setup, concurrency, batch operations and migrations. CX Codex +1 2,700installs swift-formatstyle Teaches AI assistants to replace legacy Formatter subclasses with Foundation FormatStyle in Swift and SwiftUI. Useful for locale-safe numbers, dates, and currencies. CX Codex +1 2,700installs focus-engine An AI-coding skill for focus handling in SwiftUI and UIKit: keyboard and directional movement, scene values, restoration after presentation changes. Useful when Siri Remote or Tab navigation lands on the wrong control. CX Codex +1 2,600installs ios-ettrace-performance This skill guides a focused iOS ETTrace capture from matching dSYMs to per-thread analysis. Use it when comparing a repeatable launch or runtime flow. CX Codex +1 1,200installs ios-memgraph-analysis A skill for reading iOS .memgraph files: it separates unreachable leaks from reachable heap growth and keeps the raw tool output. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor