mobile-performance-check

mobile-performance-check is a command for Claude Code from tungnk123/mobile-best-practices. It costs 14 tokens per session (1,180 once invoked), scanned A, original, MIT.

A command that reviews a mobile app's source code for performance problems using the mobile-development guidance database. It supports Android, iOS, Flutter, and React Native projects.

In plain words
What is it for?
Use it to inspect issues such as slow startup, excessive memory use, or inefficient implementation in a mobile project.
Why use it?
It provides a structured performance review based on the project's actual files and the database's documented rules.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to inspect issues such as slow startup, excessive memory use, or inefficient implementation in a mobile project.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tungnk123/mobile-best-practices/mobile-performance-check
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/tungnk123/mobile-best-practices

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 mobile-performance-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-performance-check/github.svg)](https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-performance-check)
Your own site
<a href="https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-performance-check"><img src="https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-performance-check/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 mobile-performance-check

Your own site · 80×15
<a href="https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-performance-check"><img src="https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-performance-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 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,180 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.00014 $0.01180
Opus 5 $0.00007 $0.00590
Sonnet 5 $0.00003 $0.00236
Haiku 4.5 $0.00001 $0.00118

Measured 10d ago against content hash 99cd70c54e12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mobile-performance-check 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 10d 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.

cli/assets/commands/mobile-performance-check.md · 92 lines

How it starts

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

Perform a comprehensive performance analysis of this mobile project.

IMPORTANT: You MUST run every python3 search command below and base ALL findings exclusively on the database results. Do NOT rely on training data. Every recommendation must come from the database output.

Step 1: Scan the Entire Project

Find all relevant source files:

  • Android: find . -name "*.kt" -o -name "*.kts" -o -name "*.xml" | grep -v build | grep -v .gradle
  • iOS: find . -name "*.swift" | grep -v .build
  • Flutter: find . -name "*.dart" | grep -v .dart_tool
  • React Native: find . -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" | grep -v node_modules

Read the actual source files to understand the current implementation.

Step 2: Search the Database — ALL Entries Required

Run ALL of the following searches. Do NOT skip any. Use the results as the authoritative source:

# Core performance rules — ALL platforms
python3 ~/.mobile-best-practices/scripts/search.py "startup cold warm launch" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "memory leak allocation heap" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "ui rendering frame drop jank" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "image loading cache bitmap" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "network http caching request" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "battery cpu wakelock background" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "list scroll lazy virtualize" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "database query index room" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "threading coroutine main dispatcher" --domain performance -n 15
python3 ~/.mobile-best-practices/scripts/search.py "apk size binary proguard shrink" --domain performance -n 10

# Android-specific performance
python3 ~/.mobile-best-practices/scripts/search.py "recomposition compose lambda" --domain performance --filter-platform android -n 15
python3 ~/.mobile-best-practices/scripts/search.py "derivedStateOf remember stable" --domain performance --filter-platform android -n 15
python3 ~/.mobile-best-practices/scripts/search.py "baseline profile startup trace" --domain performance --filter-platform android -n 10
python3 ~/.mobile-best-practices/scripts/search.py "viewmodel stateflow flow" --platform android -n 10

# iOS-specific performance
python3 ~/.mobile-best-practices/scripts/search.py "swiftui view body redraw" --domain performance --filter-platform ios -n 15
python3 ~/.mobile-best-practices/scripts/search.py "instruments time profiler" --domain performance --filter-platform ios -n 10

# Flutter-specific performance
python3 ~/.mobile-best-practices/scripts/search.py "widget rebuild const build" --domain performance --filter-platform flutter -n 15
python3 ~/.mobile-best-practices/scripts/search.py "flutter devtools timeline" --domain performance --filter-platform flutter -n 10

# React Native-specific performance
python3 ~/.mobile-best-practices/scripts/search.py "flatlist keyExtractor memo" --domain performance --filter-platform react-native -n 15
python3 ~/.mobile-best-practices/scripts/search.py "bridge hermes turbo module" --domain performance --filter-platform react-native -n 10

# Performance-related anti-patterns
python3 ~/.mobile-best-practices/scripts/search.py "performance anti-pattern slow blocking" --domain antipattern -n 15
python3 ~/.mobile-best-practices/scripts/search.py "memory leak context activity" --domain antipattern -n 10

# Platform-specific performance guidelines
python3 ~/.mobile-best-practices/scripts/search.py "performance optimize" --platform android -n 10
python3 ~/.mobile-best-practices/scripts/search.py "performance optimize" --platform ios -n 10
python3 ~/.mobile-best-practices/scripts/search.py "performance optimize" --platform flutter -n 10
python3 ~/.mobile-best-practices/scripts/search.py "performance optimize" --platform react-native -n 10

Read the full file on GitHub · 92 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. 10d ago First seen · 92 lines · 14 tokens per session scan A 99cd70c54e12

Subscribe to this mod's changes

mobile-performance-check is a command published in the GitHub repository tungnk123/mobile-best-practices (22 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 1,180 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.