Create a new merjs page
SkillDev toolsScaffold a new merjs page. Use when the user wants to create a new page, route, or view.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Create a new merjs page skill
What this skill tells your AI
The instructions your AI receives, as published by justrach/merjs in .claude/skills/new-page/SKILL.md and read by ahel’s review.
Scaffold a new page at app/$ARGUMENTS.zig that follows the merjs conventions.
Steps
- Create
app/$ARGUMENTS.zigwith this template:
const mer = @import("mer");
const h = mer.h;
pub const meta: mer.Meta = .{
.title = "PAGE_TITLE",
.description = "PAGE_DESCRIPTION",
};
const page_node = page();
pub fn render(req: mer.Request) mer.Response {
return mer.render(req.allocator, page_node);
}
fn page() h.Node {
return h.div(.{ .class = "page" }, .{
h.h1(.{}, "PAGE_TITLE"),
});
}
- Replace PAGE_TITLE and PAGE_DESCRIPTION with sensible values derived from the page name
- Run
zig build codegento regenerate routes - Confirm the new route appears in
src/generated/routes.zig - Tell the user the route is available at the mapped URL path
Conventions
- Every app/ page MUST export
pub const meta: mer.Meta - Every page MUST export
pub fn render(req: mer.Request) mer.Response - Use the
hDSL (mer.h) for HTML — prefer comptime nodes - For dynamic routes, use bracket syntax:
app/users/[id].zig→/users/:id app/index.zigmaps to/app/foo/index.zigmaps to/foo- Add
pub const prerender = true;for static pages that don't need request data
Signals
- GitHub stars
- 354
- Forks
- 17
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
new-page-justrach- Source
- github.com/justrach/merjs