Agent skill

Iterative Latency Investigation

by nwjs in nwjs/chromium.src

Iteratively investigate the source of latency in a Chrome build or in an experiment.

BSD-3-ClauseAuto-check passedAgent Workflows

Install Iterative Latency Investigation

skills CLI
$ npx skills add nwjs/chromium.src --skill iterative-latency-investigation -a claude-code

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

GitHub CLI
$ gh skill install nwjs/chromium.src iterative-latency-investigation --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/nwjs/chromium.src.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/iterative-latency-investigation .claude/skills/iterative-latency-investigation && 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
iterative-latency-investigation
GitHub stars
160
Token cost
~3k tokens
SKILL.md length
1,213 words
Files
1
Skills in repo
64
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Iteratively investigate the source of latency in a Chrome build or in an experiment.

  • Works in 3 steps: Orchestrator Input Contract → Swarm Coordination Protocol (The Loop) → Safety & Execution Budgets
  • Tasks that involve SQL
  • SKILL.md covers ⚠️ CRITICAL DESIGN CONSTRAINT:…, 1. Orchestrator Input Contract, 2. Swarm Coordination Protocol… and 3. Safety & Execution Budgets
  • Calls git

What it does

Iterative Latency Investigation is an agent skill from nwjs/chromium.src. Iteratively investigate the source of latency in a Chrome build or in an experiment. Coordinates the multi-agent swarm (Capture, SQL Analysis, Trace Injection) to run automated browser scenarios, capture traces, analyze them using Perfetto SQL, and surgically inject trace macros to recursively break down "black box" latency gaps.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering SQL and Multi-agent orchestration. It works with SQL. The repository describes itself as: Chromium codebase with NW.js modifications. Based on https://chromium.googlesource.com/chromium/src.git. The licence is BSD-3-Clause.

When your agent uses it

  • Tasks that involve SQL
  • Tasks that involve Multi-agent orchestration

Example prompts

  • “black box”
  • “/iterative-latency-investigation”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Orchestrator Input Contract
  2. Swarm Coordination Protocol (The Loop)
  3. Safety & Execution Budgets

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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

Iterative Latency Investigation loads about 3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 1,213 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from nwjs/chromium.src at commit 7b52561, republished under its BSD-3-Clause licence (© nwjs). 1,213 words, ~2,958 tokens.

Download SKILL.mdSave it as .claude/skills/iterative-latency-investigation/SKILL.md (or your agent's skills folder).
name
iterative-latency-investigation
description
Iteratively investigate the source of latency in a Chrome build or in an experiment. Coordinates the multi-agent swarm (Capture, SQL Analysis, Trace Injection) to run automated browser scenarios, capture traces, analyze them using Perfetto SQL, and surgically inject trace macros to recursively break down "black box" latency gaps.

Navigation Latency Orchestration Workflow (Swarm Orchestrator)

This skill defines the main coordination protocol, state machine, and safety loops for the ierative latency investigation orchestrator. The Orchestrator coordinates a swarm of specialized subagents (TelemetryCaptureAgent, SQLTraceAnalyzerInstrumentationAgent, TraceInjectionAgent) to execute targeted browser scenarios, detect uninstrumented "black boxes," and iteratively inject C++ trace macros to break them down.

⚠️ CRITICAL DESIGN CONSTRAINT: NO OPTIMIZATIONS

This system is strictly designed for data collection, diagnosis, and instrumentation. The Orchestrator and its subagents MUST NOT perform any C++ code optimizations, caching, or refactoring. All code changes are exclusively restricted to injecting TRACE_EVENT macros to expose uninstrumented latency gaps.


1. Orchestrator Input Contract

The Orchestrator is initiated with:

  • chrome_binary: Path to the built Chrome executable (e.g. out/Default/chrome).
  • scenario: The Telemetry UI story name to run (e.g. omnibox:search).
  • target_slice: The entrypoint trace event to investigate (e.g. OmniboxEditModel::OpenMatch).
  • arg_key (Optional): Argument key to filter the root target_slice.
  • arg_value (Optional): Argument value to filter the root target_slice (requires arg_key).
  • parent_session_id: Unique UUID for grouping all the artifacts.

2. Swarm Coordination Protocol (The Loop)

The Orchestrator manages the execution across the following phases:

mermaid
graph TD
    Start([Start]) --> BaseCap[Phase 1: Baseline Capture]
    BaseCap --> BaseAna[Phase 2: Baseline SQL Analysis]
    BaseAna --> LoopCheck{Has 'Black Box' Gap?}

    LoopCheck -- "Yes <br/> (Step < 200 & Progressing)" --> PivotCheck{Pivot Focus to Subevent?}
    PivotCheck -- "Yes" --> Pivot[Set Target = Subevent] --> Inject[Phase 3: Trace Injection]
    PivotCheck -- "No" --> Inject
    Inject --> Recompile{Compile Success?}
    Recompile -- Yes --> VerifyCap[Capture Verification Trace]
    VerifyCap --> VerifyAna[Analyze Verification Trace]
    VerifyAna --> LoopCheck

    Recompile -- No --> Revert[Revert Changes]
    Revert --> FinalReport[Phase 4: Final Breakdown Report]

    LoopCheck -- "No / Step Budget Exceeded <br/> / No Progress for 2 Loops" --> FinalReport
    FinalReport --> End([End])

The ochestrator should avoid conducting the trace collection, analysis or code edit itself. Instead, it should define subagents to perform these tasks.

Phase 0: Subagent Definition

At the start of the execution, the Orchestrator must define the specialized subagents:

  1. TelemetryCaptureAgent (Trace Collection Subagent): Runs the [automated-tracing](file:///usr/local/google/home/gjc/chromium/src/agents/skills/automated-tracing/SKILL.md) skill to execute the Telemetry benchmark and collect Perfetto traces.
  2. SQLTraceAnalyzerInstrumentationAgent (Trace Analyzer Subagent): Runs the [analyzing-sql-traces](file:///usr/local/google/home/gjc/chromium/src/agents/skills/analyzing-sql-traces/SKILL.md) skill to extract raw trace data from Perfetto traces and identify performance bottlenecks, structural redundancies, and tracer gaps.
  3. TraceInjectionAgent (Trace Injection Subagent): Runs the [latency-instrumentation](file:///usr/local/google/home/gjc/chromium/src/agents/skills/latency-instrumentation/SKILL.md) skill to surgically inject trace macros (TRACE_EVENT) into Chromium C++ files and compile the browser.
Phase 1: Git Isolation & Initial Baseline Capture
  1. Git Branch Isolation: Before making any code modifications, the Orchestrator must checkout a new isolated local branch from the current commit.
    bash
    git checkout -b e2e_nla_{parent_session_id}
    DO NOT try to checkout to the main branch since the current commit might include new traces and optimizations.
  2. Spawn the TelemetryCaptureAgent subagent to execute the Telemetry benchmark.
  3. Pass parameters: scenario, chrome_binary, and parent_session_id.
  4. Wait for the subagent to return:
    json
    { "status": "SUCCESS", "trace_file_path": "out/e2e_nla_run_{id}/capture/artifacts/run_{ts}/.../trace.pb" }
Phase 2: Baseline SQL Trace Analysis
  1. Spawn the SQLTraceAnalyzerInstrumentationAgent subagent.
  2. Pass parameters: trace_file_path, focus_slice_name (which is the target_slice), parent_session_id, and optional arg_key/arg_value (if initial filters were provided).
  3. Wait for the analyzer to complete and read the generated outputs:
    • out/e2e_nla_run_{id}/analysis/trace_analysis_results.json
    • out/e2e_nla_run_{id}/analysis/trace_analysis_dispatch_report.md
Phase 3: The Iterative Tracer Gap Loop (Focus Stack & Dynamic Termination)

The Orchestrator runs an iterative loop that continues dynamically until either we exceed the total budget (200 agent steps) or we detect no progress for 2 consecutive iterations on the active focus slice.

  • The Focus Stack (Push & Pop): To navigate complex critical paths, the Orchestrator maintains a Focus Stack of targets (each target consists of a slice name and optional argument filters):
    • Initialize: focus_stack = [target_slice] (where target_slice is the root user-provided event, optionally with arg_key/arg_value filters).
    • Push: If a deep bottleneck is discovered, push the subevent (optionally with argument filters to isolate the specific call) onto the stack to drill down.
    • Pop: Once a subevent is successfully decomposed, pop it to return to the parent and resume analyzing siblings.
  • Progress Definition: An iteration is progressing if the uninstrumented self-time of the targeted branch decreases or if new nested child slices are successfully discovered in the verification trace compared to the previous run.
  • No Progress Exit: If we execute 2 consecutive loops without making progress on the active focus slice, we pop the stack. If the stack is empty, abort the loop.

For each iteration:

  1. Check Active Focus: The active target slice is the top element of focus_stack (active_target = focus_stack.peek()).
  2. Check for Gaps: Parse trace_analysis_results.json's black_boxes and bottlenecks under the active_target.
  3. Evaluate Diminishing Returns & Loop Breakers: If the most severe black box under the active_target is < 0.2ms (200us) or < 1.0% of the focus duration, or if the method was already attempted:
    • Pop Stack: The Orchestrator pops the current subevent from the focus_stack, returning the parent to the active position.
    • If the focus_stack is empty, terminate the loop and proceed to Phase 4.
  4. Optional Subevent Focus Push (Milestone Hop):
    • The Orchestrator may optionally choose to push a heavy subevent (e.g., chrome::Navigate or FrameTreeNode::DidStartLoading discovered inside the parent) onto the focus_stack.
    • When pushing a subevent, the Orchestrator should optionally include specific TRACE_EVENT argument filters (e.g., arg_key and arg_value) if they are needed to uniquely identify and isolate the target subevent call (for instance, to avoid analyzing initialization calls of the same method).
    • The pushed subevent (with its optional filters) becomes the new active_target for the next iterations' SQL analysis and trace injection.
  5. Select Target: Select the highest-priority uninstrumented bottleneck method (strategy "GAP_INSTRUMENTATION") inside the active_target.
  6. Spawn Trace Injection Agent:
    • Provide: target_method, instructions, category, and parent_session_id.
    • Wait for compilation confirmation (which commits successfully compiled changes to the git branch, or resets hard to HEAD on failure).
  7. Subagent Resilience (Retry Policy):
    • If any subagent call fails (e.g., TraceInjectionAgent returns "FAILED", or TelemetryCaptureAgent fails to capture):
      • First Failure: Log the error and immediately retry spawning the same subagent with the identical payload once.
      • Second Consecutive Failure: Abort the loop, clean up, and proceed to Phase 4.
  8. Verify and Capture Deeper Trace:
    • If compilation and injection succeed:
      • Spawn TelemetryCaptureAgent to capture a new verification trace (trace_verification_{iteration}.pb).
      • Spawn SQLTraceAnalyzerInstrumentationAgent to parse the new trace under the active_target (passing focus_slice_name and its associated arg_key/arg_value filters if present).
      • Re-read trace_analysis_results.json to verify the breakdown.
    • If the injection agent fails permanently (after the retry):
      • Pop the focus_stack (or abort loop) and proceed to Phase 4.
Show full SKILL.md (279 more words)Show less
Phase 4: Overall Investigation Report

Once the loop terminates, the Orchestrator composes an Overall Investigation Report on the user-provided root event (the initial focus target).

  1. Retrieve the baseline and all iteration trace data, text flamegraphs, and findings.
  2. Compile the Overall Diagnostic Investigation Report inside the workspace:
    • Path: out/e2e_nla_run_{parent_session_id}/analysis/overall_investigation_report.md
  3. The report MUST contain:
    • Executive Summary: Latency metrics of the root user-provided event, overall list of newly instrumented methods, and the cumulative uninstrumented gap reduction.
    • The Tree of Discovery (Milestone Hops): If focus was pivoted to subevents (e.g., root OpenMatch -> pivot Navigate), illustrate the hierarchical deep-dive path. If code change are made, include the git branch name of the code change in the document.
    • Baseline vs. Deep-Dive Flamegraphs: Side-by-side text flamegraphs showing how the initial baseline "black boxes" under the root event were successfully decomposed into fine-grained, nested child operations.
    • Structural Revelations: A detailed architectural breakdown of the operations discovered blocking the main thread inside the previously hidden blocks (e.g. loops, observer dispatches, blocking IPCs).
  4. Present the completed final report to the user.

3. Safety & Execution Budgets

The Orchestrator MUST strictly enforce these safety limits to protect the workspace and compute budgets:

  • Swarm Step Cap: Max 200 total steps across all subagents.
  • Progress Watchdog: Stop immediately if 2 consecutive iterations yield no progress.
  • Subagent Resilience: Allow exactly 1 retry on a subagent task failure before aborting.
  • Execution Timeout: Max 180 minutes (to allow for slow Chromium compiles).
  • Workspace Safety Rollback: If the entire run fails or is aborted:
    • Switch back to the main branch: git checkout main (or the original baseline branch).
    • Delete the temporary branch: git branch -D e2e_nla_{parent_session_id} to restore the developer's workspace completely untouched.

© nwjs, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agents/skills/iterative-latency-investigation of nwjs/chromium.src.

Open the folder on GitHubat commit 7b52561

Compare with similar skills

Iterative Latency Investigation 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.

Iterative Latency Investigation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Iterative Latency Investigation this skillnwjs/chromium.src160—~3kAutomated safety check: PassBSD-3-Clause
Databasegridaco/grida2.7k—~3.2kAutomated safety check: PassApache-2.0
Relational Database MCP CloudbaseMicrock/ordinary-claude-skills4042 repos~1.3kAutomated safety check: PassCustom licence
Planetscale Pscale CLI Automationplanetscale/skills133—~880Automated safety check: PassMIT
Tune Monitorsickn33/agentic-awesome-skills47k1 repos~3.3kAutomated safety check: PassApache-2.0
Sap Hana CLIsecondsky/sap-skills462—~3.1kAutomated safety check: NotesGPL-3.0

Similar skills

  • Database

    gridaco/grida

    Use BEFORE editing any file in supabase/migrations/ or supabase/schemas/, OR when the user runs a /database subcommand (compact local migration, rls scenarios, align).

    2.7k GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Relational Database MCP Cloudbase

    Microck/ordinary-claude-skills

    This is the required documentation for agents operating on the CloudBase Relational Database.

    404 GitHub starsUsed in 2 repos~1.3k tokens
    Agent WorkflowsAuto-check passed
  • Official

    Use the PlanetScale CLI (pscale) from automated agents with --format json, auth check, pscale sql, and per-command --force.

    133 GitHub stars~880 tokensUpdated today
    DatabasesAuto-check passed
  • Tune Monitor

    sickn33/agentic-awesome-skills

    Analyze a Monte Carlo monitor and recommend config changes to reduce alert noise.

    47k GitHub starsUsed in 1 repo~3.3k tokens
    DatabasesAuto-check passed
  • Sap Hana CLI

    secondsky/sap-skills

    Assists with SAP HANA Developer CLI (hana-cli) for database development and administration.

    462 GitHub stars~3.1k tokensUpdated 5 days ago
    DatabasesAuto-check: notes
  • Official

    Query Auto Ontology and validate generated SQL, rows, and answers.

    3.6k GitHub stars~1.7k tokensUpdated yesterday
    DatabasesAuto-check passed

More from nwjs/chromium.src

All 64 skills in this repo
  • Analyzing SQL Traces

    nwjs/chromium.src

    Extracts raw trace data from Perfetto traces, runs arbitrary SQL queries for custom follow-up analysis, and applies expert cognitive principles (Tiered Flow Analysis, Semantic Mismatch, Redundancy)…

    160 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Autonomous multi-agent performance optimization loop for Chromium and V8.

    160 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Automated Tracing

    nwjs/chromium.src

    Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks.

    160 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Chrome Releases

    nwjs/chromium.src

    Queries Chrome commit, version, release, and milestone metadata.

    160 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Chromium Docs

    nwjs/chromium.src

    Search and reference Chromium documentation from the local docs index, including design docs, APIs, and development guides.

    160 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Gn Deps Debugging

    nwjs/chromium.src

    Diagnose Chromium GN dependency and include-visibility failures, including BUILD.gn deps/publicdeps, DEPS include rules, private headers, and circular dependencies.

    160 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Iterative Latency Investigation

What does Iterative Latency Investigation do?

Iteratively investigate the source of latency in a Chrome build or in an experiment. src. Iteratively investigate the source of latency in a Chrome build or in an experiment.

When should I use Iterative Latency Investigation?

Iterative Latency Investigation fits situations like: tasks that involve SQL; tasks that involve Multi-agent orchestration.

How do I install Iterative Latency Investigation in Claude Code?

Run `npx skills add nwjs/chromium.src --skill iterative-latency-investigation -a claude-code`. Or copy the skill folder (agents/skills/iterative-latency-investigation in nwjs/chromium.src) into .claude/skills/iterative-latency-investigation in your project. Claude Code loads it when a task matches its description.

How do I install Iterative Latency Investigation in Codex?

Run `npx skills add nwjs/chromium.src --skill iterative-latency-investigation -a codex`. Or copy the skill folder (agents/skills/iterative-latency-investigation in nwjs/chromium.src) into .agents/skills/iterative-latency-investigation in your project. Codex loads it when a task matches its description.

Can I use Iterative Latency Investigation 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 nwjs/chromium.src --skill iterative-latency-investigation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/iterative-latency-investigation, .gemini/skills/iterative-latency-investigation, .github/skills/iterative-latency-investigation and .opencode/skills/iterative-latency-investigation in your project.

What does Iterative Latency Investigation need to run?

Going by SKILL.md and its folder, Iterative Latency Investigation needs the command-line tools its instructions call (git).

Does Iterative Latency Investigation access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Iterative Latency Investigation 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. Review the folder before installing.

What licence does Iterative Latency Investigation use?

Iterative Latency Investigation is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Iterative Latency Investigation use?

About 3k tokens (SKILL.md is roughly 12k 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 Iterative Latency Investigation?

Skills that share tags, products or a category with Iterative Latency Investigation: Database (gridaco/grida, 2.7k stars), Relational Database MCP Cloudbase (Microck/ordinary-claude-skills, 404 stars), Planetscale Pscale CLI Automation (planetscale/skills, 133 stars) and Tune Monitor (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Iterative Latency Investigation?

nwjs (a GitHub organization) maintains it in nwjs/chromium.src, which has 160 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 10, 2026.

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