performance-audit
Skill787 starsChanged 3 months agoMITView on GitHub
Audit and improve SwiftUI runtime performance. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- LeonardoEnnes/ai-engineering-toolkittheir own version, first seen Nov 8, 2026
- nseney1/Soma-Governancetheir own version, first seen Nov 1, 2026
- RBraga01/a-teamtheir own version, first seen Nov 1, 2026
- nseney1/Aegis-Guardrailstheir own version, first seen Oct 25, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
Used with
Projects with it also use incident-response, threat-model and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 4 projects that use this
OpenAISkillthreat-model
Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 8 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 1
- patrickserrano/skills★ 13100% same
Edited · 0
None found.
Wrote their own version · 19
- octanejs/octane★ 1.5ksame name
- gwdevhub/GWToolboxpp★ 1.1ksame name
- me2resh/apexyard★ 542same name
- wallstop/unity-helpers★ 176same name
- RBraga01/a-team★ 24same name
- fritzprix/libr-agent★ 11same name
- greglas75/zuvo★ 7same name
- nseney1/Aegis-Guardrails★ 4same name
- nseney1/Soma-Governance★ 4same name
- digitaldreams/tuhin★ 3same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- animation-vocabularySkill
- apple-designSkill
- app-screenshot-debugSkill
- ascSkill
- bump-versionSkill
- check-ghostty-updateSkill
- code-cleanSkill
- conventional-commitSkill
- dia-source-analysisSkill
- docSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- improve-animationsSkill
- ios-app-analysisSkill
- ios-rebuild-devSkill
- issue-creatorSkill
- macos-rebuild-devSkill
- native-app-profilingSkill
- og-generationSkill
- pick-ui-librarySkill
- prototypeSkill
- review-animationsSkill
- review-copySkill
- Swift Performance Optimization SkillSkill
- termio-bug-reportSkill
- termioSkill
- testflight-releaseSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If user provides code: Start with Code-First Review
- Distinctive: line 15
If user only describes symptoms: Ask for minimal code/context, then Code-First Review
- Distinctive: line 40
If code review is inconclusive, explain how to collect data:
- Distinctive: line 42
Use SwiftUI template in Instruments (Release build)
- Distinctive: line 173
Ask user to re-run same capture and compare with baseline:
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SwiftUI Performance Audit
Overview
Audit SwiftUI view performance from instrumentation and baselining to root-cause analysis and concrete remediation steps.
Workflow Decision Tree
- If user provides code: Start with Code-First Review
- If user only describes symptoms: Ask for minimal code/context, then Code-First Review
- If code review is inconclusive: Guide user to profile with Instruments
1. Code-First Review
Collect
- Target view/feature code
- Data flow: state, environment, observable models
- Symptoms and reproduction steps
Focus On
- View invalidation storms from broad state changes
- Unstable identity in lists (
idchurn,UUID()per render) - Heavy work in
body(formatting, sorting, image decoding) - Layout thrash (deep stacks,
GeometryReader, preference chains) - Large images without downsampling
- Over-animated hierarchies (implicit animations on large trees)
Provide
- Likely root causes with code references
- Suggested fixes and refactors
- Minimal repro or instrumentation suggestion if needed
2. Guide User to Profile
If code review is inconclusive, explain how to collect data:
- Use SwiftUI template in Instruments (Release build)
- Reproduce the exact interaction (scroll, navigation, animation)
- Capture SwiftUI timeline and Time Profiler
- Export or screenshot relevant lanes and call tree
Ask for:
- Trace export or screenshots
- Device/OS/build configuration
3. Common Code Smells (and Fixes)
Expensive formatters in body
Bad:
var body: some View {
let formatter = NumberFormatter() // Slow allocation every render
Text(formatter.string(from: value))
}Good:
final class Formatters {
static let number = NumberFormatter()
}
var body: some View {
Text(Formatters.number.string(from: value))
}Computed properties with heavy work
Bad:
var filtered: [Item] {
items.filter { $0.isEnabled } // Runs every body eval
}Good:
@State private var filtered: [Item] = []
.onChange(of: items) {
filtered = items.filter { $0.isEnabled }
}Sorting/filtering in ForEach
Bad:
ForEach(items.sorted(by: sortRule)) { item in
Row(item)
}Good:
let sortedItems = items.sorted(by: sortRule) // Compute once
ForEach(sortedItems) { item in
Row(item)
}Unstable identity
Bad:
ForEach(items, id: \.self) { item in // \.self may not be stable
Row(item)
}Good:
ForEach(items, id: \.stableID) { item in
Row(item)
}Image decoding on main thread
Bad:
Image(uiImage: UIImage(data: data)!)Good:
// Decode/downsample off main thread, cache the result
@State private var image: UIImage?
.task {
image = await ImageLoader.load(data: data, targetSize: size)
}Broad dependencies in observable models
Bad:
@Observable class Model {
var items: [Item] = []
}
var body: some View {
Row(isFavorite: model.items.contains(item)) // Entire array dependency
}Good:
// Granular view models or per-item state to reduce update fan-out4. Remediation Strategies
| Issue | Fix |
| Broad state changes | Narrow scope with @State/@Observable closer to leaves |
| Unstable identities | Use stable, unique IDs for ForEach |
| Heavy work in body | Precompute, cache, move to @State |
| Expensive subtrees | Use equatable() or value wrappers |
| Large images | Downsample before rendering |
| Layout complexity | Reduce nesting, use fixed sizing where possible |
5. Verify
Ask user to re-run same capture and compare with baseline:
- CPU usage
- Frame drops
- Memory peak
Output Format
Provide:
- Metrics table (before/after if available)
- Top issues (ordered by impact)
- Proposed fixes with estimated effort
Profiling Commands
# Build for profiling
xcodebuild -scheme MyApp -configuration Release -destination 'platform=iOS Simulator,name=iPhone 15 Pro' build
# Open in Instruments
open -a InstrumentsInstruments Checklist
- Use Release build (not Debug)
- Select SwiftUI template
- Reproduce exact problematic interaction
- Look at SwiftUI timeline for body evaluations
- Check Time Profiler for hot spots
- Note frame rate drops in Animation timeline
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

