Skills software-mansion argent Argent
argent-native-profiler
- Use it when:
- An iOS or Android app hangs, burns CPU or seems to leak memory in native code.
- It does:
- Records a native profile while the app is used, analyzes it, then drills into hang stacks, per-thread CPU and leak stacks.
- You get:
- Findings marked red (act on it) or yellow (worth investigating), then fixes and a re-profile if you want them.
- Needs:
- The Argent MCP server; on iOS, full Xcode and a simulator; on Android, an app that is debuggable or profileable.
- Unlike argent-react-native-profiler:
- It covers native code only; that skill starts this profiler alongside React profiling by default.
Skill 11 of 12 in the Argent bundle, after argent-react-native-profiler and before argent-lens.
TL;DR
Part of Software Mansion's Argent toolkit, which lets the agent control simulators, emulators and devices. On iOS it records with Instruments through xctrace, on simulators only, and reports CPU hotspots, UI hangs and memory leaks. On Android it uses Perfetto on an emulator or phone and reports CPU hotspots and UI hangs, with jank reasons and the main-thread function that blocked, plus memory growth to treat as a hint rather than a confirmed leak. The steps run in order: start the profiler with the app running, let you or the agent use the app, stop, analyze, then present findings and ask whether to dig deeper, fix or stop. Drill-downs follow set patterns: a hang goes from its native call chain to the callers of the suspect function and its source, a CPU hotspot from the per-thread split to the dominant function. After a fix it re-profiles the same scenario and compares sessions, saying plainly when nothing improved. It warns that simulator timings reflect your computer, not the phone, and counts only consistent changes across two or more runs, or over 15%, as real.
Summarizes the skill at b965c94.
npx skills add https://github.com/software-mansion/argent --skill argent-native-profiler skills.sh pageSource on GitHubAll skills from software-mansion/argent
- Total Downloads
- 29,600 on skills.sh, Nov 9, 2026
- Repo stars
- 3,175 software-mansion/argent
- First seen
- May 12, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 1,388 |
| Sep 28 | 1,518 |
| Oct 5 | 1,537 |
| Oct 12 | 1,588 |
| Oct 19 | 1,639 |
| Oct 26 | 1,690 |
| Nov 2 | 1,619 |
| Nov 9 | 1,737 |
| Category |
Find root causes, review code and test what you built. Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills. |
|---|---|
| Type |
A multi-step process the agent follows: interview, debug, run a TDD loop, review. |
| Effect |
Its own steps create or change files, git state or local tools. |
| Needs |
Needs an MCP server connected. A specific command-line tool or desktop app must be installed, such as gh, agent-browser, LibreOffice, Obsidian or a vendor CLI. |
| Publisher |
A verified publisher on skills.sh, or the company or maintainer behind the product the skill operates. |
| Topics | |
| Stack |
SKILL.md
From software-mansion/argent at b965c94. Checked daily, last changed Nov 6, 2026.
Frontmatter
name: argent-native-profiler
description: Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.1. Tools and platforms
native-profiler-startโnative-profiler-stopโnative-profiler-analyze: record, export, and report.profiler-stack-query: drill into the analyzed data (hang stacks, function callers, thread breakdown, leaks).profiler-load: reload an earlier session from disk.
iOS (Instruments via xctrace): simulator only; a physical iPhone is not supported. Needs full Xcode (xcrun xctrace version). Reports CPU hotspots, UI hangs and memory leaks.
Android (Perfetto): emulator or physical device. Reports CPU hotspots and UI hangs (with jank reasons and the main thread's blocking function), plus an RSS-growth signal for memory pressure: treat it as a hint to confirm, not a confirmed leak. The app must be debuggable or declare <profileable android:shell="true"/> in its manifest, or no perf_sample callstacks are captured.
argent-react-native-profiler starts native profiling alongside React profiling by default; this skill's workflow and investigation patterns apply in both cases.
2. Workflow
Complete all steps in order; do not break mid-flow.
- Start. Make sure the app is running (
launch-appif not);native-profiler-startdetects it. Passapp_processonly if it reports several running user apps (e.g. dev and prod flavors) or picks the wrong one. Then let the user interact, or drive the app yourself (argent-device-interactskill). While a profiler records, interaction tools return no automatic screenshot or element tree, so the capture does not load the app. Callscreenshotordescribewhen you need to see the screen; interaction tools still wait for the screen to settle before they return, so add no wait of your own; on an Android emulator each screenshot during a profile takes one frame in about 100 ms and does not wake the screen capture; on a physical Android device it takes about 150โ200 ms and briefly wakes the device screen capture, so take them sparingly there. - Stop.
native-profiler-stop. On iOS, checkexportDiagnosticsfor export warnings. - Analyze.
native-profiler-analyze. Findings are ๐ด RED (act on it) or ๐ก YELLOW (worth investigating, may be acceptable). - Present and ask. Summarize the key findings, then ask the user whether to investigate further, implement fixes, or stop. Do not move on silently.
- Drill down with
profiler-stack-query(patterns below). - Fix and re-profile the same scenario; compare with the earlier session via
profiler-load(list, thenload_nativewith itssession_idand thedevice_id). Report honestly whether the target metric improved, regressed, or stayed flat; if there is no net benefit or something else regressed, say so and reconsider. For reproducible before/after runs, record the interaction as an e2e test (argent-create-e2eskill) before the first run and replay it withe2e-execute.
Investigation patterns
- Hang โ mode
hang_stacksfor the native call chain โfunction_callersfor the suspected function โ read the native source. - CPU hotspot โ
thread_breakdownfor the per-thread split โfunction_callersfor the dominant function. - Memory leak (iOS) โ
leak_stacks, filtered byobject_type, for the responsible frames and libraries. To attribute leaks shown as<Call stack limit reached>, re-runnative-profiler-startwithmalloc_stack_logging: true; it restarts the app and adds overhead, so not for CPU or hang passes.
3. Caveats
- Simulator and emulator timings reflect the host machine, not device hardware. Compare runs against each other rather than trusting absolute numbers; a physical Android device gives real-hardware numbers.
- Profiler overhead: if
JSLexer,JSONEmitteror Hermes internals dominate the JS thread, that is instrumentation cost, not app work. Discount those entries. - Run-to-run variance: treat only consistent, directional changes (across 2+ runs, or a >15% delta) as signal.
- Live data: if the app fetches live API data, different responses change the workload independently of code changes. Note when data-dependent screens vary.