Agent skill

Swift Diagnostics

by johnrogers in johnrogers/claude-swift-engineering

A skill your agent uses when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems…

MITAuto-check passedMobile

Install Swift Diagnostics

skills CLI
$ npx skills add johnrogers/claude-swift-engineering --skill swift-diagnostics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install johnrogers/claude-swift-engineering swift-diagnostics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/johnrogers/claude-swift-engineering.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/swift-engineering/skills/swift-diagnostics .claude/skills/swift-diagnostics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swift-diagnostics
GitHub stars
231
Token cost
~743 tokens
SKILL.md length
336 words
Files
6 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems…

  • Works in 5 steps: Identify symptom category - Navigation,… → Load the relevant reference - Each has… → Run mandatory first checks - Before… → …
  • Debugging NavigationStack issues (not responding
  • SKILL.md covers Reference Loading Guide, Core Workflow, Key Principle and Common Mistakes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swift Diagnostics is an agent skill from johnrogers/claude-swift-engineering. Use when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems (retain cycles, leaks, deinit not called). Systematic diagnostic workflows for iOS/macOS.

Its SKILL.md is about 740 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/build-issues.md`, `references/build-performance.md` and `references/memory.md`).

It sits in Mobile, covering iOS development and Debugging. It works with iOS, macOS and Xcode. The repository describes itself as: A collection of agents and skills to aid in the planning, implementation, documentation and testing of Swift/TCA code. The licence is MIT.

When your agent uses it

  • Debugging NavigationStack issues (not responding
  • Unexpected pops
  • Build failures (SPM resolution
  • Hanging builds)

Example prompts

  • “No such module”
  • “/swift-diagnostics”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify symptom category - Navigation, build, memory, or performance
  2. Load the relevant reference - Each has diagnostic decision trees
  3. Run mandatory first checks - Before changing any code
  4. Follow the decision tree - Reach diagnosis in 2-5 minutes
  5. Apply fix and verify - One fix at a time, test each

What it can do on your machine

Read from SKILL.md and the folder at commit 1dc2cf4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swift Diagnostics loads about 743 tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 336 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~743
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from johnrogers/claude-swift-engineering at commit 1dc2cf4, republished under its MIT licence (© johnrogers). 336 words, ~743 tokens.

Download SKILL.mdSave it as .claude/skills/swift-diagnostics/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
swift-diagnostics
description
Use when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems (retain cycles, leaks, deinit not called). Systematic diagnostic workflows for iOS/macOS.

Swift Diagnostics

Systematic debugging workflows for iOS/macOS development. These patterns help identify root causes in minutes rather than hours by following structured diagnostic approaches.

Reference Loading Guide

ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.

ReferenceLoad When
NavigationNavigationStack not responding, unexpected pops, deep link failures
Build IssuesSPM resolution, "No such module", dependency conflicts
MemoryRetain cycles, memory growth, deinit not called
Build PerformanceSlow builds, Derived Data issues, Xcode hangs
Xcode DebuggingLLDB commands, breakpoints, view debugging

Core Workflow

  1. Identify symptom category - Navigation, build, memory, or performance
  2. Load the relevant reference - Each has diagnostic decision trees
  3. Run mandatory first checks - Before changing any code
  4. Follow the decision tree - Reach diagnosis in 2-5 minutes
  5. Apply fix and verify - One fix at a time, test each

Key Principle

80% of "mysterious" issues stem from predictable patterns:

  • Navigation: Path state management or destination placement
  • Build: Stale caches or dependency resolution
  • Memory: Timer/observer leaks or closure captures
  • Performance: Environment problems, not code bugs

Diagnose systematically. Never guess.

Common Mistakes

  1. Skipping mandatory first checks — Jumping straight to code changes before running diagnostics (clean build, restart simulator, restart Xcode) means you'll chase ghosts. Always start with the mandatory checks.

  2. Changing multiple things at once — "Let me delete DerivedData AND restart simulator AND kill Xcode" means you can't isolate which fix actually worked. Change one variable at a time.

  3. Assuming you know the cause — "NavigationStack stopped working, must be my reducer" — actually it was stale DerivedData. Diagnostic trees prevent assumptions. Follow the tree, don't guess.

  4. Missing memory basics — Calling deinit not being called is a retain cycle, but beginners often blame architecture. Use Instruments to verify leaks before refactoring. Data, not intuition.

  5. Not isolating the problem — Testing with your whole app complicates diagnosis. Create a minimal reproducible example with just the problematic feature. Isolation reveals root causes.

© johnrogers, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in plugins/swift-engineering/skills/swift-diagnostics of johnrogers/claude-swift-engineering.

  • SKILL.md
  • references/build-issues.md
  • references/build-performance.md
  • references/memory.md
  • references/navigation.md
  • references/xcode-debugging.md

Open the folder on GitHubat commit 1dc2cf4

Compare with similar skills

Swift Diagnostics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swift Diagnostics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift Diagnostics this skilljohnrogers/claude-swift-engineering231—~743Automated safety check: PassMIT
Apple Crash Log .NET Symbolicationdotnet/skills5.6k1 repos~2.4kAutomated safety check: PassMIT
Orca iOS Simulator Controlstablyai/orca87k1 repos~584Automated safety check: PassApache-2.0
Macios Xcode Beta Updatedotnet/macios2.9k—~1.8kAutomated safety check: PassCustom licence
OdevioOdevio/Odevio-CLI423—~7.6kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill210—~2.8kAutomated safety check: PassMIT

Similar skills

  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    87k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • Official

    Update dotnet/macios to a new Xcode beta and validate it end-to-end.

    2.9k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Odevio

    Odevio/Odevio-CLI

    Take a Flutter project to an iPhone or the App Store with Odevio - build, sign and publish iOS apps from Windows, Linux or macOS with no Mac and no Xcode.

    423 GitHub stars~7.6k tokensUpdated 14 days ago
    MobileAuto-check passed
  • SwiftUI Design Skill

    Wholiver/swiftui-design-skill

    Guides the agent to design distinctive SwiftUI interfaces for iOS and macOS, with six anti-generic rules, a design direction workflow and a five-dimension review.

    210 GitHub stars~2.8k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Xcode Build

    pzep1/xcode-build-skill

    Build and run iOS/macOS apps using xcodebuild and xcrun simctl directly.

    138 GitHub stars~1.5k tokensUpdated 8 mo ago
    MobileAuto-check: notes

More from johnrogers/claude-swift-engineering

All 17 skills in this repo
  • Localization

    johnrogers/claude-swift-engineering

    A skill your agent uses when implementing internationalization (i18n), String Catalogs, pluralization, or right-to-left layout support.

    231 GitHub stars~749 tokensUpdated 8 mo ago
    Auto-check passed
  • Storekit

    johnrogers/claude-swift-engineering

    A skill your agent uses when implementing in-app purchases, StoreKit 2 subscriptions, consumables, non-consumables, or transaction handling.

    231 GitHub stars~799 tokensUpdated 8 mo ago
    Auto-check passed
  • Swift Style

    johnrogers/claude-swift-engineering

    Swift code style conventions for clean, readable code. An agent skill from johnrogers/claude-swift-engineering.

    231 GitHub stars~828 tokensUpdated 8 mo ago
    Auto-check passed
  • Composable Architecture

    johnrogers/claude-swift-engineering

    A skill your agent uses when building features with TCA (The Composable Architecture), structuring reducers, managing state, handling effects, navigation, or testing TCA features.

    231 GitHub stars~982 tokensUpdated 8 mo ago
    Auto-check passed
  • Foundation Models

    johnrogers/claude-swift-engineering

    A skill your agent uses when implementing on-device AI with Apple's Foundation Models framework (iOS 26+), building summarization/extraction/classification features, or using @Generable for…

    231 GitHub stars~869 tokensUpdated 8 mo ago
    Auto-check passed
  • Grdb

    johnrogers/claude-swift-engineering

    A skill your agent uses when writing raw SQL with GRDB, complex joins across 4+ tables, window functions, ValueObservation for reactive queries, or dropping down from SQLiteData for performance.

    231 GitHub stars~719 tokensUpdated 8 mo ago
    Auto-check passed

Works with

Categories

Questions about Swift Diagnostics

What does Swift Diagnostics do?

A skill your agent uses when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems…. Swift Diagnostics is an agent skill from johnrogers/claude-swift-engineering. Use when debugging NavigationStack issues (not responding, unexpected pops, crashes), build failures (SPM resolution, "No such module", hanging builds), or memory problems (retain cycles, leaks, deinit not called).

When should I use Swift Diagnostics?

Swift Diagnostics fits situations like: debugging NavigationStack issues (not responding; unexpected pops; build failures (SPM resolution; hanging builds).

How do I install Swift Diagnostics in Claude Code?

Run `npx skills add johnrogers/claude-swift-engineering --skill swift-diagnostics -a claude-code`. Or copy the skill folder (plugins/swift-engineering/skills/swift-diagnostics in johnrogers/claude-swift-engineering) into .claude/skills/swift-diagnostics in your project. Claude Code loads it when a task matches its description.

How do I install Swift Diagnostics in Codex?

Run `npx skills add johnrogers/claude-swift-engineering --skill swift-diagnostics -a codex`. Or copy the skill folder (plugins/swift-engineering/skills/swift-diagnostics in johnrogers/claude-swift-engineering) into .agents/skills/swift-diagnostics in your project. Codex loads it when a task matches its description.

Can I use Swift Diagnostics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add johnrogers/claude-swift-engineering --skill swift-diagnostics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-diagnostics, .gemini/skills/swift-diagnostics, .github/skills/swift-diagnostics and .opencode/skills/swift-diagnostics in your project.

What does Swift Diagnostics need to run?

SKILL.md names no scripts, command-line tools or credentials: Swift Diagnostics is instructions for the agent only.

Does Swift Diagnostics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swift Diagnostics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swift Diagnostics use?

Swift Diagnostics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift Diagnostics use?

About 743 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.1k tokens, read only when the agent opens those files.

What are the alternatives to Swift Diagnostics?

Skills that share tags, products or a category with Swift Diagnostics: Apple Crash Log .NET Symbolication (dotnet/skills, 5.6k stars), Orca iOS Simulator Control (stablyai/orca, 87k stars), Macios Xcode Beta Update (dotnet/macios, 2.9k stars) and Odevio (Odevio/Odevio-CLI, 423 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift Diagnostics?

johnrogers (a GitHub user) maintains it in johnrogers/claude-swift-engineering, which has 231 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on January 18, 2026.

Source: johnrogers/claude-swift-engineering on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.