Skip to content
Content
Skill

/wb-preview-url-modifier

Covers the PreviewUrlModifier extension point in Website Builder. Use when a user wants to inject custom query parameters into live preview URLs — e.g. signed tokens, tenant identifiers, feature flags — from their Webiny project. Handles the full registration pattern:

From plugin
webiny-js
8.1k78 skills3 MCP

Claude Code

$ npx -y skills add webiny/webiny-js --skill wb-preview-url-modifier --agent claude-code

SKILL.md

wb-preview-url-modifier.SKILL.md
name: wb-preview-url-modifier
description: >
  Covers the PreviewUrlModifier extension point in Website Builder. Use when
  a user wants to inject custom query parameters into live preview URLs —
  e.g. signed tokens, tenant identifiers, feature flags — from their Webiny
  project. Handles the full registration pattern: implementing the interface,
  wiring via createFeature + RegisterFeature, and registering via
  webiny.config.tsx. Supports async modifier methods (e.g. remote token fetch).

Website Builder: Preview URL Modifier

TL;DR

`PreviewUrlModifier` is a DI extension point that lets project developers inject custom query parameters into all Website Builder live preview URLs. Register one implementation; it receives the full `URL` object and can mutate it however it needs — including async operations like fetching a signed token from a remote API.

Implement the Modifier

Import from `webiny/admin/website-builder`. The single required method is `modify(url: URL): Promise<void>` — mutate `url.searchParams` in place, mark the method `async` when you need to fetch remote values.

import { PreviewUrlModifier } from "webiny/admin/website-builder";

class MyPreviewUrlModifier implements PreviewUrlModifier.Interface {
  async modify(url: URL) {
    url.searchParams.set("my-param", "my-value");
  }
}

export default PreviewUrlModifier.createImplementation({
  implementation: MyPreviewUrlModifier,
  dependencies: []
});

Async example — fetching a signed token:

class SignedTokenModifier implements PreviewUrlModifier.Interface {
  async modify(url: URL) {
    const token = await fetch("/api/preview-token").then(r => r.text());
    url.searchParams.set("token", token);
  }
}

export default PreviewUrlModifier.createImplementation({
  implementation: SignedTokenModifier,
  dependencies: []
});

Register the Feature

// extensions/previewUrlModifier/index.tsx
import React from "react";
import { createFeature, RegisterFeature } from "webiny/admin";
import MyPreviewUrlModifier from "./MyPreviewUrlModifier.js";

const PreviewUrlModifierFeature = createFeature({
  name: "MyApp/PreviewUrlModifier",
  register(container) {
    container.register(MyPreviewUrlModifier);
  }
});

export default () => <RegisterFeature feature={PreviewUrlModifierFeature} />;
// webiny.config.tsx
<Admin.Extension src={"@/extensions/previewUrlModifier/index.tsx"} />

Where It Applies

| Surface | Description | | ---------------- | ---------------------------------------------------- | | Editor iframe | The live-editing iframe in the page editor | | Address bar link | The "copy preview link" button in the editor toolbar | | Pages list | Preview icon links in the pages list table |

Constraints

  • **One modifier per project.** Only the first registered implementation is used.
  • **Mutate in place.** Return value is ignored; mutate the `URL` object directly.
  • **No `wb.*` collisions.** Params prefixed `wb.` are reserved for internal use.

Related Skills

  • `wb-custom-page-types` -- registering custom page types via PageType abstraction
  • `wb-page-settings` -- extending page settings groups and fields
Read more
@webiny
Ships withwebiny-js

Open-source content platform. Self-hosted on AWS serverless. Built as a TypeScript framework you extend with code, not a closed product you configure through a UI. Runs on Lambda, DynamoDB, S3, and CloudFront inside your own AWS account. Scales automatically.

8.1k78 skills3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8.1k
Star history of webiny/webiny-js on GitHub, a chart by star-history.com

Other skills on webiny-js.

design-ask

design-ask

Turn open design questions into a paste-ready prompt for Claude Design, log them with Q-IDs and copy the prompt to the clipboard.…

@webiny@webinyInstall Skill
design-pull

design-pull

Pull a Claude Design project into a local, git-ignored design folder and keep a catalogue of what was pulled and implemented. Use…

@webiny@webinyInstall Skill
grill-me

grill-me

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision…

@webiny@webinyInstall Skill
prd-to-plan

prd-to-plan

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in…

@webiny@webinyInstall Skill
preflight

preflight

Webiny-only. Run all checks required before packages are ready for publish: deps, build, lint, format, tests.

@webiny@webinyInstall Skill
tester

tester

Use when running tests. Shows how to run tests for a single package, including OpenSearch (ddb-os) tests when applicable.

@webiny@webinyInstall Skill

More skills from other plugins.

prompt-lookup

prompt-lookup

Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…

@gh-f@gh-fInstall Skill
ppt-master

ppt-master

AI-driven presentation workflow for generating editable PPTX decks and slides, reconstructing page visuals, creating reusable…

@hugohe3@hugohe3Install Skill
morph-ppt

morph-ppt

Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style…

@iofficeai@iofficeaiInstall Skill

Questions about wb-preview-url-modifier.

Which coding agents can use wb-preview-url-modifier?
wb-preview-url-modifier installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.