with one click
profile
Compiler profiling and hotspot analysis.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Compiler profiling and hotspot analysis.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use whenever adding an e2e compiler-output test (our JS vs the reference compiler) — a new cluster case under `tasks/compiler_tests/`.
🧩 PARITY · Turn one divergence from the Original into a test per affected case (does not fix).
Use when starting any compiler task or session before touching parser/analyze/transform/ast/codegen/css/diagnostics code, before proposing a design or writing code, and when the task grows into a new layer and you need its PRD invariants.
🔪 SDT · verdict-directed review of backend codegen/transform. Use when auditing codegen/transform for smart-analyzer / dumb-codegen violations, or when porting a transform/codegen visitor from the Original.
The required unit-test format for `crates/**/src/**` — use when writing or reviewing a Rust `#[test]`, a test helper, or an `assert_*`. Not for `tasks/compiler_tests/` (use add-test) or `tasks/diagnostic_tests/` (use add-diagnostic-test).
PRD editorial standard for docs/. Use when writing a new PRD, extending one, or reviewing changes under docs/ — and when another skill needs the PRD rules.
| name | profile |
| description | Compiler profiling and hotspot analysis. |
| argument-hint | [fresh] |
| allowed-tools | Bash, Read, Grep, Glob, mcp__narsil-mcp__* |
| disable-model-invocation | true |
./profile/ layout./profile/all/ — all cases × prod/dev (just bench-flame-all):
aggregate.top.txt — aggregated top across all cases<slug>_<mode>/top.txt — top of a single case<slug>_<mode>/profile.folded — folded stacks (can be up to 6 MB; do NOT read whole, only Grep by function name)<slug>_<mode>/profile.json, profile.json.syms.json — raw dumps, do NOT read whole; work through jq/grep surgically./profile/one/ — a single case (just bench-flame <path> [--dev]):
<slug>_<mode>/ aboveslug = path from tasks/benchmark/benches/compiler/ with / → _, without .svelte/.svelte.js.
mode = prod | dev.
If $ARGUMENTS == "fresh" — run just bench-flame-all. Tell the user the run takes ~4 min and start immediately, without asking for confirmation. After the run — read ./profile/all/aggregate.top.txt.
Otherwise — read the existing ./profile/all/aggregate.top.txt. If the file is missing — tell the user to run /profile fresh or just bench-flame-all manually and stop.
Analyze ./profile/all/. Work through the top-5 hotspots from aggregate.top.txt — every one, not just the first.
For each, find the driver-case: compare <slug>_<mode>/top.txt across subdirectories and pick where this function's self-% is highest.
Report on the hotspots: what's hot, why, and what to do about it.
When the user picks an option — dig into the driver-case of that hotspot and propose concrete changes.
To profile a single case in isolation — just bench-flame <path> [--dev] (artifacts in ./profile/one/, see above).