> 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)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/ios-performance?format=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
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)