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.5 | $0.00012 | $0.00285 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (6 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 713 once invoked, about $0.0001 per session on Opus 5.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.
swift-performance-pro compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swift-performance-prolaxrajpurohit/swift-skills-pro | Skill | 6 | 1mo ago | MIT | A | 31 | Claude Code |
| swiftui-debuggingrshankras/claude-code-apple-skills | Skill | 915 | 21d ago | MIT | A | 44 | Claude Code |
| performance-profilingrshankras/claude-code-apple-skills | Skill | 915 | 21d ago | MIT | A | 36 | Claude Code |
| asc-crash-triagerorkai/app-store-connect-cli-skills | Skill | 1.2k | 7d ago | MIT | A | 60 | Claude Code |
| performancershankras/claude-code-apple-skills | Skill | 915 | 21d ago | MIT | A | 50 | Claude Code |
| mobile-performance-react-nativeagents-inc/skills | Skill | 28 | 1mo ago | MIT | A | 45 | Claude Code, Codex |
| flutter-expert-tipsariaramin/flutter-skills | Skill | 11 | 23d ago | MIT | A | 60 | Claude Code, Codex |