Agent skill

Chrome Trace

by layoutit in layoutit/polycss

Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction.

MITAuto-check passedTesting & QA

Install Chrome Trace

skills CLI
$ npx skills add layoutit/polycss --skill chrome-trace -a claude-code

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

GitHub CLI
$ gh skill install layoutit/polycss chrome-trace --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/layoutit/polycss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/chrome-trace .claude/skills/chrome-trace && 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
chrome-trace
GitHub stars
757
Token cost
~2k tokens
SKILL.md length
712 words
Files
6 (incl. scripts)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction.

  • Works in 8 steps: Start from a reproducible page and action. → Warm up the page until app-specific… → Start Chrome tracing and a… → …
  • Codex needs to answer where frame time is spent during an update
  • SKILL.md covers Core Workflow, PolyCSS Trace Runners, Generic Capture and Comparing Runs, plus 1 more section
  • Runs JavaScript scripts from its folder; calls node and pnpm

What it does

Chrome Trace is an agent skill from layoutit/polycss. Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction. Use when Codex needs to answer where frame time is spent during an update, drag, rotation, scroll, animation, camera movement, light movement, DOM/CSS render change, or other performance-sensitive UI action; especially when the right answer requires per-frame Chrome trace evidence instead of FPS-only guesses.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts (for example `agents/openai.yaml`).

It sits in Testing & QA, covering Browser testing, Web animation and motion and CSS and styling. It works with Playwright. The repository describes itself as: A CSS 3D engine for the DOM. Renders polygon meshes in HTML by leveraging matrix3d transforms. The licence is MIT.

When your agent uses it

  • Codex needs to answer where frame time is spent during an update
  • Camera movement
  • DOM/CSS render change
  • Other performance-sensitive UI action

Example prompts

  • “/chrome-trace”

Requirements

  • Node.js

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Start from a reproducible page and action.
  2. Warm up the page until app-specific readiness is true.
  3. Start Chrome tracing and a requestAnimationFrame sampler immediately before the action.
  4. Mark the action window with performance.mark() and console.timeStamp().
  5. Perform the action with real Playwright input when the user is asking about input-driven behavior.
  6. Stop tracing after a short settle window.
  7. Align trace event timestamps to performance.now() using the start/end marks.
  8. Report where time went: Scripting, Style, Layout, PrePaint, Paint, compositor main-thread work, compositor impl-thread work, raster…

What it can do on your machine

Read from SKILL.md and the folder at commit 04a1b66. 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

    Ships 4 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    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

Chrome Trace loads about 2k tokens when it runs. Until then it costs about 108 tokens; SKILL.md has 712 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~2k

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 passed

The automated check found no risky patterns in SKILL.md.

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); the scripts in this folder are not scanned.

SKILL.md

The full file from layoutit/polycss at commit 04a1b66, republished under its MIT licence (© layoutit). 712 words, ~2,042 tokens.

Download SKILL.mdSave it as .claude/skills/chrome-trace/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
chrome-trace
description
Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction. Use when Codex needs to answer where frame time is spent during an update, drag, rotation, scroll, animation, camera movement, light movement, DOM/CSS render change, or other performance-sensitive UI action; especially when the right answer requires per-frame Chrome trace evidence instead of FPS-only guesses.

Chrome Trace

Core Workflow

Use Playwright with Chromium and the Chrome DevTools Protocol Tracing domain to capture the exact interaction under investigation.

  1. Start from a reproducible page and action.
  2. Warm up the page until app-specific readiness is true.
  3. Start Chrome tracing and a requestAnimationFrame sampler immediately before the action.
  4. Mark the action window with performance.mark() and console.timeStamp().
  5. Perform the action with real Playwright input when the user is asking about input-driven behavior.
  6. Stop tracing after a short settle window.
  7. Align trace event timestamps to performance.now() using the start/end marks.
  8. Report where time went: Scripting, Style, Layout, PrePaint, Paint, compositor main-thread work, compositor impl-thread work, raster, GPU/viz events, and the slowest frame windows.

Do not draw conclusions from FPS alone. Use FPS/frame-time summaries only as the symptom; use trace groups and top events as the explanation.

PolyCSS Trace Runners

Use scripts/trace.mjs as the front door:

bash
pnpm bench:build
node .agents/skills/chrome-trace/scripts/trace.mjs motion --page nonvoxel --mesh glb:Elephant.glb --variant baseline --dom-samples --label elephant-baseline
node .agents/skills/chrome-trace/scripts/trace.mjs motion --page nonvoxel --mesh teapot --variant baseline --dom-samples --frame-details --layer-details --gpu-details --trace-out bench/results/teapot.trace.json --label teapot-enriched --report
node .agents/skills/chrome-trace/scripts/trace.mjs motion --page nonvoxel --mesh teapot --variant baseline --gpu-details full --trace-out bench/results/teapot-full-gpu.trace.json --label teapot-full-gpu
node .agents/skills/chrome-trace/scripts/trace.mjs drag --mesh teapot --mode baked --frame-details --label teapot-drag
node .agents/skills/chrome-trace/scripts/trace.mjs motion --mesh garden --report --markdown-out bench/results/garden-trace.md
node .agents/skills/chrome-trace/scripts/trace.mjs compare bench/results/before.json bench/results/after.json --markdown-out bench/results/trace-compare.md

Use trace.mjs motion for steady bench motion across perf and nonvoxel pages, cadence buckets, DOM samples, render stats, and tag counts.

Add --frame-details to motion traces when you need slowest/fastest frame attribution instead of only bucket averages. On nonvoxel pages this also enables page-work samples for camera.update, scene.applyCamera, and input/control callbacks when available. Add --layer-details when compositor/layer shape is part of the question; it records LayerTree counts, layer aggregates by DOM tag/class (leaf:b, leaf:u, polycss-camera, etc.), largest layers, and compositing reasons. Add --trace-out when the raw Chrome trace should be preserved for DevTools.

Add --gpu-details when render pass timing is the current question and the trace still needs to stay reasonably sized. Light mode keeps the normal GPU/viz timeline categories and adds only disabled-by-default-viz.gpu_composite_time; render-pass attribution still comes from base events such as DirectRenderer::DrawFrame and DirectRenderer::DrawRenderPass. It intentionally avoids per-quad, Skia command, and GPU service spam.

Use --deep-gpu or --gpu-details full only for rare forensic runs that truly need per-quad/Skia/overdraw detail. Full mode also enables disabled-by-default-viz.quads, disabled-by-default-viz.triangles, disabled-by-default-viz.overdraw, disabled-by-default-gpu.debug, and disabled-by-default-skia.gpu; raw traces can become hundreds of MB and timing can be heavily perturbed.

Use trace.mjs drag for real PolyOrbitControls pointer-drag traces on nonvoxel-vanilla.html. This runner knows the non-voxel readiness hooks, camera state, interaction stats, and per-frame page-work samples.

Use trace.mjs generic for arbitrary pages and interactions that are not covered by a polycss bench page.

When interpreting PolyCSS traces, map the result back to the render model:

  • FunctionCall, EventDispatch, FireAnimationFrame: JS/input work. Unexpected sustained per-frame work is suspicious outside imported skeletal animation.
  • UpdateLayoutTree, RecalculateStyles: style recalculation, often CSS variable or selector invalidation cost.
  • Layout: layout; should stay low for transform/CSS-var-driven motion.
  • PrePaint, Paint, PaintArtifactCompositor::Update, Layerize: paint/compositing setup.
  • LayerTreeImpl::UpdateDrawProperties, draw_property_utils::ComputeDrawPropertiesOfVisibleLayers, LayerTreeHostImpl::PrepareToDraw, MainFrame.Draw, SubmitCompositorFrame: compositor-side cost.
  • Graphics.Pipeline, DisplayScheduler::DrawAndSwap, DirectRenderer::DrawFrame, DirectRenderer::DrawRenderPass: GPU/viz drawing pipeline. Treat these as browser output work, and compare them against layer details before changing app JS.
  • gpuVizRenderPass, gpuVizTiles, gpuVizGpuService: opt-in --gpu-details attribution buckets for render pass, coarse tile/raster playback, and GPU service events.
  • gpuVizQuads and gpuVizSkia: usually require --gpu-details full / --deep-gpu; treat them as high-overhead forensic signals.
  • RasterTask, image decode events: raster/bitmap work, usually atlas or tile work.
Show full SKILL.md (210 more words)Show less

Trace event durations are inclusive and often nested, especially GPU/viz and scheduler events. Use group ms/frame as attribution evidence and for before/after deltas, not as exclusive slices that must add up to frame time.

Generic Capture

For arbitrary pages, use trace.mjs generic:

bash
node .agents/skills/chrome-trace/scripts/trace.mjs generic \
  --url http://127.0.0.1:3000 \
  --ready-js "window.appReady === true" \
  --action drag \
  --selector "#viewport" \
  --drag "480,0" \
  --duration 1200 \
  --steps 90 \
  --summary-out trace-summary.json \
  --trace-out trace.json

Useful alternatives:

bash
node .agents/skills/chrome-trace/scripts/trace.mjs generic --url http://127.0.0.1:3000 --action wait --sample 3000
node .agents/skills/chrome-trace/scripts/trace.mjs generic --url http://127.0.0.1:3000 --action eval --eval "window.rotateScene?.(Math.PI / 2)"
node .agents/skills/chrome-trace/scripts/trace.mjs generic --url http://127.0.0.1:3000 --action scroll --scroll "0,900"

Comparing Runs

Use --report on a runner to generate a Markdown report after capture, or use trace.mjs report on an existing summary JSON:

bash
node .agents/skills/chrome-trace/scripts/trace.mjs report bench/results/garden.json --markdown-out bench/results/garden.md

Use trace.mjs compare on summary JSON files from any runner:

bash
node .agents/skills/chrome-trace/scripts/trace.mjs compare before.json after.json --markdown-out trace-compare.md

Read positive deltas in frame_time_*_ms and trace group ms/frame as more expensive after the change. Read positive FPS deltas as better. Reports include a Quick Read section that calls out p95 frame time and the dominant trace group.

Reporting

Keep the report evidence-led and compact:

  • State the exact command, page, viewport, action, warmup, and sample/settle windows.
  • Include frame-time p50/p95/p99 and slowest-frame count.
  • Identify the dominant trace groups in the action window.
  • Name the top Chrome events, not only broad categories.
  • For polycss, explicitly say whether the trace supports or violates the "no JS in the render loop" expectation.
  • Mention artifacts written, especially the raw trace JSON that can be opened in Chrome DevTools Performance.

If trace markers are missing, say that alignment is weaker and rerun with marks before making a firm claim.

© layoutit, 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 5 other files (scripts) in .agents/skills/chrome-trace of layoutit/polycss.

  • SKILL.md
  • agents/openai.yaml
  • scripts/capture-trace.mjs
  • scripts/polycss-nonvoxel-drag-trace.mjs
  • scripts/polycss-trace-analysis.mjs
  • scripts/trace.mjs

Open the folder on GitHubat commit 04a1b66

Compare with similar skills

Chrome Trace 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.

Chrome Trace compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chrome Trace this skilllayoutit/polycss757—~2kAutomated safety check: PassMIT
Plugin InstallerIgorWarzocha/Opencode-Workflows122—~1.3kAutomated safety check: PassNone
Computed Stylesbitovi/ai-enablement-prompts121—~2.4kAutomated safety check: PassMIT
Sanity Visual Regressionsanity-io/sanity6.4k—~3.4kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Learn Dogfooddebs-obrien/playwright-movies-app102—~1kAutomated safety check: NotesMIT

Similar skills

  • Plugin Installer

    IgorWarzocha/Opencode-Workflows

    Find, install, and configure OpenCode plugins from the catalog or community.

    122 GitHub stars~1.3k tokensUpdated 8 mo ago
    Frontend & DesignAuto-check passed
  • Computed Styles

    bitovi/ai-enablement-prompts

    Extract and compare computed CSS styles between a baseline URL and a dev/Storybook URL using Playwright MCP evaluate calls.

    121 GitHub stars~2.4k tokensUpdated 26 days ago
    Testing & QAAuto-check passed
  • Sanity Visual Regression

    sanity-io/sanity

    Official

    Add, review, and maintain Chromatic visual regression coverage in the Sanity monorepo via dev/storybook stories, the vitest browser-mode suite, and Playwright e2e snapshots.

    6.4k GitHub stars~3.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Learn Dogfood

    debs-obrien/playwright-movies-app

    Dogfood the learn/ course like a new user: docs site walk, fresh clone setup, then Practice and shell steps from each module.

    102 GitHub stars~1k tokensUpdated 6 days ago
    Testing & QAAuto-check: notes
  • Handsontable Visual Testing

    handsontable/handsontable

    Guide to Playwright visual regression tests in Handsontable: when a screenshot is justified, the tablePage fixture, naming, reg-suit comparison and demo routes.

    22k GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed

More from layoutit/polycss

  • Compat Hunter

    layoutit/polycss

    A skill your agent uses when hunting for OBJ/GLB/glTF/VOX parser compatibility issues by streaming candidate models, parsing each immediately, deleting clean files, and retaining only actionable…

    757 GitHub stars~999 tokensUpdated 1 mo ago
    Auto-check passed
  • Polycss

    layoutit/polycss

    Build PolyCSS scenes that render 3D meshes, primitive shapes, or custom polygons as DOM/CSS polygon elements.

    757 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Chrome Trace

What does Chrome Trace do?

Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction. Chrome Trace is an agent skill from layoutit/polycss. Capture and analyze Chrome/Chromium performance traces with Playwright around a concrete browser interaction.

When should I use Chrome Trace?

Chrome Trace fits situations like: Codex needs to answer where frame time is spent during an update; camera movement; DOM/CSS render change; other performance-sensitive UI action.

How do I install Chrome Trace in Claude Code?

Run `npx skills add layoutit/polycss --skill chrome-trace -a claude-code`. Or copy the skill folder (.agents/skills/chrome-trace in layoutit/polycss) into .claude/skills/chrome-trace in your project. Claude Code loads it when a task matches its description.

How do I install Chrome Trace in Codex?

Run `npx skills add layoutit/polycss --skill chrome-trace -a codex`. Or copy the skill folder (.agents/skills/chrome-trace in layoutit/polycss) into .agents/skills/chrome-trace in your project. Codex loads it when a task matches its description.

Can I use Chrome Trace 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 layoutit/polycss --skill chrome-trace -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chrome-trace, .gemini/skills/chrome-trace, .github/skills/chrome-trace and .opencode/skills/chrome-trace in your project.

What does Chrome Trace need to run?

Going by SKILL.md and its folder, Chrome Trace needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and pnpm). Our summary lists: Node.js.

Does Chrome Trace 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 Chrome Trace safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Chrome Trace use?

Chrome Trace 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 Chrome Trace use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Chrome Trace?

Skills that share tags, products or a category with Chrome Trace: Plugin Installer (IgorWarzocha/Opencode-Workflows, 122 stars), Computed Styles (bitovi/ai-enablement-prompts, 121 stars), Sanity Visual Regression (sanity-io/sanity, 6.4k stars) and Web Application Testing (anthropics/skills, 180k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chrome Trace?

layoutit (a GitHub organization) maintains it in layoutit/polycss, which has 757 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 25, 2026.

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