Skip to content
Back to skills

Frontend Runtime

ASecurity

The forge frontend runtime, @reliantlabs/forge-web-runtime — the web twin of forge/pkg. Transport interceptor stack (error normalization, auth, brand, a client span per RPC with redacted failure forensics, W3C traceparent; React Query owns retries), app-shell providers (session, error boundary, toast host), the generic <Resource> data-table container, and browser telemetry (the HyperDX SDK: errors, console, network, traces — to ClickStack through a same-origin /_otel route).

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
developmentshellreactnextjsnodeapifrontendsecurity

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned November 18, 2026

npx -y skills add reliant-labs/forge --skill frontend-runtime --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Frontend Runtime?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Frontend Runtime
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reliant-labs-frontend-runtime/badge)](https://www.skillsdirectory.com/skills/reliant-labs-frontend-runtime)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: frontend-runtime
description: The forge frontend runtime, @reliantlabs/forge-web-runtime — the web twin of forge/pkg. Transport interceptor stack (error normalization, auth, brand, a client span per RPC with redacted failure forensics, W3C traceparent; React Query owns retries), app-shell providers (session, error boundary, toast host), the generic <Resource> data-table container, and browser telemetry (the HyperDX SDK: errors, console, network, traces — to ClickStack through a same-origin /_otel route).
---

# Frontend Runtime

Every generated web frontend — Next.js and Vite SPA alike — is built on
**`@reliantlabs/forge-web-runtime`**, the frontend analog of `forge/pkg`. It is a
set of pull-out-of-the-box batteries the app wires through thin, owned
composition.

## Ownership

The runtime is a **package**, not project code: there is nothing to edit and
nothing to regenerate. Fixes to it (e.g. tracing behavior) arrive with a
version bump.

You compose it from **your** owned files:

- `src/lib/connect.ts` — builds the transport interceptors from the runtime.
- `src/app/providers.tsx` — mounts `RuntimeShell` and inits telemetry.

Import everything from the barrel:
`import { … } from "@reliantlabs/forge-web-runtime"`.

Three subpaths are deliberately OUTSIDE the barrel, each for its own reason:

| Subpath | Why it is not in the barrel |
|---|---|
| `/interceptors` | DOM-free transport layer, for React Native / non-react-dom renderers. |
| `/mock-transport` | Dev-only. The fixture dispatch engine must be tree-shakeable out of a production bundle. |
| `/telemetry` | Drives the HyperDX SDK (`@hyperdx/otel-web`, ~430 KB, loaded lazily as its own chunk) and records session replay with the runtime's own rrweb recorder (a second lazy chunk, ~180 KB, loaded only when replay runs). Both are exact-pinned DEPENDENCIES of the runtime: no app declares them. A React-Native frontend imports the barrel and bundles neither. |

Nothing you write imports `/mock-transport` or `/telemetry` directly: forge generates
the thin project files (`src/lib/mock-transport_gen.ts`, `src/lib/otel_gen.ts`)
that do, carrying the per-project table and the `NEXT_PUBLIC_*` env reads
respectively.

Presentation stays yours and is deliberately NOT in the package: the component
library under `src/components/ui`, `globals.css`, the nav and the layout are
all scaffolded once for you to fork.

Tailwind v4 does not scan `node_modules`, so your stylesheet carries an
`@source` directive pointing at the package. Keep it — without it every
utility only the runtime renders vanishes from the built CSS.

Per-env VALUES (API origin, feature flags) are not part of this package: they
come from the generated `src/lib/config_gen.ts`, and every `runtime_config` key
must be one the bundle reads. Load `frontend-runtime/config`.

## What the runtime provides, and where each is documented

| Battery | What it is | Load |
|---|---|---|
| Transport interceptor stack | `buildRuntimeInterceptors` in `connect.ts`: error-normalize → auth → brand → rpc span → traceparent; React Query owns retries. One client span per RPC (`<rpc.service>/<rpc.method>`, joined to the server span), with a redacted `forge.forensics` request shape on failure (`RPC_FORENSICS` turns it off per env). Typed errors: branch on `.reason`, render with `userMessage(err)`, never match on message text | `frontend-runtime/transport` |
| App-shell providers | `RuntimeShell` in `providers.tsx`: `useSession()`, `RuntimeErrorBoundary`, `RuntimeToastHost`, `RouteGuard` (a render gate, not a security boundary) | `frontend-runtime/shell` |
| `<Resource>` | the data-table container: loading / error / empty / data ladder, server-side filter, cursor pagination, sorting | `frontend-runtime/resource` |
| Browser telemetry | the HyperDX SDK, initialised for you: errors, console, network, traces to ClickStack through a same-origin `/_otel` route; source maps, replay, `reportException`, `interaction()` click-to-usable spans; cookieless product analytics by default (`identified`: nothing stored on the device; `full` only with `ANALYTICS_MODE = "full"` + `grantAnalyticsConsent()`), automatic `page_viewed` events with referrer/utm/click-id props and `page_engaged` (engaged time, scroll depth) per view and signed-in user identity (`PAGE_VIEWS` / `IDENTIFY_USER` turn them off per env), `trackExposure` + an OpenFeature hook | `frontend-runtime/telemetry` |
| Runtime config | `config_gen.ts`, `config.js`, accepted and required `runtime_config` keys, a frontend in another repo | `frontend-runtime/config` |

Files in this skill

  • SKILL.md4.2 KB
  • config/SKILL.md3.3 KB
  • resource/SKILL.md2.3 KB
  • shell/SKILL.md4.1 KB
  • telemetry/SKILL.md21 KB
  • transport/SKILL.md7.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.