marko-run

Installation
SKILL.md

Marko Run

Distilled from https://markojs.com/docs/marko-run. File-based routing on Vite, streaming SSR, zero config. references/routing.md (files, paths, flat routes, execution order), references/handlers.md (verb helpers, validation, data loading, context, typed URLs, embedding), references/deploy.md (vite plugin, adapters, CLI).

Mental model

  • src/routes/** — only +-prefixed files are routable; everything else is ignored (colocate components/tests freely).
  • Request → middlewares (root→leaf) → handler → layouts (root→leaf) → page. Layouts+page compile into one component.
  • ctx (handlers/middleware) === $global (templates). ctx.params, ctx.url are serialized to the browser by default; add others via ctx.serializedGlobals.
  • Data flows down through next({ ... }) → ctx.data / $global.data (shallow merge). Pass promises, <await> them in the page — awaiting before next kills streaming.
  • Run is a global (no import): Run.GET/HEAD/POST/PUT/DELETE/PATCH/OPTIONS/QUERY/ALL, Run.href, types Run.Context, Run.Platform.

Quick reference

Installs
134
GitHub Stars
5
First Seen
Aug 24, 2026