做什么
配置 a React Independent Hermes app , 使用 argent 配置工具测量 reservation 和 CPU 性能
技能库 智客分类:Agent 工作流 argent-react-native-profiler
Profile a React Introduct Hermes app 使用 argent profile 工具来测量重接和CPU的性能. 在优化性能时使用,测量固定前/后,检测慢元件,诊断回放,检查CPU热点,或生成排行榜问题报告.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
配置 a React Independent Hermes app , 使用 argent 配置工具测量 reservation 和 CPU 性能
优化性能,测量固定前/之后,检测慢件组件,诊断再接力,检查CPU热点,或制作排行榜问题报告
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:1. Tools、React Profiler (Hermes / React commits)、Drill-down queries (after analyze)、2. Guidelines、3. Workflow、Step 1: Start profiling。 其中含规范建议的小节:分步指令。
文件分析:除 SKILL.md 外,正文引用了 references/reliability-and-recovery.md,属于带资源的技能包,这些文件按需再读。
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.
1. ToolsReact Profiler (Hermes / React commits)Drill-down queries (after analyze)2. Guidelines3. WorkflowStep 1: Start profilingStep 2: Stop and collectStep 3: AnalyzeStep 4: Assess resultsStep 5: Present findings and ask about next stepsStep 6: Drill-down investigation (iterative)Step 7: Reload a previous session
来源分类:skills.sh agent-skill
nameargent-react-native-profilerdescriptionreferences/reliability-and-recovery.md以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。
具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「argent-react-native-profiler」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-3287e7a2e6c1f03d-Argent-React-Native-Profiler.html 请存为 .cursor/skills/argent-react-native-profiler/SKILL.md 或 .claude/skills/argent-react-native-profiler/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。 该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/software-mansion/argent 取完整目录,不要只建一个 SKILL.md。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/software-mansion/argent' --list
npx skills add 'https://github.com/software-mansion/argent' --skill 'argent-react-native-profiler'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
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.
react-profiler-start / react-profiler-stop: record CPU samples and React commits around an interaction.react-profiler-analyze: turn the recording into a ranked report: hot commits with the JS functions that ran during each, and the file and line of each ranked component it finds in the project.react-profiler-status: only after an interruption (debugger drop, Metro reload, pause, subagent handoff, any doubt), never otherwise. After a debugger drop, react-profiler-stop can no longer collect the run; check status before stopping or restarting.react-profiler-fiber-tree: live component hierarchy, no session needed, for tracing a component's ancestry.profiler-cpu-query: JS CPU: top functions, a time window, a function's call tree, CPU during a component's commits.profiler-commit-query: React commits by component, time range, commit index, or cascade tree, and render counts over all commits.profiler-stack-query: native data: hang stacks, function callers, thread breakdown, leak details.profiler-combined-report: correlates native hangs with React commits when both profilers ran.profiler-load: reload an earlier session from disk for the query tools.For native profiling on its own, see the argent-native-profiler skill.
react-profiler-start and native-profiler-start together, as react-profiler-start describes. If the user wants only native profiling, follow argent-native-profiler.argent-create-e2e skill) before the first run when profiling needs a specific interaction sequence (scroll a list, navigate screens, trigger an animation), then replay it for every later run. This removes interaction variance from before/after comparisons. It matters most when re-profiling after a fix, comparing several sessions, or when the path is more than 2-3 steps.Complete all steps in order; do not break mid-flow.
Before starting, define lightweight success criteria with the user: which metric matters most (e.g. totalRenderMs, a specific commit's duration, a component's render count) and what change would be meaningful.
Start the profilers as described in §2. Save startedAtEpochMs from the response for annotations. Every later profiler and query call in this session must use the same device_id. Then:
argent-device-interact skill).While a profiler records, interaction tools return no automatic screenshot or element tree, so the capture does not load the app. Call screenshot or describe when 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.
After each gesture-tap or gesture-swipe, record an annotation with offsetMs = timestampMs - startedAtEpochMs, using the timestampMs the gesture returned. Never use Date.now(); only the server-side timestamps. Annotate every interaction, back-navigation swipes included, and pass them all to react-profiler-analyze in Step 3.
Call react-profiler-stop and native-profiler-stop in parallel (skip the native one only if you did not start it). If fiber_renders_captured is 0, warn the user that React commit data may be missing.
Call react-profiler-analyze with your annotations. Check the report's React Compiler and build-mode lines before proposing fixes.
If both profilers ran, also call native-profiler-analyze, then you must call profiler-combined-report: it surfaces correlations the individual reports miss. If it says no React commits are stored, use the native report on its own.
Judge whether the results actually explain what is wrong. Do not assume an improvement always exists; check the findings against how React Native works, give honest feedback, and be ready to change approach.
Summarize the key findings, whether there is room for improvement, and how further work could affect performance. Then ask the user how to proceed (§2).
Chain the query tools from what the report flags:
profiler-commit-query by_index (every component, props changes, parent cascade) or cascade_tree (who triggered whom).profiler-cpu-query component_cpu → call_tree for the hot function → read the source → propose a fix.profiler-commit-query by_time_range, or profiler-cpu-query time_window.profiler-commit-query render_counts: every component, including commits under 16 ms that the other modes do not store.profiler-stack-query hang_stacks / leak_stacks; correlate the hang's timing with React commits.Pass component names exactly as the report prints them; the wrapped name (Memo(...), Forget(...), ForwardRef(...)) resolves too. Repeat until you find the root-cause function and file, judging the evidence as in Step 4. After each round, ask the user whether to keep digging or move to fixing.
To revisit earlier data, e.g. to compare before and after a fix: profiler-load mode list, then load_react and/or load_native with the session_id and the device_id. Pass that same device_id to the query tools afterwards, or they miss the reloaded data.
Read the bottleneck's source (the report gives its path from project_root and the line), apply the fix, then re-profile the same scenario (Step 1 → interaction → Steps 2-4). Report honestly whether the target metric improved, stayed flat, or regressed, and whether any other metric got worse (e.g. fewer renders but more CPU time, or a different component now re-renders more). If the fix brought no net benefit or unacceptable tradeoffs, revert and reconsider.
If the interaction was recorded as an e2e test, replay it with e2e-execute instead of repeating the steps by hand. If the replay fails (e.g. a UI fix changed the layout), follow argent-create-e2e's Diagnose a replay failure before retrying the profiling cycle.
If the user does not want changes, present the report and suggest the fix without applying it.
React Compiler rule: do NOT propose useCallback/useMemo/React.memo for a component the report marks ✓ (compiled). For a component in your source marked ⚠️ (bailout suspected), fix what stops the compiler instead.
render_counts lists the rest. These are dev-build numbers, idle time in the recording lowers the share, and a listed component is not a finding.JSLexer, JSONEmitter or Hermes internals dominating the JS thread, that is instrumentation cost, not app work. Discount those entries.Agent 工作流
创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.
Agent 工作流
使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.
Agent 工作流
管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.
Agent 工作流
Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…