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.
npx agentmods add agents/tqtuan1201/ttbaseuikit/performance-auditgit clone --depth 1 https://github.com/tqtuan1201/TTBaseUIKitWrote 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.
[](https://agentmods.dev/agents/tqtuan1201/ttbaseuikit/performance-audit)<a href="https://agentmods.dev/agents/tqtuan1201/ttbaseuikit/performance-audit"><img src="https://agentmods.dev/badge/agents/tqtuan1201/ttbaseuikit/performance-audit.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01117 |
| Opus 5 | $0.00014 | $0.00558 |
| Sonnet 5 | $0.00006 | $0.00223 |
| Haiku 4.5 | $0.00003 | $0.00112 |
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 6d 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.
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 |
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.
- 6d ago First seen · 119 lines · 28 tokens per session scan A 42fed7a429aa
Performance Audit is an agent published in the GitHub repository tqtuan1201/TTBaseUIKit (23 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 1,117 once invoked, about $0.0001 per session on Opus 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.
Other agents, from other repositories
layer3-issue-detection
Layer 3 systematically scans ALL entry points from Layer 1 and applies issue detection rules. Unlike Layer 2 (which traces specific flows in depth), Layer 3 does a breadth-first scan to categorize issues across the entire codebase.
layer5-data-wiring
Layer 5 verifies that features use real user data instead of mock/hardcoded values, and that model capabilities are fully wired into the features that need them. While Layers 1-4 audit navigation and UX, Layer 5 audits whether the data flowing through those workflows is genuine.
layer2-methodology
Layer 2 takes entry points from Layer 1 and traces the complete user journey.
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…
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…
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…