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 skills add laxrajpurohit/swift-skills-pro --skill swift-performance-progit clone --depth 1 https://github.com/laxrajpurohit/swift-skills-proWrote 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/laxrajpurohit/swift-skills-pro/swift-performance-pro)<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-performance-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-performance-pro/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-performance-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-performance-pro.svg" alt="Reviewed on agentmods" width="80" 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.00031 | $0.00713 |
| Opus 5 | $0.00015 | $0.00357 |
| Sonnet 5 | $0.00006 | $0.00143 |
| Haiku 4.5 | $0.00003 | $0.00071 |
Grade A, and why
swift-performance-pro 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 11d 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Performance Pro
Find and fix performance problems with evidence, not guesses. Measure first.
When to use
- Janky scrolling, slow launch, high memory, or battery drain.
- Reviewing code for performance regressions.
- Planning an Instruments session.
Trigger: /swift-performance-pro.
Core principles
- Measure before optimizing — use Instruments (Time Profiler, Allocations, SwiftUI, Leaks), not intuition.
- Keep SwiftUI
bodycheap and pure; recomputation is frequent. - Do heavy work off the main actor.
- Don't optimize what you haven't proven is hot.
SwiftUI render cost
Keep body free of side effects and heavy compute.
❌ Sorting on every render
var body: some View {
List(items.sorted { $0.date > $1.date }) { Row($0) } // re-sorts each pass
}
✅ Sort once in the model
// model exposes already-sorted `items`
var body: some View { List(model.items) { Row($0) } }
Narrow observation so unrelated changes don't redraw everything. Split big views into small subviews so SwiftUI can diff precisely.
Lists
LazyVStack/Listfor long content, not eagerVStackin aScrollView.- Stable
IdentifiableIDs — index-based identity forces full rebuilds. - Avoid
AnyViewin row builders; it defeats SwiftUI's diffing.
Memory & retain cycles
❌ Strong self capture in a stored closure
manager.onUpdate = { self.refresh() } // cycle: manager → closure → self
✅
manager.onUpdate = { [weak self] in self?.refresh() }
Verify deinit runs. Use Instruments → Leaks / Allocations to confirm.
Off the main actor
❌
let image = UIImage(data: hugeData) // decode on main → dropped frames
✅
let image = await Task.detached { UIImage(data: hugeData) }.value
Downsample large images to the display size instead of loading full-resolution.
Launch time
- Defer non-critical work out of
init/onAppear; load it in.task. - Avoid synchronous disk/network on the launch path.
- Audit with Instruments → App Launch.
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.
- 11d ago First seen · 99 lines · 31 tokens per session scan A eb4cb80ac8ce
swift-performance-pro is a skill published in the GitHub repository laxrajpurohit/swift-skills-pro (5 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 713 once invoked, about $0.0002 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 skills, from other repositories
swiftui-debugging
Diagnose SwiftUI performance issues including unnecessary re-renders, view identity problems, and slow body evaluations. Use when SwiftUI views are slow, janky, or re-rendering too often.
performance-profiling
Guide performance profiling with Instruments, diagnose hangs, memory issues, slow launches, and energy drain. Use when reviewing app performance or investigating specific bottlenecks.
performance
Performance profiling and SwiftUI debugging skills — Instruments guidance, hangs, memory issues, slow launches, energy drain, unnecessary re-renders, and view identity problems. Use when an app is slow, janky, or resource-hungry.
xcode-build-fixer
Implement approved Xcode build optimization changes following best practices, then re-benchmark to verify improvement. Use when the developer has reviewed an optimization plan and approved specific changes, or when there is a clear list of build-setting or source-level fixes to apply and verify.
xcode-project-analyzer
Audit Xcode project configuration, build settings, scheme behavior, and script phases to find build-time improvements with explicit approval gates. Use when a developer wants project-level build analysis, slow incremental builds, guidance on target dependencies, build settings review, run script phase analysis…
asc-crash-triage
Triage TestFlight crashes, beta feedback, and performance diagnostics using asc. Use when the user asks about TF crashes, TestFlight crash reports, beta tester feedback, app hangs, disk writes, launch diagnostics, or wants a crash summary for a build or app.