Agent skill

Argent React Native Profiler

by bbplayer-app in bbplayer-app/BBPlayer

Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools.

MITAuto-check: warningsMobile

Install Argent React Native Profiler

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add bbplayer-app/BBPlayer --skill argent-react-native-profiler -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bbplayer-app/BBPlayer argent-react-native-profiler --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bbplayer-app/BBPlayer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/argent-react-native-profiler .claude/skills/argent-react-native-profiler && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
argent-react-native-profiler
GitHub stars
1.1k
Token cost
~4.1k tokens
SKILL.md length
1,810 words
Files
2 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools.

  • Works in 4 steps: Tool Overview → Agent Behavior Guidelines → Standard Profiling Workflow → …
  • Optimizing for performance
  • SKILL.md covers 2. Tool Overview, 3. Agent Behavior Guidelines, 4. Standard Profiling Workflow and 5. Important Caveats
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Argent React Native Profiler is an agent skill from bbplayer-app/BBPlayer. Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools. Use when optimizing for performance, measuring before/after a fix, spotting slow components, diagnosing re-renders, checking CPU hotspots, or producing a ranked issue report.

Its SKILL.md is about 4.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/diagnostic-tools.md`).

It sits in Mobile, covering Performance optimization and Cross-platform mobile apps. It works with React Native and React. The repository describes itself as: 一款简约、好用的 BiliBili 音乐播放器。 The licence is MIT.

When your agent uses it

  • Optimizing for performance
  • Measuring before/after a fix
  • Spotting slow components
  • Diagnosing re-renders

Example prompts

  • “/argent-react-native-profiler”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Tool Overview
  2. Agent Behavior Guidelines
  3. Standard Profiling Workflow
  4. Important Caveats

What it can do on your machine

Read from SKILL.md and the folder at commit 7b98d88. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Argent React Native Profiler loads about 4.1k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 1,810 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~4.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:88
    marked as "stale", you may overtake it without prompting the user for allowance

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bbplayer-app/BBPlayer at commit 7b98d88, republished under its MIT licence (© bbplayer-app). 1,810 words, ~4,053 tokens.

Download SKILL.mdSave it as .claude/skills/argent-react-native-profiler/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
argent-react-native-profiler
description
Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools. Use when optimizing for performance, measuring before/after a fix, spotting slow components, diagnosing re-renders, checking CPU hotspots, or producing a ranked issue report.

This skill is complementary to argent-react-native-optimization, not a replacement for it.

Physical iPhone: not supported; react-profiler-* reject kind: "device". Profile on a simulator.

2. Tool Overview

React Profiler (Hermes / React commits)
ToolPurpose
react-profiler-startStart CPU sampling + inject React commit-capture hook. Optional: sample_interval_us (default 100).
react-profiler-stopStop recording; stores cpuProfile + commitTree in session.
react-profiler-statusCall if you were interrupted in the middle of the flow, never in another scenario (debugger drop, Metro reload, pause, subagent handoff, any doubt). Returns session_status: "active" | "taken_over" | "stopped" | "no_react_runtime". Side-effect free.
react-profiler-analyzeRun pipeline -> report with CPU-enriched hot commits, sorted by totalRenderMs DESC. Saves raw data to disk.
react-profiler-component-sourceAST lookup: file, line, memoization status, 50 lines of source for a component.
react-profiler-rendersLive fiber walk: render counts + durations per component (no profiling session required).
react-profiler-fiber-treeLive fiber walk: full component hierarchy as JSON.
Drill-Down Query Tools (call after analyze)
ToolPurpose
profiler-cpu-queryTargeted CPU investigation: top functions, time-windowed CPU, call trees, per-component CPU.
profiler-commit-queryTargeted commit investigation: by component, time range, commit index, or cascade tree.
profiler-stack-queryiOS Instruments drill-down: hang stacks, function callers, thread breakdown, leak details.
profiler-combined-reportCross-correlated report when both React Profiler and native profiler ran in parallel.
profiler-loadList and reload previous profiling sessions from disk for re-investigation with query tools.

For native profiling (CPU hotspots, UI hangs, memory leaks), see the argent-native-profiler skill.


3. Agent Behavior Guidelines

Follow these rules throughout the profiling workflow:

  • Start react-profiler-start and native-profiler-start in parallel (two tool calls in one message). Both need device_id; use the same UDID for both so their data can be correlated later. This gives best coverage.
  • If the user only wants native profiling, use the argent-native-profiler skill workflow. Only skip native-profiler-start if the user has already explicitly said they don't want native profiling in this session
After analysis: ask about next steps

After presenting the analysis report, always ask the user what they want to do next. Present these options:

  1. Investigate further — drill down into specific findings using query tools (CPU call trees, commit cascades, hang stacks, etc.) to identify root causes with confidence before making changes.
  2. Implement fixes — apply changes based on the current findings, then re-profile to measure whether the metric changed (improved, regressed, or stayed flat).
  3. Done for now — accept the report as-is.

Do NOT silently move on after the report. The report is the starting point, not the end — query tools exist specifically to let you dig deeper into anything the report flags.

During investigation: use query tools proactively

When drilling down, chain query tool calls based on what you find:

  • A hot commit -> profiler-commit-query mode=by_index to see all components -> profiler-cpu-query mode=component_cpu for the slowest one -> profiler-cpu-query mode=call_tree for the hot function -> read the source file -> propose a fix.
  • A memory leak -> profiler-stack-query mode=leak_stacks to identify the responsible module -> read the native source if actionable.
  • A native hang -> profiler-stack-query mode=hang_stacks to get the native call chain -> correlate with React commit timing.
After fixes: always re-profile

When you apply a fix, always re-profile the same scenario afterward. Compare before/after metrics (commit durations, CPU time, render counts) and report honestly: did the target metric improve, stay flat, or regress? Did any other metric get worse? If you need to reference the original data, use profiler-load to reload the pre-fix session. If the fix showed no improvement or introduced a regression, say so explicitly and reconsider the approach.

Use flows for reproducible profiling

When profiling requires a specific interaction sequence (scroll a list, navigate screens, trigger an animation), record the interaction as a flow using the argent-create-flow skill before the first profiling run. Then replay the same flow for every subsequent run. This eliminates interaction variance as a confounder and makes before/after comparisons meaningful. Especially important when:

  • You are about to re-profile after applying a fix (Step 8).
  • The user asks you to compare multiple profiling sessions.
  • The interaction path is more than 2-3 steps long.

4. Standard Profiling Workflow

Complete all steps in order — do not break mid-flow.

Step 1: Start profiling

Mind the react-native and ios-native profiler selection mentioned above when starting the session and start the tools. Save startedAtEpochMs from the response — you will need it for annotation offsets. Every subsequent profiler/query call in this session must use the same device_id. Before beginning, define lightweight success criteria with the user: which metric matters most (e.g., totalRenderMs, specific commit duration, render count for a component) and what threshold would be meaningful. This anchors later evaluation. On success:

  • if user asked you to perform the profiling, determine how to profile yourself using tools described in argent-device-interact skill.
  • if the user stated they wish to perform the interaction themselves — suggest what interaction to perform (e.g. "scroll the list", "switch tabs") and wait for their reply. If you received information about existing profiling session being owned by another agent:
  • if session is marked as "stale", you may overtake it without prompting the user for allowance
  • if session is NOT "stale" - before taking action and terminating the other session, stop and ask user what you should do, explaining the situation.
Annotate every interaction

After each gesture-tap or gesture-swipe call, record an annotation using the returned timestampMs. Compute offsetMs = timestampMs - startedAtEpochMs. Do this for every interaction — including back-navigation swipes, not just the primary action. Pass all collected annotations to react-profiler-analyze in Step 3.

Step 2: Stop and collect

Call react-profiler-stop and native-profiler-stop in parallel. Only skip native-profiler-stop if you did not start it in Step 1. Note duration_ms and fiber_renders_captured. If fiber_renders_captured: 0, warn the user — React commit data may be missing.

Step 3: Analyze

Call react-profiler-analyze with port, device_id, project_root, platform, and rn_version. The report includes metadata such as reactCompilerEnabled, strictModeEnabled, and buildMode — check these in the returned markdown report.

If you performed interactions using gesture-tap/gesture-swipe, pass annotations to mark when each action occurred. Each annotation's offsetMs must be computed as tapTimestampMs - startedAtEpochMs, where tapTimestampMs is the timestampMs returned by the gesture-tap/gesture-swipe tool and startedAtEpochMs was returned by react-profiler-start. Do not use Date.now() for this calculation — only server-side timestamps from the tool return values.

If dual profiling, also call native-profiler-analyze, then you must call profiler-combined-report for the cross-correlated view — do not skip this step when both profilers ran; the combined report surfaces correlations that individual reports miss.

The analyze report includes CPU hotspots per commit — showing exactly which JS functions ran during each slow React commit. Raw data is saved to disk automatically for later reload.

Show full SKILL.md (741 more words)Show less
Step 4: Assess results

Analyze whether the results give you a proper image of what is wrong with the application - do not assume improvement always exists, verify results logically with reference to how react-native works. Make sure to give honest feedback and be ready to change the approach if needed.

Step 5: Present findings and ask about next steps

Present a concise summary of the key findings - present whether possibilities for improvement exist and how performing further actions could affect performance. Then follow the "After analysis" guideline — ask whether to investigate further, implement fixes (if available), or stop.

Step 6: Drill-down investigation (iterative)

Based on findings from the report, use query tools to investigate deeper:

  • Slow component? -> profiler-cpu-query mode=component_cpu component_name=AppNavigator — shows what JS functions ran during that component's commits.
  • Want to see the call tree? -> profiler-cpu-query mode=call_tree function_name=expensiveFunction — shows callers and callees.
  • What happened during a time window? -> profiler-commit-query mode=by_time_range — lists all commits in a range.
  • Full commit detail? -> profiler-commit-query mode=by_index commit_index=38 — all components, props changes, parent cascade.
  • Who triggered whom? -> profiler-commit-query mode=cascade_tree — visual parent-child cascade.
  • iOS hang details? -> profiler-stack-query mode=hang_stacks — native call stacks during a hang.

Repeat as needed until you identify the root cause function and file, referring to step 4 for honest evaluation. After each round of investigation, ask the user if they want to continue digging or move to fixing.

Step 7: Reload a previous session

If you profiled multiple scenarios and need to revisit earlier data:

  1. Call profiler-load mode=list to see all saved sessions with timestamps (the list now also shows Runtime / Device / Metro bundle columns to help identify the right session).
  2. Call profiler-load mode=load_react session_id=<timestamp> device_id=<UDID> to reload React data. device_id scopes the reload into the port:device_id cache slot.
  3. Call profiler-load mode=load_native session_id=<timestamp> device_id=<UDID> to reload native profiler data.
  4. Query tools now operate on the reloaded session data — pass the same device_id you loaded with, otherwise they will miss the cache.

This is useful for before/after comparisons: profile, fix, re-profile, then reload the original session to compare metrics side by side.

Step 8: Apply fix and re-profile

If fix is present, read the source code of the identified bottleneck using react-profiler-component-source or the Read tool. Apply the fix, then re-profile (Step 1 -> user interaction -> Step 2 -> Step 3 -> Step 4). Report whether the target metric improved, stayed flat, or regressed. Also check whether the fix introduced regressions in other metrics (e.g., render count dropped but CPU time increased, or a different component now re-renders more). If the fix showed no net benefit or unacceptable tradeoffs, revert and reconsider.

Tip: If the interaction sequence was recorded as a flow (see "Use flows for reproducible profiling" above), replay it with flow-execute instead of manually repeating the steps. This guarantees identical interaction conditions for the comparison. If the flow fails during replay (e.g., a UI fix changed the layout), follow argent-create-flow's Diagnose a replay failure to repair the flow before retrying the profiling cycle.

If the user stated that they do not wish for changes, present the profiling report and skip the fix but suggest it to the user.

React Compiler rule: If the analyze report indicates React Compiler is enabled, do NOT propose useCallback/useMemo/React.memo unless you confirmed compiler bail-out (check react-profiler-fiber-tree for absent useMemoCache on that component).


5. Important Caveats

  • Dev mode inflation: buildMode: "dev" renders are ~3x slower than production. Prioritize high normalizedRenderCount — it scales to prod.
  • Re-run after fixes: Always re-profile after changes. Report honestly whether the metric improved, regressed, or stayed flat — do not assume improvement.
  • excluded is informational: Components in animatedSubtrees and recyclerChildren re-render by design.
  • Strict Mode: Double-invokes renders. The pipeline halves normalizedRenderCount automatically when detected.
  • Debugger connection: If interrupted, started profiling also closes. Before attempting recovery, call react-profiler-status — it tells you whether the session is active, taken_over, stopped, or no_react_runtime, so you can decide whether to stop, restart, or reconnect first.
  • Confounders to watch for:
    • Live API data may differ between runs (different payload sizes, content counts), which shifts render counts and durations independently of your fix. Note when data-dependent components show variance.
    • Profiler overhead inflates CPU measurements. If iOS Instruments shows JSLexer, JSONEmitter, or Hermes internals dominating the JS thread, that reflects profiler instrumentation cost — not app work. Discount those entries.
    • Runs are not perfectly reproducible. Small variations (under ~10-15%) in commit duration may be noise; only treat consistent, directional changes as signal.

For standalone diagnostic tools (live render stats, fiber tree, CPU summary), see references/diagnostic-tools.md.

© bbplayer-app, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/argent-react-native-profiler of bbplayer-app/BBPlayer.

  • SKILL.md
  • references/diagnostic-tools.md

Open the folder on GitHubat commit 7b98d88

Compare with similar skills

Argent React Native Profiler next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Argent React Native Profiler compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Argent React Native Profiler this skillbbplayer-app/BBPlayer1.1k—~4.1kAutomated safety check: WarnMIT
PerformanceSidiora-Labs/centra-llm-agents115—~778Automated safety check: PassCustom licence
React Devtoolssanity-io/sanity6.4k3 repos~2.1kAutomated safety check: PassMIT
Screenmapaleqsio/screenmap242—~7.2kAutomated safety check: PassMIT
Gestureskingstinct/react-native-healthkit7161 repos~1.7kAutomated safety check: PassMIT
Community Migrationjingjing2222/react-native-nitro-geolocation115—~3.5kAutomated safety check: PassMIT

Similar skills

  • Performance

    Sidiora-Labs/centra-llm-agents

    Performance optimization guidelines for React/React Native applications.

    115 GitHub stars~778 tokensUpdated 20 days ago
    MobileAuto-check passed
  • React Devtools

    sanity-io/sanity

    Official

    React DevTools CLI for AI agents. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 3 repos~2.1k tokens
    MobileAuto-check passed
  • Screenmap

    aleqsio/screenmap

    Generate a visual navigation map of an Expo / React Native or NativeScript app.

    242 GitHub stars~7.2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Gestures

    kingstinct/react-native-healthkit

    Software Mansion's best practices for gestures in React Native apps using React Native Gesture Handler.

    716 GitHub starsUsed in 1 repo~1.7k tokens
    MobileAuto-check passed
  • Community Migration

    jingjing2222/react-native-nitro-geolocation

    Migrate React Native apps from @react-native-community/geolocation to react-native-nitro-geolocation.

    115 GitHub stars~3.5k tokensUpdated 25 days ago
    MobileAuto-check passed
  • Lovdacn

    lovdacn/ui

    Manages lovdacn (lvcn) components and projects for Expo & React Native — adding, initializing, fixing, debugging, styling, theming, and composing UI with NativeWind or Uniwind.

    107 GitHub stars~3.9k tokensUpdated 1 mo ago
    MobileAuto-check passed

More from bbplayer-app/BBPlayer

All 19 skills in this repo
  • Expo Module

    bbplayer-app/BBPlayer

    Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).

    1.1k GitHub starsUsed in 3 repos~1.4k tokens
    Auto-check passed
  • Argent Metro Debugger

    bbplayer-app/BBPlayer

    Debug a JS runtime via CDP using argent debugger tools. An agent skill from bbplayer-app/BBPlayer.

    1.1k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues.

    1.1k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Argent Lens

    bbplayer-app/BBPlayer

    Propose multiple visual design variants for on-screen elements and let the human pick in the Argent Lens window.

    1.1k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Argent QA Flows

    bbplayer-app/BBPlayer

    Create repeatable QA regression E2E tests as Argent flows from test cases, tickets, or acceptance criteria.

    1.1k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Argent Screenshot Diff

    bbplayer-app/BBPlayer

    Compare saved or live app screenshots with the argent screenshot-diff tool.

    1.1k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Argent React Native Profiler

What does Argent React Native Profiler do?

Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools. Argent React Native Profiler is an agent skill from bbplayer-app/BBPlayer. Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools.

When should I use Argent React Native Profiler?

Argent React Native Profiler fits situations like: optimizing for performance; measuring before/after a fix; spotting slow components; diagnosing re-renders.

How do I install Argent React Native Profiler in Claude Code?

Run `npx skills add bbplayer-app/BBPlayer --skill argent-react-native-profiler -a claude-code`. Or copy the skill folder (.agents/skills/argent-react-native-profiler in bbplayer-app/BBPlayer) into .claude/skills/argent-react-native-profiler in your project. Claude Code loads it when a task matches its description.

How do I install Argent React Native Profiler in Codex?

Run `npx skills add bbplayer-app/BBPlayer --skill argent-react-native-profiler -a codex`. Or copy the skill folder (.agents/skills/argent-react-native-profiler in bbplayer-app/BBPlayer) into .agents/skills/argent-react-native-profiler in your project. Codex loads it when a task matches its description.

Can I use Argent React Native Profiler in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bbplayer-app/BBPlayer --skill argent-react-native-profiler -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/argent-react-native-profiler, .gemini/skills/argent-react-native-profiler, .github/skills/argent-react-native-profiler and .opencode/skills/argent-react-native-profiler in your project.

What does Argent React Native Profiler need to run?

SKILL.md names no scripts, command-line tools or credentials: Argent React Native Profiler is instructions for the agent only.

Does Argent React Native Profiler access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Argent React Native Profiler safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Argent React Native Profiler use?

Argent React Native Profiler is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Argent React Native Profiler use?

About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Argent React Native Profiler?

Skills that share tags, products or a category with Argent React Native Profiler: Performance (Sidiora-Labs/centra-llm-agents, 115 stars), React Devtools (sanity-io/sanity, 6.4k stars), Screenmap (aleqsio/screenmap, 242 stars) and Gestures (kingstinct/react-native-healthkit, 716 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Argent React Native Profiler?

bbplayer-app (a GitHub organization) maintains it in bbplayer-app/BBPlayer, which has 1,143 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: bbplayer-app/BBPlayer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.