Agent skill
iOS Performance
Standards for Instruments, Memory Management, and Optimization.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/performance-hoangnguyen0403-agent-skills-standar
Metadata
Additional technical details for this skill
- labels
-
ios performance instruments leaks
- triggers
-
{ "files": [ "**/*.swift" ], "keywords": [ "Instruments", "Allocations", "Leaks", "dequeueReusableCell" ] }
SKILL.md
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
dequeueReusableCelland keepcellForRowAtlogic lightweight. - Image Caching: Use
SDWebImageorKingfisherfor remote assets to prevent redundant fetching and main-thread decoding. (Note:AsyncImagelacks built-in caching; prioritize third-party for lists). - Background threads: Offload expensive work (parsing, encryption) from the Main thread using GCD or Tasks.
Diagnostics
- Compiler Warnings: Enable
SWIFT_TREAT_WARNINGS_AS_ERRORSin Release builds. - Static Analyzer: Use Xcode's "Analyze" (Product > Analyze) to find logic errors.
Anti-Patterns
- CPU work on Main Thread:
**No parsing/processing on Main**: Use background thread. - Force Cache Flushes:
**No redundant cache clears**: Let the system handle low-memory warnings via AppDelegate. - Retain Cycles:
**Check for cycles in Instruments**: Use the Leaks instrument frequently.
References
- Profiling & Optimization
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?