Use this skill to implement or extend a Meridian web server: define Responder routes with property wrappers, render HTML using the HTML/Swim DSL, and route all database access through a Database.swift layer backed by SchemaSwift-generated models.
Quick start
Pick the Meridian doc that matches the task (see “Reference map”).
Follow the generic app conventions in references/meridian-app-conventions.md.
Implement route logic in a Responder struct and render HTML with layout helpers.
Add or update Database queries; do not edit DatabaseModels.swift directly.
Core workflow (new page/route)
Define the route type
Create a public struct Name: Responder in Sources/.../Routes/....
Add public init() and public func execute() async throws -> Response.
Use Meridian property wrappers (@QueryParameter, @Path, @Body, @URLBodyParameter, @Header, @RequestMethod) for request data.
Use @EnvironmentObject var database: Database for DB access and @Auth/@OptionalAuth for auth.
Fetch data
Call Database methods (async throws) for any SQL access.
If a query does not exist, add it to Database.swift using bind:/binds: to protect against SQL injection.
Render HTML
Return HTML nodes using a layout helper like layoutWithNavigation { ... } or defaultLayout { ... }.
Build content with the HTML DSL and @NodeBuilder helpers.
Use script { Node.raw("...") } for inline scripts.
Wire the route
Register the route in the server entrypoint (often Sources/App/main.swift) using .routes { ... } and Group("/path") { ... }.
Core workflow (new database query)
Add a method to Database.swift that returns model types or simple DTO structs.
Use multi-line SQL with bind: or binds:.
Decode rows with .all(decoding:), .first(decoding:), and .unwrap() where appropriate.
If you need new columns or tables, update the schema and regenerate DatabaseModels.swift via SchemaSwift (do not edit the file by hand).
Core workflow (new request parsing)
Use a built-in Meridian property wrapper (see docs below).
If needed, create a custom property wrapper (see docs).
Keep parsing logic close to the route; keep business logic in model helpers.
Reference map
Read only the files you need; they are all in references/meridian-docs/.
Install/setup: 01 - Installation.md
Hello world route: 02 - Hello World.md
Query parameters: 03 - Query Parameters.md
URL parameters: 04 - URL Parameters.md
JSON bodies: 05 - Parsing JSON Bodies.md
Single JSON values: 06 - Parsing Individual JSON Values.md
URL-encoded bodies: 07 - URL Body Parameters.md
Environment: 08 - Environment.md
Headers, paths, methods: 09 - Headers, Paths, and Methods.md
1---2name: khanlou-meridian-meridian3description: Meridian Server Stack4---56# Meridian Server Stack78## Overview9Use this skill to implement or extend a Meridian web server: define `Responder` routes with property wrappers, render HTML using the HTML/Swim DSL, and route all database access through a `Database.swift` layer backed by SchemaSwift-generated models.1011## Quick start121. Pick the Meridian doc that matches the task (see “Reference map”).132. Follow the generic app conventions in `references/meridian-app-conventions.md`.143. Implement route logic in a `Responder` struct and render HTML with layout helpers.154. Add or update `Database` queries; do not edit `DatabaseModels.swift` directly.1617## Core workflow (new page/route)181. **Define the route type**19 - Create a `public struct Name: Responder` in `Sources/.../Routes/...`.20 - Add `public init()` and `public func execute() async throws -> Response`.21 - Use Meridian property wrappers (`@QueryParameter`, `@Path`, `@Body`, `@URLBodyParameter`, `@Header`, `@RequestMethod`) for request data.22 - Use `@EnvironmentObject var database: Database` for DB access and `@Auth`/`@OptionalAuth` for auth.23242. **Fetch data**25 - Call `Database` methods (`async throws`) for any SQL access.26 - If a query does not exist, add it to `Database.swift` using `bind:`/`binds:` to protect against SQL injection.27283. **Render HTML**29 - Return HTML nodes using a layout helper like `layoutWithNavigation { ... }` or `defaultLayout { ... }`.30 - Build content with the HTML DSL and `@NodeBuilder` helpers.31 - Use `script { Node.raw("...") }` for inline scripts.32334. **Wire the route**34 - Register the route in the server entrypoint (often `Sources/App/main.swift`) using `.routes { ... }` and `Group("/path") { ... }`.3536## Core workflow (new database query)371. Add a method to `Database.swift` that returns model types or simple DTO structs.382. Use multi-line SQL with `bind:` or `binds:`.393. Decode rows with `.all(decoding:)`, `.first(decoding:)`, and `.unwrap()` where appropriate.404. If you need new columns or tables, update the schema and regenerate `DatabaseModels.swift` via SchemaSwift (do not edit the file by hand).4142## Core workflow (new request parsing)431. Use a built-in Meridian property wrapper (see docs below).442. If needed, create a custom property wrapper (see docs).453. Keep parsing logic close to the route; keep business logic in model helpers.4647## Reference map48Read only the files you need; they are all in `references/meridian-docs/`.4950- **Install/setup**: `01 - Installation.md`51- **Hello world route**: `02 - Hello World.md`52- **Query parameters**: `03 - Query Parameters.md`53- **URL parameters**: `04 - URL Parameters.md`54- **JSON bodies**: `05 - Parsing JSON Bodies.md`55- **Single JSON values**: `06 - Parsing Individual JSON Values.md`56- **URL-encoded bodies**: `07 - URL Body Parameters.md`57- **Environment**: `08 - Environment.md`58- **Headers, paths, methods**: `09 - Headers, Paths, and Methods.md`59- **Custom property wrappers**: `10 - Custom Property Wrappers.md`60- **Routing / route matching**: `11 - Routing.md`61- **Responses**: `12 - Responses.md`62- **Errors**: `13 - Errors.md`63- **Error renderers**: `14 - Error Renderers.md`64- **Middleware**: `15 - Middleware.md`65- **WebSockets**: `16 - WebSockets.md`66- **Static files**: `17 - Static Files.md`67- **Databases + HTML/Swim DSL**: `18 - Working with databases and HTML.md`68- **Deploying**: `19 - Deploying to Heroku.md`6970## Implementation notes71- Prefer `async/await` over callbacks.72- Avoid force unwraps unless an existing pattern uses them.73- 7475---76> Source: [khanlou/Meridian](https://github.com/khanlou/Meridian) — distributed by [TomeVault](https://tomevault.io).77<!-- tomevault:4.0:skill_md:2026-06-17 -->
Run npx skillmds@latest add tomevault-io/khanlou-meridian-meridian in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Meridian Server Stack It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.