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.urlare serialized to the browser by default; add others viactx.serializedGlobals.- Data flows down through
next({ ... })→ctx.data/$global.data(shallow merge). Pass promises,<await>them in the page — awaiting beforenextkills streaming. Runis a global (no import):Run.GET/HEAD/POST/PUT/DELETE/PATCH/OPTIONS/QUERY/ALL,Run.href, typesRun.Context,Run.Platform.