Skip to main content
plugin

swift-lsp · msapps-mobile — Claude Code plugin: Swift analysis, setup

Adds SourceKit-LSP support to Claude Code for Swift diagnostics, symbol navigation, reference search, and type details without a build.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install swift-lsp@claude-community
Open on GitHub

What swift-lsp does

This plugin connects Claude Code to Apple’s SourceKit-LSP for live analysis of .swift files. Claude can inspect diagnostics, jump to declarations, locate symbol references, and retrieve type information.

SourceKit-LSP ships with Xcode. Run xcode-select --install, then confirm it is available with sourcekit-lsp --help. Swift analysis will not start without SourceKit-LSP installed.

The integration uses the LSP protocol and reacts to file changes. It performs read-only code analysis, with no credentials, network access, or file writes.

What it helps with

  • inspect diagnostics in .swift files
  • jump from a symbol to its declaration
  • locate every reference to a function or type
  • read type information without building the project

Example prompts for the agent

  • Check the current .swift file and report its diagnostics.
  • Show where this type is declared and jump to its definition.
  • Find every reference to this function and explain the related types.

How to install swift-lsp

Plugin marketplace

/plugin marketplace add anthropics/claude-plugins-community
/plugin install swift-lsp@claude-community

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about swift-lsp

How do I install swift-lsp in Claude Code?

First add the marketplace with /plugin marketplace add anthropics/claude-plugins-community, then install it using /plugin install swift-lsp@claude-community.

What does swift-lsp do?

It links Claude Code with SourceKit-LSP for .swift analysis. The plugin provides diagnostics, declaration navigation, reference lookup, and type information without a build step.

What is required for swift-lsp to work?

SourceKit-LSP must be available. It comes with Xcode; after xcode-select --install, verify it with sourcekit-lsp --help.

Source text

swift-lsp · MIT
# swift-lsp

Real-time Swift code intelligence for Claude via Apple's SourceKit-LSP.

## What it does

Gives Claude instant diagnostics, go-to-definition, find-references, and type information for `.swift` files — no build step required.

## Setup

1. **Install SourceKit-LSP** (ships with Xcode):
   ```bash
   xcode-select --install
   ```
   Or install the [Swift toolchain](https://swift.org/install) on Linux.

2. **Verify** it works:
   ```bash
   sourcekit-lsp --help
   ```

3. **Install the plugin**:
   ```
   claude plugin install swift-lsp@msapps-plugins
   ```

## SOSA Compliance

| Pillar       | Level |
|-------------|-------|
| Supervised  | Fully autonomous — read-only code analysis |
| Orchestrated | LSP protocol, automatic on file changes |
| Secured     | No credentials, no network, no file writes |
| Agents      | R=swift-code-intelligence, T=sourcekit-lsp |

**Impact:** Low | **SOSA Level:** 1

## License

MIT

© MSApps-Mobile · MIT · MSApps-Mobile/claude-plugins

Similar plugins

All plugins for Programming languages →

swift-lsp by other authors comes first.

From the same set24

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