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.
npx agentmods add agents/hmj1026/dhpk/swift-build-resolvergit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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.
[](https://agentmods.dev/agents/hmj1026/dhpk/swift-build-resolver)<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>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.
| Model | Per session | Once 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 |
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.
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(orgitnexus_impact): if a type must becomeSendableand it's captured across many call sites, prefer actor-wrapping over a local conformance. Optional external tools — fall back toGrepwhen absent. See${CLAUDE_PLUGIN_ROOT}/rules/tool-routing.md.Detect the build unit first: an
*.xcodeproj/*.xcworkspace+ scheme ⇒xcodebuild; aPackage.swift⇒swift 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 |
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.
- 5d ago First seen · 125 lines · 131 tokens per session scan A a0c365b2e6d7
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.
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.
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.
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…
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.
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.
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.