agentleFS
justrachjustrach/merjs/.claude/skills/new-page/SKILL.md

new-page

Skill357 starsChanged 3 months agoMITView on GitHub

Scaffold a new merjs page. Use when the user wants to create a new page, route, or view.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use new-component and security-audit.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • violacaseSkill

    new-component

    Scaffold a new Vue 3 component using reka-ui primitives and Tailwind CSS. Use when the user asks to create a component, UI element, widget, or any .vue file in the components/ directory.

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create app/$ARGUMENTS.zig with this template:

    line 14
  2. Very specific:

    Run zig build codegen to regenerate routes

    line 39
  3. Very specific:

    Every app/ page MUST export pub const meta: mer.Meta

    line 45
  4. Very specific:

    Every page MUST export pub fn render(req: mer.Request) mer.Response

    line 46
  5. Very specific:

    Use the h DSL (mer.h) for HTML — prefer comptime nodes

    line 47
  6. Very specific:

    Add pub const prerender = true.

    line 51

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create a new merjs page

Scaffold a new page at app/$ARGUMENTS.zig that follows the merjs conventions.

Steps

  1. Create app/$ARGUMENTS.zig with 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"),
    });
}
  1. Replace PAGE_TITLE and PAGE_DESCRIPTION with sensible values derived from the page name
  2. Run zig build codegen to regenerate routes
  3. Confirm the new route appears in src/generated/routes.zig
  4. 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 h DSL (mer.h) for HTML — prefer comptime nodes
  • For dynamic routes, use bracket syntax: app/users/[id].zig → /users/:id
  • app/index.zig maps to /
  • app/foo/index.zig maps to /foo
  • Add pub const prerender = true; for static pages that don't need request data

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.