Skills Agentes

Simplify Trace

Resume un trace grande de Chrome DevTools Performance en un informe markdown compacto para analizarlo sin cargar el archivo completo, útil para encontrar lentitud, jank o funciones JS calientes.

Reemplaza a: Leer manualmente el JSON crudo del trace en el DevTools Performance panel

Estrellas
50.3k

en todo el repo

Actividad
47

0–100, la ruta de este skill

Actualizado
hace 2 meses

último commit aquí

Commits
1

últimos 90 días

Contexto
1.1k tok

88 tok en reposo

Paquete
2 archivos

22 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add tldraw/tldraw --skill simplify-trace --agent claude-code

Se instala solo en este repositorio.

Este skill reads environment config.

Qué hace

  • Convierte un trace de Chrome DevTools Performance de decenas o cientos de MB en un informe markdown de pocos KB
  • Genera tablas de long tasks, eventos más frecuentes, funciones JS más calientes y desglose por categoría
  • Permite acotar el informe a una ventana temporal con --window o filtrar filas con --match
  • Ofrece secciones opcionales como timeline, network y websocket para localizar actividad

Úsalo cuando

  • Se te da un trace de Chrome/DevTools/Performance panel (un Trace-*.json o *.json con traceEvents) multi-MB
  • Te preguntan qué está lento, qué se ejecuta demasiado, tareas largas, jank o funciones JS calientes

No lo uses cuando

    Qué lo activa

    Di cualquiera de estas frases y el agente debería cargar este skill.

    • Analiza este Trace-2024.json y dime qué está causando el jank
    • Resume este trace de performance de Chrome y dime las funciones JS más lentas
    • Encuentra las long tasks en este archivo de performance trace

    SKILL.md

    En inglés

    Simplify trace

    Chrome DevTools performance traces are tens to hundreds of MB of JSON — far too large to read directly. This skill turns one into a few-KB markdown report that surfaces the work taking too long or happening too often.

    Usage

    Run the script on the trace file. It prints markdown to stdout (or --out FILE):

    node skills/simplify-trace/scripts/simplify-trace.mjs <trace.json> [--top N] [--long-task-ms MS] [--window START-END] [--out report.md]
    
    • --top N — rows per table (default 25).
    • --long-task-ms MS — long-task threshold (default 50).
    • --window START-END — scope the whole report to a time slice (offsets in ms from trace start).
    • --only a,b / --except a,b / --all — pick which sections to emit.
    • --match TEXT — case-insensitive filter for rows (event names, function names, URLs).
    • --list — print the available section keys and exit.
    • --out FILE — write to a file instead of stdout.
    • Traces over ~500 MB: prefix node --max-old-space-size=8192.

    Default to running with --out to a temp file for big traces, then read the report. Don't read the raw trace.

    Sections

    Default sections: summary, longtasks, events, frequent, functions, categories. Opt-in: timeline (per-second main-thread busy time — use to locate activity), network (resource/fetch waterfall with TTFB/duration/size), websocket (WebSocket lifecycle — /app/file doc sync). Run --list for the full set. Interrogate narrowly, e.g.:

    # where is the activity? then window to it
    node …/simplify-trace.mjs trace.json --only timeline
    # what was the network/socket doing during the action?
    node …/simplify-trace.mjs trace.json --only network,websocket --window 62000-69000 --match tldraw
    

    The trace's metadata.startTime (ISO/UTC) anchors offset 0 to wall-clock, so trace offsets can be lined up against server logs (zero-cache, sync-worker) by timestamp. For an idle, network-quiet gap, the trace shows when but not why — add performance.mark()/console.timeStamp() in the client path and they appear on the trace timeline.

    "What happens when I do X" traces

    A recording of a single action (switch file, open menu) is mostly idle setup time, which dilutes the action across the whole trace. Window to the action instead:

    1. Run once with no window. Note where activity is — the long tasks' offsets, or bucket main-thread busy-time per second with a quick inline script to find the active span.
    2. Re-run with --window START-END around that span. All tables then describe only the action.

    The recording artifact CpuProfiler::StartProfiling (the profiler turning on, ~50–60ms) is excluded from the long-task table, including when it's nested inside a RunTask. If long tasks shows "None", the action genuinely has no single blocking task — look at aggregate self time, GC, and animation-loop events instead.

    What the report contains

    • Header — event count, wall-clock span, sampled JS CPU time, and idle %.
    • Long tasks — top-level tasks over the threshold (main-thread jank), with the time offset where each occurred.
    • Hottest event types (self time) — where engine/browser time actually goes (layout, GC, paint, function calls), excluding time spent in nested children.
    • Most frequent event types (count) — work happening too often.
    • Hottest JS functions — bottom-up self time from the embedded V8 CPU profile, with file:line. Synthetic (idle)/(program) frames are excluded here (idle is in the header).
    • Self time by category — high-level breakdown across trace categories.

    How to read it

    • A function high in self time is the actual cost; high total but low self means the cost is in its callees — follow the call tree.
    • High count with low avg = death by a thousand cuts (often a reactive/render loop firing too often); investigate why it fires, not its per-call cost.
    • Long tasks point at when jank happened; cross-reference the offset against what the user was doing.
    • Minified names (r, Tg) come with a file:line — use it to locate the source.

    The script only summarizes; it does not modify the trace.

    Reproducido de tldraw/tldraw bajo licencia NOASSERTION. Leer esta página en markdown.

    Archivos

    2 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

    Antes de instalar

    Requiere Node.js para ejecutar el script scripts/simplify-trace.mjs; para traces >500MB usar node --max-old-space-size=8192.

    Necesita en el PATH:node

    Variables de entorno:SECTIONS

    Detalles

    Creador
    tldraw
    Licencia
    NOASSERTION
    Recursos incluidos
    scripts en javascript
    Repositorio
    tldraw/tldraw
    Código fuente
    Ver SKILL.md

    Etiquetas

    Más de tldraw/tldraw

    Este repo incluye 27 skills. Si instalas uno, normalmente ya tienes los demás. Ver el pack tldraw entero y su comando de instalación

    Actualiza el archivo de notas de release apps/docs/content/releases/next.mdx en tldraw/tldraw según los PRs desde el último release, o archiva next.mdx a un archivo versionado al publicarse una nueva versión.

    Costo de contexto al activarse
    4k tok
    Tamaño del paquete
    6 archivos
    Última actualización
    anteayer
    documentos

    Estándares de referencia para escribir títulos y descripciones de pull request en el repo tldraw/tldraw, más el barrido de comentarios previo sobre el diff; guía de apoyo, no el flujo de crear/actualizar PR.

    Costo de contexto al activarse
    4.7k tok
    Tamaño del paquete
    3 archivos
    Última actualización
    hace 7 días
    herramientas desarrollo

    Escribir posts técnicos de blog sobre las características de tldraw y detalles de implementación. Úsalo al crear contenido sobre cómo tldraw resuelve problemas interesantes.

    Costo de contexto al activarse
    1.3k tok
    Tamaño del paquete
    2 archivos
    Última actualización
    hace 25 días
    redaccion contenido

    Pr

    50.3k

    Crea o actualiza un pull request para la rama actual en el repositorio tldraw. Úsalo al invocar pr, crear/actualizar un PR, subir cambios para revisión o preparar un pull request.

    Costo de contexto al activarse
    979 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 27 días
    herramientas desarrollo

    Publica en el canal de Discord #development quién tuvo cambios críticos o funciones destacadas en el release semanal de tldraw.com, revisando el rango de commits production...main y avisando por webhook.

    Costo de contexto al activarse
    1.9k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    el mes pasado
    devops infraestructura

    Crea un video walkthrough narrado de un pull request con diapositivas de código y narración de audio. Úsalo cuando te pidan un PR walkthrough, PR video o video walkthrough.

    Costo de contexto al activarse
    3.6k tok
    Tamaño del paquete
    9 archivos
    Última actualización
    el mes pasado
    herramientas desarrollo

    Skills relacionados

    Reimplementa la rama actual en una nueva rama con un historial de commits limpio y narrativo, listo para revisión.

    Costo de contexto al activarse
    525 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 4 meses
    herramientas desarrollo

    Crea un commit de git para los cambios actuales. Úsalo cuando te pidan commitear cambios, hacer un commit, generar un mensaje de commit o commitear el worktree con contexto opcional.

    Costo de contexto al activarse
    436 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 4 meses
    herramientas desarrollo

    Se usa cuando el usuario pide añadir soporte de MCP App a su web app, convertir una SPA o envolver una UI existente como MCP App híbrida manteniendo el funcionamiento standalone.

    Costo de contexto al activarse
    5.1k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 6 meses
    herramientas desarrollo