Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Swiftlint

ASecurity

Configure and enforce SwiftLint through build-tool plugins, Xcode scripts, Swift Package plugins, or CI. Use for rule configuration, suppressions, baselines, autocorrection, reporters, strictness, multi-config setups, and staged rollout in existing Swift projects.

3 stars
0 votes
0 copies
0 views
Added 9/28/2026
developmentgoswiftbashcode-reviewgitapidocumentation

Works with

api

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add thiennc-tesoglobal/ios-skills --skill swiftlint --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swiftlint?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Swiftlint
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thiennc-tesoglobal-swiftlint/badge)](https://www.skillsdirectory.com/skills/thiennc-tesoglobal-swiftlint)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: swiftlint
description: "Configure and enforce SwiftLint through build-tool plugins, Xcode scripts, Swift Package plugins, or CI. Use for rule configuration, suppressions, baselines, autocorrection, reporters, strictness, multi-config setups, and staged rollout in existing Swift projects."
---

# SwiftLint

Enforce Swift style, formatting, and conventions using SwiftLint. Covers build-tool plugins, `.swiftlint.yml` configuration, staged rollouts, baselines, and CI integration.

> **Scope Boundary:** SwiftLint is a linting and style enforcement tool. For underlying API naming, conventions, and architectural rules, see `swift-api-design-guidelines` and `swift-code-review`.

## Contents

- [Recommended Setup (Build Tool Plugin)](#recommended-setup-build-tool-plugin)
- [Configuration (.swiftlint.yml)](#configuration-swiftlintyml)
- [Rule Selection & Rollout](#rule-selection--rollout)
- [Suppressions & Baselines](#suppressions--baselines)
- [Autocorrect & CI Pipeline](#autocorrect--ci-pipeline)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Recommended Setup (Build Tool Plugin)

Prefer the build tool plugin from `SimplyDanny/SwiftLintPlugins` for Xcode projects and Swift Packages. It avoids global machine installs and runs automatically during target compilation:

```swift
// Package.swift
dependencies: [
    .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.58.0")
],
targets: [
    .target(
        name: "MyFeature",
        plugins: [
            .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
        ]
    )
]
```

## Configuration (.swiftlint.yml)

Place `.swiftlint.yml` in the project root:

```yaml
included:
  - Sources
  - Tests

excluded:
  - Pods
  - .build
  - DerivedData

opt_in_rules:
  - empty_count
  - missing_docs
  - fatal_error_message

disabled_rules:
  - line_length
  - todo

line_length:
  warning: 120
  error: 160
```

## Rule Selection & Rollout

Adopt rules incrementally in existing codebases:
1. Start with high-confidence default rules; disable noisy formatting rules initially.
2. Fix autocorrectable violations with `swiftlint --fix`.
3. Introduce stricter opt-in rules team-by-team.

## Suppressions & Baselines

Suppress legitimate exceptions in code:

```swift
// swiftlint:disable:next force_cast
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") as! CustomCell

// Entire block suppression
// swiftlint:disable cyclomatic_complexity
func complexAlgorithm() { ... }
// swiftlint:enable cyclomatic_complexity
```

For legacy codebases, capture existing violations into a baseline to prevent regressions without blocking existing files: `swiftlint analyze --compiler-log-path xcodebuild.log`.

## Autocorrect & CI Pipeline

Run in CI before running unit tests:

```bash
# Lint with strict error exit codes
swiftlint --strict --reporter github-actions-logging

# Automatically fix whitespace and mechanical violations locally
swiftlint --fix
```

## Common Mistakes

- **Enabling all opt-in rules at once**: Overwhelms teams with thousands of warnings. Enable rules iteratively.
- **Global Homebrew dependency without version pinning**: Causes divergent lint errors across different team machines. Use Swift Package plugins or pin tool versions.
- **Not excluding build and dependency directories**: Linting `Pods/` or `.build/` dramatically slows down compilation.
- **Overusing broad inline suppressions**: Prefer `// swiftlint:disable:next rule_id` over disabling rules for entire files.
- **Running autocorrect in CI without automated commit**: Autocorrect should run locally pre-commit; CI should verify with `--strict`.

## Review Checklist

- [ ] SwiftLint version pinned across developer environments
- [ ] `.swiftlint.yml` excludes derived data and third-party dependencies
- [ ] Build tool plugin configured on active app and framework targets
- [ ] Suppressions target specific rules and are scoped narrowly
- [ ] CI pipeline fails on lint errors via `--strict`

## References

- [Adoption and configuration](references/adoption-and-configuration.md)
- [Plugins and run scripts](references/plugins-run-scripts-and-integrations.md)
- [Rules, suppressions, and baselines](references/rules-suppressions-and-baselines.md)
- [Rule reference index](references/rule-reference.md)
- [Custom rules and analyze](references/custom-rules-and-analyze.md)
- [Official SwiftLint Documentation](https://realm.github.io/SwiftLint/)
- [SwiftLint Rule Directory](https://realm.github.io/SwiftLint/rule-directory.html)
- [SimplyDanny/SwiftLintPlugins](https://github.com/SimplyDanny/SwiftLintPlugins)

Attribution

thiennc-tesoglobalthiennc-tesoglobal
View sourceMore from thiennc-tesoglobal →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →