Skillshub ios-performance
Standards for Instruments, Memory Management, and Optimization. Use when profiling iOS apps with Instruments or optimizing memory and rendering. (triggers: **/*.swift, Instruments, Allocations, Leaks, dequeueReusableCell)
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/ios-performance" ~/.claude/skills/comeonoliver-skillshub-ios-performance && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/ios-performance/SKILL.mdsource content
iOS Performance Standards
Priority: P0
Implementation Guidelines
Diagnostic Tools
- Instruments: Regularly use Allocations and Leaks to detect memory issues.
- Time Profiler: Identify heavy CPU tasks and Main Thread stalls.
- Network instrument: Analyze request payload sizes and frequency.
Optimization
- Table/Collection Views: Always use
and keepdequeueReusableCell
logic lightweight.cellForRowAt - Image Caching: Use
orSDWebImage
for remote assets to prevent redundant fetching and main-thread decoding. (Note:Kingfisher
lacks built-in caching; prioritize third-party for lists).AsyncImage - Background threads: Offload expensive work (parsing, encryption) from the Main thread using GCD or Tasks.
Diagnostics
- Compiler Warnings: Enable
in Release builds.SWIFT_TREAT_WARNINGS_AS_ERRORS - Static Analyzer: Use Xcode's "Analyze" (Product > Analyze) to find logic errors.
Anti-Patterns
- No parsing/processing on Main: Use background thread.
- No redundant cache clears: Let system handle low-memory via AppDelegate.
- No undetected retain cycles: Use Leaks instrument frequently.