swift-lsp

swift-lsp is a skill for Claude Code from MSApps-Mobile/claude-plugins. It costs 73 tokens per session (623 once invoked), scanned B, original, MIT.

A read-only connection to SourceKit-LSP, Apple's language server for understanding Swift code. It provides errors and warnings, symbol navigation, references, and type information while files change.

In plain words
What is it for?
Use it when editing Swift for iOS or macOS to check diagnostics, jump to definitions, find references, and inspect types.
Why use it?
It gives the agent current code information for Swift projects, making it easier to notice errors and understand how code is connected.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swift-lsp plugin — 1 skill shipped together

Good fit Use it when editing Swift for iOS or macOS to check diagnostics, jump to definitions, find references, and inspect types.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/msapps-mobile/claude-plugins/swift-lsp
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.

Any agent
npx skills add MSApps-Mobile/claude-plugins --skill swift-lsp
Clone the repo
git clone --depth 1 https://github.com/MSApps-Mobile/claude-plugins

Made for: Claude Code.

Or install swift-lsp, the plugin that ships this one along with the rest of its 1 skill.

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-lsp

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/msapps-mobile/claude-plugins/swift-lsp"><img src="https://agentmods.dev/badge/skills/msapps-mobile/claude-plugins/swift-lsp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00073 $0.00623
Opus 5.5 $0.00029 $0.00249
Sonnet 5.5 $0.00015 $0.00125
Haiku 4.5 $0.00007 $0.00062

Measured 1mo ago against content hash eba68d280488, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

swift-lsp scanned grade B with 1 finding 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp /usr/local/bin/sourcekit-lsp
plugins/swift-lsp/skills/swift-lsp/SKILL.md · 77 lines

How it starts

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

Swift LSP — SourceKit-LSP Integration

Role and Purpose

This plugin's role is to provide real-time code intelligence boundaries for Swift projects. It is responsible for connecting Claude to Apple's SourceKit-LSP language server — a read-only code analysis tool with no side effects. Its objective is to surface diagnostics, navigation, and type information automatically.

Workflow

Step 1 — Plan Phase

Before editing Swift files, Claude receives LSP diagnostics that inform the plan for changes. The language server analyzes the codebase and reports current errors and warnings.

Step 2 — Act Phase

When Claude writes or edits .swift files, the LSP server processes changes and returns updated diagnostics in structured JSON output via the LSP protocol.

Step 3 — Verify Phase

After each edit, Claude reviews the LSP diagnostics to confirm the change didn't introduce regressions. If errors appear, Claude uses the fallback of reverting or correcting the edit — a fail-safe error handling procedure.

Confirmation Policy

This plugin requires no human confirmation or approval gates because it is a purely read-only analysis tool — it cannot modify files, make network calls, or produce any side effects. All actions are autonomous and safe by design.

Prerequisites

SourceKit-LSP ships with Xcode and the Swift toolchain:

  1. Xcode (macOS): xcode-select --install — SourceKit-LSP is included
  2. Swift toolchain (Linux/macOS): Download from swift.org/install

Verify the tool integration is available:

sourcekit-lsp --help

If command not found, add it to your PATH:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp /usr/local/bin/sourcekit-lsp

Supported File Types

Extension Language ID
.swift swift

Troubleshooting

  • "Executable not found in $PATH" — Install Xcode or the Swift toolchain, then verify sourcekit-lsp --help works
  • No diagnostics appearing — Ensure the project has a Package.swift or .xcodeproj so SourceKit-LSP can resolve dependencies
  • Slow startup — First launch indexes the project; subsequent sessions are faster. Escalation: restart the LSP server if it hangs.

Read the full file on GitHub · 77 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. 1mo ago First seen · 77 lines · 73 tokens per session scan B eba68d280488

Subscribe to this mod's changes

swift-lsp is a skill published in the GitHub repository MSApps-Mobile/claude-plugins (9 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 623 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

Other skills, from other repositories

swift-concurrency-expert

Swift concurrency review/fix: compiler errors, Sendable, isolation, remediation.

steipete/agent-scripts · 22 tokens

axiom-analyze-swift-performance

Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns, and generic specialization.

CharlesWiltgen/Axiom · 34 tokens

kotlin-tooling-native-build-performance

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS. Use when the user reports slow iOS or shared-framework builds, long linkDebug/linkRelease or XCFramework tasks, cold CI builds that re-download the Kotlin/Native toolchain, KSP or other generated code on…

Kotlin/kotlin-agent-skills · 96 tokens

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…

AvdLee/Xcode-Build-Optimization-Agent-Skill · 74 tokens

kotlin-coroutines-skill

Load, when a developer writes, reviews, or debugs Kotlin coroutine code and needs help spotting concurrency bugs — GlobalScope leaks, runBlocking in suspend, missing Flow catch, hardcoded or wrong dispatchers, unhandled timeouts, cancellation and structured-concurrency mistakes — or asks how to make async Kotlin…

santimattius/structured-coroutines · 71 tokens

kmp-architecture-footguns

Kotlin Multiplatform structure and language traps: module splits, expect/actual, Koin and ViewModel scoping, layers, version catalogs, erased overloads, Char and string-resource formatting limits. Use when shaping modules or DI, when a format specifier renders verbatim, or code misbehaves on one platform.

maxrave-dev/kotlin-footguns · 73 tokens