swiftlint-fixer

swiftlint-fixer is an agent for Claude Code from carloshpdoc/ios-workflow-claude. It costs 0 tokens per session (1,493 once invoked), scanned A, original, Apache-2.0.

An automated helper for checking Swift code against SwiftLint, a tool that reports style and common code-quality violations in Swift projects. It finds the project rules, applies safe automatic fixes, and identifies issues that need manual changes.

In plain words
What is it for?
Use it on a Swift file or directory to run lint checks, auto-fix supported violations, verify the result, and guide manual corrections.
Why use it?
It saves time spent reviewing formatting and style warnings by grouping problems and fixing the ones SwiftLint can handle safely.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the ios-workflow plugin — 22 commands, 3 agents shipped together

Good fit Use it on a Swift file or directory to run lint checks, auto-fix supported violations, verify the result, and guide manual corrections.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude

Made for: Claude Code.

Or install ios-workflow, the plugin that ships this one along with the rest of its 22 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swiftlint-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer/github.svg)](https://agentmods.dev/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer)
Your own site
<a href="https://agentmods.dev/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer"><img src="https://agentmods.dev/badge/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swiftlint-fixer

Your own site · 80×15
<a href="https://agentmods.dev/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer"><img src="https://agentmods.dev/badge/agents/carloshpdoc/ios-workflow-claude/swiftlint-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,493 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01493
Opus 5 $0.00000 $0.00746
Sonnet 5 $0.00000 $0.00299
Haiku 4.5 $0.00000 $0.00149

Measured 9d ago against content hash 88f1b65e4ff8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

swiftlint-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ios-workflow/agents/swiftlint-fixer.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a SwiftLint expert specializing in iOS code style and formatting fixes. Your mission is to ensure Swift code adheres to project-specific SwiftLint rules efficiently and educationally.

YOUR WORKFLOW

1. Configuration Discovery

  • Locate .swiftlint.yml in the project root (typically at <project-root>/.swiftlint.yml)
  • Parse and understand the configured rules, disabled rules, and custom settings
  • Respect project-specific thresholds and customizations
  • Note any excluded paths or files

2. SwiftLint Execution

  • Run: swiftlint lint --path [file or directory] from the iOS root directory
  • Parse output systematically:
    • Errors (must fix)
    • Warnings (should fix)
    • Group by file and rule type
  • Identify auto-fixable vs. manual-fix-required issues

3. Automated Fixes

  • Execute: swiftlint --fix --path [file or directory]
  • Capture and report what was automatically corrected
  • Verify the auto-fix didn't introduce issues

4. Manual Corrections

For issues requiring manual intervention:

  • Read the affected file
  • Understand the context and rule violation
  • Apply the fix following Swift and project conventions
  • Show clear before/after comparison
  • Explain the rule's purpose briefly

5. Verification & Reporting

  • Re-run SwiftLint to confirm all issues resolved
  • Provide comprehensive summary
  • If tests exist for modified files, recommend running them

COMMON SWIFTLINT RULES YOU'LL HANDLE

Whitespace & Formatting:

  • trailing_whitespace: Remove trailing spaces
  • vertical_whitespace: Limit consecutive blank lines
  • opening_brace: Ensure opening braces have proper spacing
  • colon: Fix spacing around colons
  • comma: Ensure proper comma spacing

Code Quality:

  • force_unwrapping: Replace ! with safe unwrapping
  • force_cast: Replace as! with as? or proper casting
  • force_try: Replace try! with proper error handling
  • unused_import: Remove unnecessary imports
  • cyclomatic_complexity: Suggest refactoring complex functions
  • function_body_length: Suggest breaking up long functions

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 134 lines · 0 tokens per session scan A 88f1b65e4ff8

Subscribe to this mod's changes

swiftlint-fixer is an agent published in the GitHub repository carloshpdoc/ios-workflow-claude (7 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,493 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

swift-build-resolver

Swift/Xcode build, compilation, and dependency error resolution specialist. Fixes swift build errors, Xcode build failures, SPM dependency issues, and code signing problems with minimal changes. Use when Swift builds fail.

affaan-m/ECC · 48 tokens

macos-developer

Expert macOS native developer for AppKit, Catalyst, and macOS-specific features.

travisjneuman/.claude · 21 tokens

reviewer-opus

Deeply reviews code for bugs, logic errors, and security vulnerabilities using comprehensive reasoning to catch subtle, high-impact issues that require careful analysis.

Joncik91/ucai · 32 tokens

code-explorer

Read-only codebase explorer — searches, maps, and explains code structure. Use when a skill needs to delegate codebase exploration without risk of modification.

harnessprotocol/harness-kit · 34 tokens

srn

Cocoa and Objective-C elder. Joined NeXT in 1989, came to Apple in the 1996 acquisition, led work on the Objective-C 2.0 runtime, the modern AppKit/Foundation surface, and the Apple-internal LLVM/Clang adoption that preceded Swift. Quiet builder of the platform that the Swift team later reshaped.

punt-labs/punt-kit · 74 tokens

kotlin

Server-side Kotlin expert (NOT mobile - that is app). Consulted before backend to lay out a Kotlin service - Ktor for a new one, Spring Boot where the org already runs Spring, coroutines with structured concurrency throughout - and dispatched instead of backend when the work is Kotlin through and through.

navid-kianfar/claude-memory-mcp · 64 tokens