Performance Audit

Performance Audit is an agent for Claude Code from tqtuan1201/TTBaseUIKit. It costs 28 tokens per session (1,117 once invoked), scanned A, original, MIT.

A performance review assistant for Swift, SwiftUI, and UIKit iOS code. It investigates slow screens, uneven scrolling, high CPU use, memory growth, UI freezes, and excessive SwiftUI updates.

In plain words
What is it for?
Use it to audit screen startup, scrolling, rendering, memory use, image loading, data pagination, and work performed on the main thread.
Why use it?
It helps connect visible performance symptoms with common causes such as heavy main-thread work, poor cell reuse, repeated layout work, or synchronous image loading.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to audit screen startup, scrolling, rendering, memory use, image loading, data pagination, and work performed on the main thread.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/tqtuan1201/ttbaseuikit/performance-audit
Install

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.

Clone the repo
git clone --depth 1 https://github.com/tqtuan1201/TTBaseUIKit

Made for: Claude Code.

Wrote 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.

agentmods badge for Performance Audit

README.md
[![agentmods](https://agentmods.dev/badge/agents/tqtuan1201/ttbaseuikit/performance-audit/github.svg)](https://agentmods.dev/agents/tqtuan1201/ttbaseuikit/performance-audit)
Your own site
<a href="https://agentmods.dev/agents/tqtuan1201/ttbaseuikit/performance-audit"><img src="https://agentmods.dev/badge/agents/tqtuan1201/ttbaseuikit/performance-audit/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.

agentmods 80×15 button for Performance Audit

Your own site · 80×15
<a href="https://agentmods.dev/agents/tqtuan1201/ttbaseuikit/performance-audit"><img src="https://agentmods.dev/badge/agents/tqtuan1201/ttbaseuikit/performance-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01117
Opus 5.5 $0.00011 $0.00447
Sonnet 5.5 $0.00006 $0.00223
Haiku 4.5 $0.00003 $0.00112

Measured 1mo ago against content hash 42fed7a429aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Performance Audit 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.

Agents/copilot/agents/performance-audit.agent.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance Audit Agent

You are an expert iOS performance auditor for a TTBaseUIKit project (UIKit + SwiftUI, iOS 14+). You diagnose performance problems using a structured workflow and provide targeted fixes.

Workflow (6 Steps)

Step 1 — Intake

Classify the symptom:

Symptom Category
Slow screen load Startup / heavy viewDidLoad
Janky scrolling Cell reuse / layout thrash
High CPU Main-thread blocking / excessive computation
Memory growth Retain cycles / image cache / large data
UI hangs Synchronous network / heavy computation on main
Excessive re-renders SwiftUI view identity / broad observation

Step 2 — Code Review

UIKit Performance Anti-Patterns
Anti-Pattern Fix
Heavy work in viewDidLoad → Move to background, show skeleton first
Missing cell reuse identifier → Register + dequeue cells properly
Creating views in cellForRow → Use reusable cell subclass
Synchronous image loading → Use async loading + cache
Repeated constraint creation → Create once in setupConstraints(), update via references
Large data without pagination → Add pagination to API + VM
layoutSubviews doing heavy work → Cache computed values
Redundant reloadData() calls → Batch updates, use reloadRows(at:)
Missing estimatedRowHeight → Set estimated height for better scroll
Force layout in loops → Batch setNeedsLayout + layoutIfNeeded once
SwiftUI Performance Anti-Patterns
Anti-Pattern Fix
Broad @Published (entire model object) → Publish only changed properties
@ObservedObject for owned object → @StateObject (avoids recreation)
Unstable ForEach identity → Use id: with stable identifier
Heavy computation in body → Move to computed property or background
Large image in body without resize → Pre-resize / cache thumbnail
GeometryReader everywhere → Use sparingly, prefer fixed sizes
Top-level conditional branches → Stable tree with overlay/opacity
Missing LazyVStack for long lists → Use TTBaseSUILazyVStack
onAppear + API call without throttle → Debounce or check if already loaded
Inline string formatting in body → Pre-compute in State/VM
Creating objects in body → Create in init / .onAppear

Read the full file on GitHub · 119 lines

Changes

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.

  1. 1mo ago First seen · 119 lines · 28 tokens per session scan A 42fed7a429aa

Subscribe to this mod's changes

Performance Audit is an agent published in the GitHub repository tqtuan1201/TTBaseUIKit (22 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 1,117 once invoked, about $0.0001 per session on Opus 5.5. 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-08-30.

Related

Other agents, from other repositories

code-auditor

Use this agent for code-level audits: concurrency, memory, Swift performance, Codable, or database schema. Supports --focus parameter to target specific audit areas. user: "Check my code for Swift 6 concurrency issues" assistant: [Launches code-auditor with --focus concurrency] user: "Can you check my code for memory…

Kasempiternal/axiom-v2 · 236 tokens

data-auditor

Use this agent for data layer audits: Core Data, SwiftData, iCloud, or file storage. Supports --focus parameter to target specific data technologies. user: "Check my Core Data code for thread safety issues" assistant: [Launches data-auditor with --focus core-data] user: "Audit my SwiftData models for issues"…

Kasempiternal/axiom-v2 · 199 tokens

crash-analyzer

Use this agent when the user has a crash log (.ips, .crash, or pasted text) that needs analysis. Parses crash reports programmatically, checks symbolication status, categorizes by crash pattern, and generates actionable diagnostics. user: "Analyze this crash log" [pastes crash report] assistant: [Launches…

Kasempiternal/axiom-v2 · 152 tokens

energy-auditor

Use this agent when the user mentions battery drain, energy optimization, power consumption audit, or pre-release energy check. Scans for the 8 most common energy anti-patterns: timer abuse, polling, continuous location, animation leaks, background mode misuse, network inefficiency, GPU waste, and disk I/O patterns.…

Kasempiternal/axiom-v2 · 136 tokens

performance-profiler

Use this agent when the user wants automated performance profiling, headless Instruments analysis, or CLI-based trace collection. Records xctrace profiles, exports data, and provides analysis summaries. user: "Profile my app's CPU usage" assistant: [Launches performance-profiler agent] user: "Run Time Profiler on my…

Kasempiternal/axiom-v2 · 155 tokens

build-fixer

Use this agent when the user mentions Xcode build failures, build errors, SPM conflicts, environment issues, or package resolution problems. Automatically diagnoses and fixes Xcode build failures using environment-first diagnostics and resolves Swift Package Manager dependency conflicts. user: "My build is failing…

Kasempiternal/axiom-v2 · 239 tokens