Editlayer

For developers

Make any static site editable in one step.

Editlayer is a Claude Code plugin and a small Cloudflare Worker. You keep building the way you do; your client gets a visual editor on the live site.

  • Claude Code plugin
  • Cloudflare Workers, D1, R2
  • No framework, no build lock-in

Install

From Claude Code

Add the marketplace, install the plugin, then ask in plain words. The editlayer skill checks the site, sets everything up and hands you the owner’s invite link.

  • Needs Node 20+, a Cloudflare account and npx wrangler login
  • Skills: editlayer, invite-editor, connect-ai, cms-status

Claude Code

> /plugin marketplace add BrennenHodge/editlayer
> /plugin install editlayer@editlayer
> /editlayer:editlayer

Or from a terminal

$ claude plugin marketplace add BrennenHodge/editlayer
$ claude plugin install editlayer@editlayer

How it works

A Worker in front of your static files

Regions

After each build, editlayer annotate marks every page’s <main> as editable, plus the header and footer when they’re the same on every page. Each region carries a hash of your version.

Storage

Edited regions are stored whole, as sanitized HTML, in D1, with draft and live copies and a full publish history. Images go to R2 and are served from /_cms/media/.

Serving

The Worker fetches the static page and swaps in edited regions with HTMLRewriter as it streams. Untouched pages pass through. If Editlayer errors, the static page is served.

Edit mode

Signed-in editors add ?edit. Drafts are applied, your scripts are paused so menus don’t fight the editor, and the editor loads in a shadow root so your CSS and its CSS never mix.

Your rebuilds

If you rebuild a region an editor also changed, their version keeps showing and they get a banner: keep theirs, or use yours. editlayer status lists every edited region.

Security

PBKDF2 passwords, HttpOnly 30-day sessions, lockout after 8 failed sign-ins, a custom header plus same-origin check on every write, and sanitized HTML.

Requirements

  • A static site deployed as a Cloudflare Worker with static assets (wrangler.jsonc). The skill creates one if the site isn’t on Cloudflare yet.
  • Pages that use <main>, and a sitemap.xml for the page list.
  • Mark anything your JavaScript rewrites at runtime with data-cms-lock.

Commands

The plugin runs these for you. Run them from the site folder; add --local for wrangler dev.

CommandDoes
editlayer initCreates the D1 database and R2 bucket, copies the engine into _editlayer/, writes cms.worker.js, updates wrangler.jsonc, applies migrations and marks the pages.
editlayer annotate [dir]Marks editable regions in built HTML. Add it to the end of your build.
editlayer user add <email>Creates an editor (--admin for admins) and prints a one-time invite link, valid 7 days.
editlayer connect <name>Creates an AI connection and prints its MCP address. --publish lets it publish.
editlayer statusEvery edited region, draft or live, and which ones you have since rebuilt.
editlayer updateCopies the plugin’s newer engine into the site and applies new migrations.

Site options

Tune cms.worker.js to the site: which colours and fonts editors may change (with readability checks), the section backgrounds they can pick, the layout for new pages, and whether forms go to the inbox. Optional bindings add scheduled publishing (a cron trigger), writing help (Workers AI) and emailed invites (Resend).

export default createCms({
  siteName: 'Juniper Café',
  accent: '#b4532a',
  styles: { groups: [ /* the CSS custom properties editors may change */ ] },
  sections: { backgrounds: [{ label: 'Light', class: '' }, { label: 'Dark', class: 'dark' }] },
});

Extend it

Everything beyond core editing is a feature plug-in: a client file for the editor and an optional Worker file with API routes, render hooks, cron jobs and data keys. The plugin ships the full reference in engine/docs/features.md.

Give your next client a site they can edit.

Editlayer is in early access for developers and agencies building with AI. Join now to lock in founding pricing.