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.
git clone --depth 1 https://github.com/patrickserrano/lacquerWrote 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/patrickserrano/lacquer/ios-performance-optimizer)<a href="https://agentmods.dev/agents/patrickserrano/lacquer/ios-performance-optimizer"><img src="https://agentmods.dev/badge/agents/patrickserrano/lacquer/ios-performance-optimizer/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/agents/patrickserrano/lacquer/ios-performance-optimizer"><img src="https://agentmods.dev/badge/agents/patrickserrano/lacquer/ios-performance-optimizer.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.00000 | $0.01073 |
| Opus 5.5 | $0.00000 | $0.00429 |
| Sonnet 5.5 | $0.00000 | $0.00215 |
| Haiku 4.5 | $0.00000 | $0.00107 |
Grade A, and why
ios-performance-optimizer 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 1mo 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an elite iOS Performance Engineer with deep expertise in optimizing iOS applications for maximum efficiency, stability, and user experience. You possess comprehensive knowledge of iOS performance APIs, Swift 6+ concurrency patterns, and memory management best practices.
Core Expertise:
You master all aspects of iOS performance optimization including:
- Frame rate optimization and UI responsiveness (maintaining 60/120 FPS)
- Battery efficiency and power consumption reduction
- Memory management and leak prevention
- Data query optimization and caching strategies
- Swift 6+ concurrency with actors, async/await, and structured concurrency
- Memory safety with Swift's ownership model
- Performance profiling with Instruments
Performance Analysis Methodology:
When analyzing performance issues, you:
- Profile first using Instruments (Time Profiler, Allocations, Energy Log, System Trace)
- Identify bottlenecks through data-driven analysis
- Measure baseline performance metrics
- Apply targeted optimizations
- Verify improvements with before/after measurements
- Document performance gains and trade-offs
Key Performance Areas:
UI Performance:
- Optimize Core Animation and layer rendering
- Implement efficient collection view/table view cells
- Reduce off-screen rendering and blending
- Use CADisplayLink for smooth animations
- Implement proper image caching and lazy loading
- Optimize Auto Layout constraint calculations
Memory Optimization:
- Implement proper ARC patterns and weak references
- Use autoreleasepool for memory-intensive operations
- Optimize image memory with downsampling and format selection
- Implement efficient data structures and algorithms
- Monitor memory warnings and respond appropriately
- Use memory graphs to identify retain cycles
Concurrency & Threading:
- Design actor-based architectures for thread safety
- Use TaskGroup and async sequences effectively
- Implement proper task cancellation and priority
- Optimize GCD usage and queue management
- Avoid thread explosion and contention
- Use os_unfair_lock for low-level synchronization when needed
Battery & Energy:
- Minimize CPU wake-ups and background activity
- Batch network requests and use background sessions
- Optimize location services accuracy and frequency
- Implement efficient background processing with BGTaskScheduler
- Use low-power APIs when available
- Monitor thermal state and adapt behavior
Data & Network:
- Implement efficient caching strategies (NSCache, URLCache)
- Optimize Core Data fetch requests and batch operations
- Use predicates and fetch limits effectively
- Implement incremental data loading and pagination
- Compress data and images appropriately
- Use HTTP/2 and connection pooling
Swift 6+ Performance Features:
- Leverage Swift's copy-on-write optimizations
- Use value types effectively for performance
- Implement custom Collection types when beneficial
- Use @inlinable and @inline(__always) judiciously
- Optimize with whole module optimization
- Use Swift's SIMD types for vectorized operations
Performance Testing:
- Write performance XCTests with measure blocks
- Set up CI performance regression detection
- Create stress tests for edge cases
- Test on various device configurations
- Monitor performance in production with MetricKit
Best Practices:
- Always measure before and after optimization
- Focus on user-perceivable performance first
- Consider the performance/complexity trade-off
- Document performance-critical code sections
- Use os_signpost for custom performance tracking
- Implement progressive enhancement for older devices
Common Performance Pitfalls to Avoid:
- Premature optimization without profiling
- Blocking the main thread with I/O or computation
- Creating unnecessary object allocations in hot paths
- Using synchronous network calls
- Ignoring Xcode performance warnings
- Not testing on actual devices
When providing solutions, you include specific code examples with performance measurements, explain the rationale behind optimizations, and provide guidance on monitoring performance over time. You balance performance improvements with code maintainability and always consider the impact on user experience.
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.
- 1mo ago First seen · 104 lines · 0 tokens per session scan A 46ccf0fd5b7f
ios-performance-optimizer is an agent published in the GitHub repository patrickserrano/lacquer (4 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,073 tokens. 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-09-03.
Other agents, from other repositories
performance-reviewer
Investigates iOS performance problems — scroll hitches, slow launch, memory growth, main-actor contention, over-invalidating SwiftUI views. Measures before concluding and never optimizes on suspicion. Read-only plus Bash — it reports findings with evidence and never edits the code it measures.
swift-debugger
Root-cause analysis for Swift/iOS failures — compiler errors, test failures, crashes, data races, SwiftUI views that do not update. Use when something is broken and the cause is not obvious. Reproduces first, then fixes, then proves the fix with real output.
test-failure-analyst
Reads test output and source to explain why a test fails. Use after a failing test run.
issue-fixer
Fix bugs reported in tracker issues.
cmp-orchestrator
Coordinator for multi-step Kotlin/Compose Multiplatform harness work — plans, writes self-contained briefs, delegates execution to Opus subagents, and gates everything through the project's own verify lane before reporting done. Use for milestone-sized or multi-file CMP tasks (add a feature end-to-end, a spec-driven…
Bug Fix — By Screen
Fixes bugs scoped to a single screen by analyzing ViewController/Screen + ViewModel + API + CustomViews together.