swift-lint

swift-lint is an agent for Claude Code from sjungling/sjungling-claude-plugins. It costs 35 tokens per session (405 once invoked), scanned A, original, MIT.

A Swift code-formatting and linting tool that runs swift-format and checks for unused code with Periphery when available. Linting means finding code problems or style violations without running the program.

In plain words
What is it for?
Use it to format Swift code, detect unused code, review lint findings, and verify the result for part or all of a project.
Why use it?
It finds and fixes formatting and lint issues repeatedly until the selected Swift project or file is clean.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the swift-engineer plugin — 1 skill, 4 commands, 2 agents shipped together

Good fit Use it to format Swift code, detect unused code, review lint findings, and verify the result for part or all of a project.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sjungling/sjungling-claude-plugins/swift-lint
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/sjungling/sjungling-claude-plugins

Made for: Claude Code.

Or install swift-engineer, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 2 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 swift-lint

README.md
[![agentmods](https://agentmods.dev/badge/agents/sjungling/sjungling-claude-plugins/swift-lint/github.svg)](https://agentmods.dev/agents/sjungling/sjungling-claude-plugins/swift-lint)
Your own site
<a href="https://agentmods.dev/agents/sjungling/sjungling-claude-plugins/swift-lint"><img src="https://agentmods.dev/badge/agents/sjungling/sjungling-claude-plugins/swift-lint/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 swift-lint

Your own site · 80×15
<a href="https://agentmods.dev/agents/sjungling/sjungling-claude-plugins/swift-lint"><img src="https://agentmods.dev/badge/agents/sjungling/sjungling-claude-plugins/swift-lint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 405 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.00035 $0.00405
Opus 5 $0.00017 $0.00202
Sonnet 5 $0.00007 $0.00081
Haiku 4.5 $0.00003 $0.00040

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

Security

Grade A, and why

swift-lint 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 10d 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/swift-engineer/agents/swift-lint.md · 46 lines

What it actually says

Format and lint Swift code for the target project. The dispatching command will provide context including the plugin root path and target path.

Step 1: Run swift-lint.sh

Execute the helper script which handles periphery (auto-detected), formatting, and linting in a single invocation:

bash <plugin-root>/commands/references/swift-lint.sh [path] --periphery
  • Pass the target path (or . for the full project)
  • Always pass --periphery — the script automatically skips if periphery is not installed or the project lacks configuration
  • The <plugin-root> path will be provided by the dispatching command

The script outputs one JSON line per step with the structure: {"step": "...", "status": "...", "output": "..."}.

Step 2: Handle Results

Parse the JSON output from the script:

  1. periphery step (if run): Note any unused code findings
  2. format step: Note that formatting was applied in-place
  3. lint step:
    • If status is "clean" — done
    • If status is "issues" — read the flagged files, fix each lint issue using Edit, then re-verify by running:
      bash <plugin-root>/commands/references/swift-lint.sh [path] --lint-only
      
    • Repeat until lint is clean

Step 3: Report Summary

Provide a concise summary including:

  • Number of files formatted
  • Number of lint issues found and fixed
  • Any unused code findings from periphery
  • Whether lint is now clean
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. 10d ago First seen · 46 lines · 35 tokens per session scan A 982cff45e578

Subscribe to this mod's changes

swift-lint is an agent published in the GitHub repository sjungling/sjungling-claude-plugins (13 stars, last pushed 27d ago), licensed MIT. It adds 35 tokens to every session and 405 once invoked, about $0.0002 per session on Opus 5. 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-30.