valdi-profile

Captures CPU profiles from running Valdi apps via the Hermes debug protocol.

16.4k|541|Updated Nov 6, 2025
One-click install
npx skills add https://github.com/Snapchat/Valdi --skill valdi-profile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: valdi-profile
Source: https://github.com/Snapchat/Valdi/tree/main/ai-skills/skills/valdi-profile
Command: npx skills add https://github.com/Snapchat/Valdi --skill valdi-profile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnosing slow renders and hot functions in a Valdi app requires visibility into what the JavaScript thread is actually doing, which is impossible without a CPU profile of the Hermes runtime.

Core Features & Use Cases

  • CPU Profile Capture: Records a CPU profile from a running Valdi app over a fixed duration or an interactive Ctrl+C session, outputting a standard Chrome DevTools .cpuprofile file.
  • Hermes Debug Integration: Connects through the port 13595 tunnel created by the Valdi hot-reloader to the Hermes debug server inside the app.
  • Use Case: A component renders slowly. You rebuild the app with the Hermes engine, start valdi hotreload, run valdi profile capture --duration 5 while triggering the slow interaction, then open the resulting .cpuprofile in Chrome DevTools or Speedscope to find the hot functions.

Quick Start

Ask the assistant to capture a 5-second CPU profile of the running Valdi app while you trigger the slow interaction, then open the resulting .cpuprofile in Chrome DevTools.

Frequently Asked Questions about valdi-profile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture a CPU profile of a Valdi app?

Build the app with the Hermes engine, start valdi hotreload from the project directory, then run valdi profile capture --duration 5 while triggering the interaction you want to measure. The command outputs a .cpuprofile file path as JSON.

How do I open a .cpuprofile file from Valdi profiling?

Open the .cpuprofile in Chrome DevTools via the Performance tab's upload button, drag it into speedscope.app, or use the VS Code JS Profile Visualizer extension. The file uses the standard Chrome DevTools CPU profile format.

Why does Valdi profiling fail with Hermes debug socket not found on port 13595?

This error means the app was built with the default QuickJS engine instead of Hermes, or the hot-reloader is not running. Rebuild with the Hermes bazel args and ensure valdi hotreload is active to create the port 13595 tunnel.

Can I profile a Valdi app on a physical iOS device?

No, physical iOS devices are not supported in V1 because Hermes debugging there requires idb tunnelling. Use an iOS simulator, or an Android device or emulator, for CPU profiling.

Why is my Valdi CPU profile empty or showing only root?

An empty profile means the app was idle during the capture window with no JS activity. Trigger the interaction you want to profile while the capture is running, since only active JavaScript execution appears in the profile.