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 skills/avdlee/xcode-build-optimization-agent-skill/spm-build-analysisnpx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill spm-build-analysisgit clone --depth 1 https://github.com/AvdLee/Xcode-Build-Optimization-Agent-SkillWrote 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/skills/avdlee/xcode-build-optimization-agent-skill/spm-build-analysis)<a href="https://agentmods.dev/skills/avdlee/xcode-build-optimization-agent-skill/spm-build-analysis"><img src="https://agentmods.dev/badge/skills/avdlee/xcode-build-optimization-agent-skill/spm-build-analysis.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 | $0.00087 | $0.01196 |
| Opus 5 | $0.00044 | $0.00598 |
| Sonnet 5 | $0.00017 | $0.00239 |
| Haiku 4.5 | $0.00009 | $0.00120 |
Grade A, and why
spm-build-analysis 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 4d 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.
Copies of this mod
3 near-identical copies found in the catalogue:
- spm-build-analysis — 100% identical, 0 lines differ
- spm-build-analysis — 100% identical, 0 lines differ
- spm-build-analysis — 100% identical, 2 lines differ
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SPM Build Analysis
Use this skill when package structure, plugins, or dependency configuration are likely contributing to slow Xcode builds.
Core Rules
- Treat package analysis as evidence gathering first, not a mandate to replace dependencies.
- Separate package-graph issues from project-setting issues.
- Do not rewrite package manifests or dependency sources without explicit approval.
What To Inspect
Package.swiftandPackage.resolved- local packages vs remote packages
- package plugin and build-tool usage
- binary target footprint
- dependency layering, repeated imports, and potential cycles
- build logs or timing summaries that show package-related work
Verification Before Recommending
Before including any local package in a recommendation, verify that it is actually part of the project's dependency graph. A Vendor/ directory may contain packages that are not linked to any target.
- Check
project.pbxprojforXCLocalSwiftPackageReferenceentries that reference the package path. - Check
XCSwiftPackageProductDependencyentries to confirm the package's product is linked to at least one target. - If a local package exists on disk but is not referenced in the project, do not include it in build-time recommendations.
When recommending version pins for branch-tracked dependencies:
- Use the helper script to scan all branch-pinned dependencies at once:
This checkspython3 scripts/check_spm_pins.py --project App.xcodeprojgit ls-remote --tagsfor each branch-pinned package and reports which have tags available for pinning. - If no tags exist, recommend pinning to a specific commit revision hash for determinism instead.
- Note which packages are branch-pinned because the upstream simply has no tags, versus packages that have tags but are intentionally tracking a branch.
Focus Areas
- package graph shape and how much work changes trigger downstream
- plugin overhead during local development and CI
- checkout or fetch cost signals that show up in clean environments
- configuration drift that forces duplicate module builds
- risks from package targets that use different macros or options while sharing dependencies
- dependency direction violations (features depending on each other instead of shared lower layers)
- circular dependencies between modules (extract shared contracts into a protocol module)
- oversized modules (200+ files) that widen incremental rebuild scope
- umbrella modules using
@_exported importthat create hidden dependency chains - missing interface/implementation separation that blocks build parallelism
- test targets depending on the app target instead of the module under test
- Swift macro rebuild cascading: heavy use of Swift macros (e.g., TCA, swift-syntax-based libraries) can cause a trivial source change to cascade into near-full rebuilds because macro expansion invalidates downstream modules
swift-syntaxbuilding universally (all architectures) when no prebuilt binary is available, adding significant clean-build overhead- multi-platform build multiplication: adding a secondary platform target (e.g., watchOS) can cause shared SPM packages to build multiple times (e.g., iOS arm64, iOS x86_64, watchOS arm64), multiplying
SwiftCompile,SwiftEmitModule, andScanDependenciestasks
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 93 lines · 87 tokens per session scan A 4ac9f10fac0e
spm-build-analysis is a skill published in the GitHub repository AvdLee/Xcode-Build-Optimization-Agent-Skill (1,212 stars, last pushed 22d ago), licensed MIT. It adds 87 tokens to every session and 1,196 once invoked, about $0.0004 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-30.
Other skills, from other repositories
ios-design-agent-skill
Audit and improve iOS/SwiftUI app aesthetics — typography, color, spatial composition, motion, and atmospheric depth. Use when reviewing UI design, critiquing screenshots, or improving SwiftUI view code beyond functional correctness.
serve-sim
Control and stream a running iOS, iPad, or Apple Watch Simulator with npx serve-sim. Use for simulator preview, taps, gestures, hardware buttons, rotation, camera injection, permissions, accessibility, and CoreAnimation debug.
app-implement-feature
Guide for implementing features in baguette — a Swift CLI + WebSocket server that drives iOS simulators via private SimulatorKit. Use this skill when: (1) Adding a new gesture, button, keyboard surface, stream format, or device-chrome behaviour (anything that lands across Domain / Infrastructure / App +…
baguette
Drive iOS simulators programmatically via the baguette CLI — taps, swipes, multi-finger gestures, hardware buttons (Home / Lock / Volume / Action / Power), ASCII keyboard text, and frame capture, all without opening Xcode. Use when: (1) an agent needs to drive a booted iOS simulator from a script — tap a coordinate…
mobile-automation
Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.
serve-sim-placeholder-assets
Audit and update serve-sim's Device Hub-style simulator placeholder assets from local Xcode/CoreTypes resources. Use after installing a new Xcode or macOS seed, or when iPhone, iPad, Watch, or Vision placeholder previews look wrong.