request-transit
/request-transit
A public transit map for your requests. Use when the user wants to visualize, animate or share how a request moved through services, from a distributed trace (OpenTelemetry/OTLP, Datadog, PostHog, AWS X-Ray, Grafana Tempo). Draws the trace as an animated subway map (services are lines, hops are stations, slow and failed calls are service alerts) and can render a frame-exact MP4/GIF.
- Author
- israelvicars ↗
- Repository
- transit ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 86
- Scripts
- 57
- HTML comments
- 1
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 57 scripts in this package. Review them before installing, as Claude may execute them.
- SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.
Scripts: core/adapters.mjs, core/build.mjs, core/cli.mjs, core/export.mjs, core/fsguard.mjs, core/gaps.mjs, core/render-frames.mjs, core/render.mjs, core/scrub.mjs, core/setup.mjs, core/still.mjs, core/tools.mjs, core/verdict.mjs, core/verify.mjs, core/vocab.mjs, src/agent-transit/adapters/normalize-agent.mjs, src/ci-transit/adapters/normalize-gh.mjs, src/request-transit/adapters/fetch-datadog-api.mjs, src
What it does and when to use it
A public transit map for your requests. Use when the user wants to visualize, animate or share how a request moved through services, from a distributed trace (OpenTelemetry/OTLP, Datadog, PostHog, AWS X-Ray, Grafana Tempo). Draws the trace as an animated subway map (services are lines, hops are stations, slow and failed calls are service alerts) and can render a frame-exact MP4/GIF.
Original author description
A public transit map for your requests. Use when the user wants to visualize, animate or share how a request moved through services, from a distributed trace (OpenTelemetry/OTLP, Datadog, PostHog, AWS X-Ray, Grafana Tempo). Draws the trace as an animated subway map (services are lines, hops are stations, slow and failed calls are service alerts) and can render a frame-exact MP4/GIF.
How it works
- Where things are
- First run
- Steps
- Rules
- Interactive page
- AWS X-Ray traces
- Single-service traces
- Jaeger traces
- Grafana Tempo traces
- Contract layer (optional: ask first)
SKILL.md preview
---
name: request-transit
description: A public transit map for your requests. Use when the user wants to visualize, animate or share how a request moved through services, from a distributed trace (OpenTelemetry/OTLP, Datadog, PostHog, AWS X-Ray, Grafana Tempo). Draws the trace as an animated subway map (services are lines, hops are stations, slow and failed calls are service alerts) and can render a frame-exact MP4/GIF.
---
<!-- Generated from src/request-transit/SKILL.md; do not edit -->
# Transit
A public transit map for your requests.
🔒 Runs entirely on the user's machine; traces never leave it. No telemetry, tracking or analytics. The built page makes no network requests. The only network use is first-run setup downloads and the optional fetch scripts against the user's own backend.
## Where things are
`<skill>` below means the folder containing this SKILL.md (resolve the symlink if needed). Run every
script from it by absolute path, e.g. `node <skill>/core/render.mjs ./trace.json --name x --out-dir ./transit-out`.
Trace paths are relative to the user's working directory. Pass `--out-dir` (render) or `--out` (build)
so results land in the user's working directory, not inside the skill folder.
## First run
Every script checks its own prerequisites the first time (`<skill>/core/setup.mjs`) and records the result in
`.transit-cache/setup.json`. It reuses before it downloads:
- **Browser:** Playwright's cached build, then any cached Chromium, then system Chrome/Edge. Only if none launches does it download `chromium-headless-shell` (~100 MB, announced first).
- **ffmpeg:** the pinned `ffmpeg-static` dependency (in package.json and the lockfile), then `TRANSIT_FFMPEG`, then ffmpeg on PATH. ffprobe is not needed. Transit never installs system packages: if ffmpeg is missing it prints the command (`npm rebuild ffmpeg-static`, or a system install) and stops.
- **npm deps:** `playwright-core` and `ffmpeg-static`, project-local in node_modules. Needs Node 20+.
- Pinned ffmpeg makes MP4/GIF bytes reproducible across machines; a different ffmpeg (`TRANSIT_FFMPEG`) encodes the same frames to different bytes.
`node <skill>/core/setup.mjs --check` reports what would be used or downloaded and changes nothing. Tell the user before a download if they care about bandwidth. Other switches:
- `--no-download` / `TRANSIT_NO_DOWNLOAD=1` forbids downloads.
- `TRANSIT_BROWSER=/path|chrome|msedge` forces a browser.
- `TRANSIT_SKIP_SETUP=1` skips the check.
## Steps
1. **Get the trace into a file.** A plain OTLP JSON or Datadog span JSON file needs no setup.
For Datadog interactively, use the Datadog MCP server to fetch the trace's spans and save the raw
JSON to a file; headless, use `node <skill>/src/request-transit/scripts/fetch.mjs datadog-api <trace_id>`.
For PostHog Distributed Tracing, call the PostHog MCP tool `apm-trace-get` (find ids with
`query-apm-spans`), follow pages until `hasMore` is false, and save the JSON; headless,
`node <skill>/src/request-transit/scripts/fetch.mjs posthog-api <trace_id>` (needs `POSTHOG_API_KEY` = a personal API key `phx_` with `tracing:read`; project tokens `phc_` and project secret keys `phs_` are rejected). See `<skill>/src/request-transit/references/adapters.md`.
2. **Build the page to share:** `node <skill>/core/build.mjs <trace.json> --share --title "Checkout: one order"`.
Without `--out` the file is named after the title and the failing service, in `./transit-out/`, e.g. `transit-out/checkout-email-service-alert.html`
(`transit-out/transit.html` when there is nothing to name it after; an existing file gets `-2`, `-3`, ... rather than being overwritten). `--share` scrubs at the strict level, refuses `--no-scrub`, and makes
the page open paused on the first SERVICE ALERT with its hop in the side panel and a one-line verdict above the map.
Leave out `--share` for a page that autoplays from the start. `?t=4.5` freezes one frame.
3. **Share it: the HTML file is the thing to share.** Give the user the file path and the verdict line the build printed
(`share: drop <path> into Slack. Suggested message: "..."`), ready to paste. They drag the file into Slack (desktop and iOS
open it as the interactive page), a PR or an incident doc. Use the printed verdict as is; never write your own. It carries a short cause; the full error message stays in the side panel and the verdict line's tooltip. For example:
> email failed after 671 ms: SMTP timeout · SERVICE ALERT · 23 hops
> `checkout-email-service-alert.html` opens on the failing hop. Click any station for its timing and attributes.
4. **Optional teaser (GIF + MP4):** for a feed post or a README, `node <skill>/core/render.mjs <trace.json> --name <name> --out-dir ./transit-out/<name> --title "..."` writes
`anim.mp4`, `anim.gif`, `contact.png`. Needs `ffmpeg` and Playwright Chromium. Post the HTML file alongside it for the details.
5. **Check it:** `node <skill>/core/verify.mjs <trace.json> --name <name>` (two renders byte-identical,
train timing, ffmpeg freeze/black gates). Then look at `contact.png` and two stills yourself
before handing it over.
6. Report what the map shows: slow hops (amber DELAY), error origins (red SERVICE ALERT with reason),
and the hop table (every hop is listed as infrastructure or unmatched; none are hidden).
## Rules
- Only render with the bundled scripts. If they fail (for example Chromium can't launch inside an agent
sandbox, or ffmpeg is missing), stop and tell the user the exact error and the command to rerun with
more permissions. Never hand-write a substitute renderer or a look-alike GIF.
- Never upload the trace or the render anywhere unless the user asks.
- Span attributes can contain PII. Default redaction drops user/email/token/auth/card-like keys;
add more with `--redact key1,key2`. Payloads are never shown (tracers don't store them).
- Values are scrubbed too, by default (safe to share): emails, bearer/JWT/known-prefix tokens, `password=`/`api_key=`
style secrets, URL credentials and query strings, long hex/base64 secrets, UUIDs, home-directory names and AWS
account ids in ARNs, across service and span names, status messages and URLs. `--strict` also
removes IPs, internal host names, long numeric ids and all but a minimal attribute set. `--share` is `--strict` plus the
open-on-the-alert page and the verdict line, and it refuses `--no-scrub`. `--keep-uuids` keeps UUIDs;
`--no-scrub` turns it off for local debugging only (the page then says not to share it).
- Useful flags: `--slow-ms N`, `--ms-per-sec N`, `--target-seconds 9`, `--trace-id ID`, `--format otlp|datadog|datadog-v2|internal`.
Details: `references/adapters.md`, `references/config.md`, `references/extractors.md`.
## Interactive page
Open `transit-out/<name>/transit.html` in a browser. Video renders hide all of this, and `renderAt(t)` stays a pure function of t. Selection is drawn as an overlay after it, so frames are byte-identical.
- **Hops:** `N` / `↓` / `Shift+→` next hop, `P` / `↑` / `Shift+←` previous hop. The hop is highlighted and the panel opens.
- **Time:** `←` / `→` seek 0.5 s, `,` / `.` one frame, `Home` / `End`, `Space` play/pause. Pausing selects the hop in progress, and playing clears the selection.
- **Speed:** `1` / `2` / `3` = 0.5x / 1x / 2x, or the speed buttons.
- **Click:** a station, train, line or strip tick to select that hop. Clicking empty map toggles play.
- **Side panel:** station-sign header (line bullet + service), a breadcrumb of stops from the root, a mini waterfall (this hop inside its parent, self time solid), kind/start/duration/self, status/error, the expected request/response cards, grouped attributes (HTTP, DB, messaging, RPC, other; the long tail folds away) and child links. The panel also shows the expected request/response when the page was built with contracts (see below).
- **Links:** `#span=<id>` (or `?span=` / `?pin=`) selects a span. `?` shows the shortcut help, and `Esc` closes it or deselects.
- **Tests:** `npm run test:ui` runs the Playwright keyboard and click tests.
## AWS X-Ray traces
- File: pass a BatchGetTraces response or the segment documents straight to build/render (auto-detected as `xray`).
- CLI (headless, **untested live**): `node <skill>/src/request-transit/scripts/fetch.mjs xray <1-xxxxxxxx-… or 32-hex id>` writes `traces/<id>.xray.json`, and `node <skill>/src/request-transit/scripts/fetch.mjs xray --find --filter 'fault = true'` lists candidate ids. Uses the user's AWS CLI credentials; never store keys.
- MCP (interactive): if the AWS Labs CloudWatch Application Signals MCP server is connected, call `get_xray_trace`, save the result to a file, then use the file. Check the saved shape first; it has not been verified live.
- X-Ray samples about 5% of requests by default, so a specific request may have no trace.
## Single-service traces
If every span comes from one service (a monolith, or `telemetrygen`), stations are operations instead: each child span is placed by its span name, with a trailing counter or id dropped so numbered spans share a station. The real service stays in the span's `service.name` attribute.
## Jaeger traces
- File: Jaeger v2 serves OTLP JSON at `/api/v3/traces/<id>` (or `/api/v3/traces?query.service_name=...` for a search). Save the response and pass it straight to build/render; the `{result: ...}` wrapper is auto-detected as `jaeger`. A search response can hold many traces: the one with the most spans is used unless `--trace-id` is given.
## Grafana Tempo traces
- File: pass a Tempo `/api/v2/traces/<id>` or `/api/traces/<id>` JSON response straight to build/render (auto-detected as `tempo`).
- API (headless): `node <skill>/src/request-transit/scripts/fetch.mjs tempo <trace_id>` with `TEMPO_URL` (+ optional `TEMPO_TOKEN`, or `TEMPO_USER`/`TEMPO_PASSWORD`, `TEMPO_TENANT`) writes `traces/<id>.tempo.json`; `tempo --find '{ status = error }'` lists ids. Tested on a mock server only.
- MCP (interactive): Grafana's MCP server (`get_tempo_trace`) or Tempo's built-in `/api/mcp` (`get-trace`). Save the OTLP JSON result to a file, then use the file. Don't use the `vnd.grafana.llm` format.
## Contract layer (optional: ask first)
This layer reads the user's source code, so it is never run by default.
1. **Ask the user before indexing.** For example: "Do you want me to build a contract index from your code, so each hop shows its expected request and response? It reads the service repos listed in transit.config.json and keeps the results only in .transit-cache/." Only continue on a clear yes.
2. If they agree and there is no `transit.config.json`, write one with them (see `references/config.md`). It maps each service name to a repo path and lists shared packages, route prefixes and infrastructure names.
3. Run `node <skill>/src/request-transit/scripts/transit.mjs index --config transit.config.json --print`. Results are cached per file hash in `.transit-cache/contracts/`. Never commit that folder.
An index that already exists in `.transit-cache/` may be reused only when the user asked for contracts.
4. Build with `--contracts`: `node <skill>/core/build.mjs <trace> --contracts --out ./transit-out/<name>/transit.html`. Without the flag, no index is read and the panel says contracts are not indexed.
5. In the panel, matched hops show request and response cards with fields, required markers, a source badge (validator or type), a confidence dot and file:line. Infrastructure hops and unmatched hops show why. Report the unmatched hops to the user rather than guessing their shape.
Demo with no user code: `npm run index:example && npm run build:contracts`. This uses the synthetic sample app in `<skill>/src/request-transit/examples/astronomy-shop/`.
Files in this package (86)
- LICENSE 1 KB
- README.md 1 KB
- SKILL.md 12 KB
- package.json 1 KB
- core/adapters.mjs 1 KB
- core/build.mjs 11 KB
- core/cli.mjs 2 KB
- core/export.mjs 5 KB
- core/fsguard.mjs 3 KB
- core/gaps.mjs 2 KB
- core/render-frames.mjs 5 KB
- core/render.mjs 2 KB
- core/scrub.mjs 9 KB
- core/setup.mjs 15 KB
- core/still.mjs 1 KB
- core/tools.mjs 3 KB
- core/transit.template.html 84 KB
- core/verdict.mjs 6 KB
- core/verify.mjs 4 KB
- core/vocab.mjs 5 KB
- core/fonts/OFL-Arimo.txt 4 KB
- core/fonts/arimo-400.woff 12 KB
- core/fonts/arimo-700.woff 12 KB
- src/agent-transit/adapters/normalize-agent.mjs 15 KB
- src/ci-transit/adapters/normalize-gh.mjs 7 KB
- src/request-transit/adapters/fetch-datadog-api.mjs 3 KB
- src/request-transit/adapters/fetch-posthog-api.mjs 4 KB
- src/request-transit/adapters/fetch-tempo.mjs 5 KB
- src/request-transit/adapters/fetch-xray.mjs 3 KB
- src/request-transit/adapters/normalize.mjs 30 KB
- src/request-transit/contracts/indexer.mjs 13 KB
- src/request-transit/contracts/match.mjs 5 KB
- src/request-transit/contracts/schema.mjs 3 KB
- src/request-transit/contracts/text.mjs 3 KB
- src/request-transit/contracts/extractors/class-validator.mjs 3 KB
- src/request-transit/contracts/extractors/express.mjs 2 KB
- src/request-transit/contracts/extractors/index.mjs 1 KB
- src/request-transit/contracts/extractors/joi.mjs 2 KB
- src/request-transit/contracts/extractors/nest.mjs 4 KB
- src/request-transit/contracts/extractors/openapi.mjs 3 KB
- src/request-transit/contracts/extractors/protobuf.mjs 4 KB
- src/request-transit/contracts/extractors/topic-producer.mjs 1 KB
- src/request-transit/contracts/extractors/ts-types.mjs 1 KB
- src/request-transit/contracts/extractors/zod.mjs 3 KB
- src/request-transit/examples/README.md 1 KB
- src/request-transit/examples/astronomy-shop/README.md 2 KB
- src/request-transit/examples/astronomy-shop/transit.config.json 1 KB
- src/request-transit/examples/astronomy-shop/packages/shop-schemas/package.json 1 KB
- src/request-transit/examples/astronomy-shop/packages/shop-schemas/src/cart.dto.ts 1 KB
- src/request-transit/examples/astronomy-shop/packages/shop-schemas/src/index.ts 1 KB
- src/request-transit/examples/astronomy-shop/packages/shop-schemas/src/money.ts 1 KB
- src/request-transit/examples/astronomy-shop/packages/shop-schemas/src/order.ts 1 KB
- src/request-transit/examples/astronomy-shop/proto/shop/money.proto 1 KB
- src/request-transit/examples/astronomy-shop/services/accounting/src/orders.consumer.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/cart/src/cart.controller.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/checkout/src/checkout.controller.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/checkout/src/dto/place-order.dto.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/currency/src/currency.controller.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/email/src/server.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/frontend/src/checkout.route.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/frontend/src/validate.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/payment/src/payment.controller.ts 1 KB
- src/request-transit/examples/astronomy-shop/services/product-catalog/src/catalog.proto 1 KB
- src/request-transit/examples/astronomy-shop/services/quote/openapi.json 1 KB
- src/request-transit/examples/astronomy-shop/services/shipping/src/routes.ts 1 KB
- src/request-transit/references/adapters.md 6 KB
- src/request-transit/references/agent-testing.md 3 KB
- src/request-transit/references/config.md 2 KB
- src/request-transit/references/distribution.md 14 KB
- src/request-transit/references/extractors.md 4 KB
- src/request-transit/references/more-sources.md 8 KB
- src/request-transit/references/readme-research.md 7 KB
- src/request-transit/references/sources-research.md 12 KB
- src/request-transit/samples/datadog-sample.json 7 KB
- src/request-transit/samples/datadog-v2-sample.json 2 KB
- src/request-transit/samples/make-otel-demo-checkout.mjs 8 KB
- src/request-transit/samples/make-posthog-sample.mjs 3 KB
- src/request-transit/samples/make-tempo-sample.mjs 2 KB
- src/request-transit/samples/make-xray-sample.mjs 5 KB
- src/request-transit/samples/otel-demo-checkout.otlp.json 43 KB
- src/request-transit/samples/posthog-checkout.json 35 KB
- src/request-transit/samples/tempo-checkout.json 44 KB
- src/request-transit/samples/xray-checkout.json 12 KB
- src/request-transit/scripts/extract.mjs 1 KB
- src/request-transit/scripts/fetch.mjs 3 KB
- src/request-transit/scripts/transit.mjs 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · israelvicars/transit | 100 | MIT |
| israelvicars/transit | 100 | MIT |
Database snapshot: 13.11.2026 · package version 5ec6e03f7859 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100ci-transit
A transit map for your CI runs. Use when the user wants to visualize a GitHub Actions run as a subway map. Draws jobs as lines, steps as stations, and failed, cancelled or slow steps as service alerts. - 100ci-transit
A transit map for your CI runs. Use when the user wants to visualize a GitHub Actions run as a subway map. Draws jobs as lines, steps as stations, and failed, cancelled or slow steps as service alerts. - 95tempo
Guide for implementing Grafana Tempo - a high-scale distributed tracing backend for OpenTelemetry traces. Use when configuring Tempo deployments, setting up storage backends (S3, Azure Blob, GCS), writing TraceQL queries, deploying via Helm, understanding trace structure, or… - 100trace-diagram
Draw a trace as an interactive, self-contained sequence diagram (archify) from its Grafana Tempo spans, without investigating it. Use when the user wants to see, share or export the call sequence of a trace id - who called whom, where the time went, which span failed first - and… - 100opentelemetry-tracing
Instrument distributed systems and microservices with OpenTelemetry (OTel) across Python, Node.js, and Go. Triggers when configuring OTel Collectors, context propagation (W3C Trace Context), trace/span generation, custom span attributes, OTLP exporters (Jaeger, Tempo, Datadog),… - 90aws-architecture-diagram
AWS architecture diagrams — generate visual network topology diagrams from live AWS infrastructure. Use when drawing AWS network diagrams, visualizing VPCs, mapping Transit Gateway topology, or generating architecture documentation.