swift-build-resolver

swift-build-resolver is an agent for coding agents from hmj1026/dhpk. It costs 131 tokens per session (1,656 once invoked), scanned A, original, MIT.

A specialist for resolving failed Swift builds and dependency resolution. Swift is Apple's programming language; Xcode and Swift Package Manager are tools used to build Swift projects and manage their libraries.

In plain words
What is it for?
Diagnosing and fixing failures from swift build, xcodebuild, or Swift Package Manager, then rebuilding to check the result.
Why use it?
It traces compiler, package, concurrency, protocol, signing, and version errors to their underlying cause before changing code.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the dhpk plugin — 65 skills, 31 commands, 40 agents, 4 hooks shipped together

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.

agentmods
npx agentmods add agents/hmj1026/dhpk/swift-build-resolver
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 40 agents, 4 hooks.

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-build-resolver

README.md
[![agentmods](https://agentmods.dev/badge/agents/hmj1026/dhpk/swift-build-resolver.svg)](https://agentmods.dev/agents/hmj1026/dhpk/swift-build-resolver)
Your own site
<a href="https://agentmods.dev/agents/hmj1026/dhpk/swift-build-resolver"><img src="https://agentmods.dev/badge/agents/hmj1026/dhpk/swift-build-resolver.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 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,656 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00131 $0.01656
Opus 5 $0.00066 $0.00828
Sonnet 5 $0.00026 $0.00331
Haiku 4.5 $0.00013 $0.00166

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

Security

Grade A, and why

swift-build-resolver 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 5d 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.

agents/swift-build-resolver.md · 125 lines

How it starts

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

Swift Build Resolver

Get a broken Swift build green with surgical changes. Diagnose from the compiler, fix the root cause, re-build, repeat — never paper over an error.

Before applying a fix, gauge its blast radius with cx references --name X (or gitnexus_impact): if a type must become Sendable and it's captured across many call sites, prefer actor-wrapping over a local conformance. Optional external tools — fall back to Grep when absent. See ${CLAUDE_PLUGIN_ROOT}/rules/tool-routing.md.

Detect the build unit first: an *.xcodeproj/*.xcworkspace + scheme ⇒ xcodebuild; a Package.swiftswift build/swift test. A pure-logic SPM package builds in seconds on the host — prefer it over a simulator build when the failing code lives there.

When NOT

  • Python ruff / mypy / pytest toolchain failures → python-build-resolver
  • Rust / Cargo toolchain failures → rust-build-resolver

Diagnose

SwiftPM

swift build 2>&1
swift package resolve 2>&1
swift package show-dependencies 2>&1
swift package dump-package        # validate Package.swift syntax
cat Package.resolved | head -40   # pinned versions
swift --version                   # toolchain / language mode

Xcode

xcodebuild -list                                  # schemes / targets
xcrun simctl list devices available | head -20    # which simulators exist (names age each Xcode release)
xcodebuild -scheme <Scheme> -destination 'generic/platform=iOS Simulator' build 2>&1 | tail -60
xcodebuild -showBuildSettings 2>&1 | grep -E 'SWIFT_VERSION|SWIFT_STRICT_CONCURRENCY|CODE_SIGN|PRODUCT_BUNDLE_IDENTIFIER'

If a named-simulator destination is reported unavailable/ineligible, retry the build with generic/platform=iOS Simulator before assuming a code fault — the default device name may simply not be installed (see xcode-tooling module references/xcodebuild-spm.md).

Error → likely cause → fix

Compiler error (substring) Cause Surgical fix
cannot find type 'X' in scope Missing import or typo Add import <Module> / correct the name
value of type 'X' has no member 'Y' Wrong type / missing extension Fix the type or add the member
type 'X' does not conform to protocol 'Y' Missing requirement Implement the required member(s)
initializer requires that 'X' conform to 'Decodable' Missing Codable Add Codable / a custom init(from:)
expression is 'async' but is not marked with 'await' Missing await Add await at the call site
non-sendable type 'X' passed in implicitly async call Sendable violation Make X Sendable (value type / final + immutable), or move the boundary
actor-isolated property ... referenced from non-isolated context Isolation mismatch await it, mark the caller async, or nonisolated the member if truly safe
@MainActor function cannot be called from non-isolated context Main-actor hop await + make the caller async, or await MainActor.run { … }
reference to captured var 'X' in concurrently-executing code Mutable capture Capture a let copy, or move state into an actor
main actor-isolated ... can not be referenced from a Sendable closure Closure crosses isolation Hop with await MainActor.run, or restructure ownership
ambiguous use of 'X' Overload/shadowing Fully qualify or annotate the expected type
cannot assign to property: 'X' is a 'let' constant Mutating immutable let → var, or restructure to avoid mutation

Read the full file on GitHub · 125 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. 5d ago First seen · 125 lines · 131 tokens per session scan A a0c365b2e6d7

Subscribe to this mod's changes

swift-build-resolver is an agent published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 131 tokens to every session and 1,656 once invoked, about $0.0007 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-31.

Related

Other agents, from other repositories

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/prfaq · 74 tokens

kotlin-backend-engineer

Kotlin/Spring Boot specialist. Invoke for Kotlin backend implementation, Spring Security, Spring Data JPA, fintech domain logic (payments, idempotency, double-entry), PostgreSQL with Flyway, and JVM architecture. Returns idiomatic Kotlin code grounded in simplicity.

pranav8494/team-of-agents · 60 tokens

android-kotlin-expert

Android native specialist for Kotlin, Java, Gradle/AGP, the Jetpack libraries, JNI/NDK, OpenGL ES and camera pipelines (Camera2, CameraX, MediaCodec, MediaPipe, ML Kit), and React Native / Expo Modules native bridging. Use when the task touches android/ (.kt, .java, .gradle / .gradle.kts, AndroidManifest.xml…

simiancraft/simiancraft-skills · 276 tokens

kotlin-code-reviewer

Kotlin/Java code review specialist. Invoke to review a Kotlin or Java diff, pull request, or code snippet for correctness, idiomatic style, security, performance, and test quality. Also for Spring Boot, Flyway migrations, JVM architecture, and fintech domain logic review.

pranav8494/team-of-agents · 62 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

android-developer

Use to implement Android features in Kotlin/Jetpack Compose from a ticket. Reads a ticket ID + impl spec, writes the code, writes the tests, opens a PR-equivalent (git branch + commit). Multiple instances run in parallel on independent tickets.

vmobifystudio/app-dev-team · 55 tokens