Skill Development

rtt-measure

A Claude Code skill (in the Agent Skills format) that captures the packets of a deployed page's first load and reports how many TCP round trips it takes, how many kB you would need to cut to remove one, and how much headroom you have before adding one.

  • 17 GitHub stars
  • ⚖️ MIT

Last verified: write-up checked

npx skills add kojesung/rtt-measure
rtt-measure — skill preview

What it is

rtt-measure, published by kojesung on 2026-11-12, answers a question bundle-size debates usually skip: does cutting these kilobytes actually make the first load faster? Its premise is that transfer time does not shrink in proportion to bytes. Because of TCP slow start, the server can only send a limited number of segments per round trip at first, so load time falls in steps, at the points where a whole round trip is saved. The skill finds where those steps are for your page. Each run opens the deployed page in a new browser with no cache and no existing connection and captures the packets with tcpdump. From the capture it reads the maximum segment size, the initial congestion window, how many segments went out in each round, CDN cache misses and server wait time. Runs with retransmissions, and waits that are not network round trips, are dropped, and the rest produce an RTT budget: how many round trips the first load takes now, how many kB you would need to cut to lose one, and how many you could add before gaining one. The results come back as a table per stage. It is built for Claude Code but uses the Agent Skills format, so other agents can load it and the scripts run alone. The limits are spelled out: no localhost, HTTP/2 over TCP with QUIC turned off, only same-host resources listed in the HTML, and results noisy enough that real-user data remains the final check. The README is written in Korean, and so are its two example prompts. We read the README; we did not run a capture.

Who it's for

  • Frontend developers deciding whether trimming a bundle is worth it
  • Performance engineers who want slow-start effects measured rather than guessed
  • Teams debating a size budget for the first HTML and critical assets

Requirements

Requirements

  • macOS or Linux with Python 3
  • tcpdump (included on macOS) and permission to capture packets
  • A deployed HTTPS address (production, preview or staging); localhost cannot be measured
  • Claude Code or another agent that loads Agent Skills (the scripts also run on their own)

Setup

  1. Step 1

    bash
    npx skills add kojesung/rtt-measure
  2. Step 2

    bash
    Claude Code: /plugin marketplace add kojesung/rtt-measure
  3. Step 3

    bash
    /plugin install rtt-measure@rtt-measure
  4. Step 4

    bash
    Or copy skills/rtt-measure from a clone into ~/.claude/skills/ or a project's .claude/skills/

مهارة لـClaude Code بصيغة Agent Skills تلتقط حزم الشبكة أثناء أول تحميل لصفحة منشورة، وتخبرك كم رحلة ذهاب وإياب عبر TCP يحتاجها التحميل، وكم كيلوبايت يجب حذفها لتوفير رحلة، وكم يمكنك أن تضيف قبل أن تزيد رحلة.

Examples

Count the round trips of a first load

Prompt
prompt
/rtt-measure https://example.com/ 첫 로딩이 몇 RTT인지 재 줘

Expected output: Korean, as in the README: "measure how many RTTs the first load takes".

Find the size that saves a round trip

Prompt
prompt
https://example.com/ 과 /search 페이지에서 몇 kB 줄이면 RTT가 줄어드는지 측정해 줘

Expected output: Korean, as in the README: "measure how many kB must be cut on / and /search to reduce the RTT count".

Install with the skills CLI

sh
sh
npx skills add kojesung/rtt-measure

What it does: Works for any agent that reads a skills folder.

Pros & cons

Pros

  • Pro:Measures real packets from a fresh browser each run instead of estimating from file sizes
  • Pro:Turns a vague "smaller is faster" into a concrete step: the kB threshold where a round trip disappears
  • Pro:Excludes runs with retransmissions and waits that are not RTT, and shows its working per stage
  • Pro:The agent never asks for or enters your sudo password

Cons

  • Con:macOS or Linux only, and packet-capture permission is required
  • Con:Cannot measure localhost; needs a deployed HTTPS URL
  • Con:Disables QUIC and measures HTTP/2 over TCP, and ignores resources fetched after JavaScript runs or from other hosts
  • Con:Results move with network conditions, so it is not suited to CI pull-request comparisons; README in Korean