wb-preview-url-modifier
What it does
This skill shows your AI how to add extra parameters to the preview links of Webiny Website Builder pages. It is for developers who need previews to carry tokens, tenant IDs or flags.
When to use it
- ✓When preview links must include a signed token or tenant identifier.
- ✓When you want a feature flag value passed to the live preview URL.
- ✓When the preview link needs data fetched from another service before it opens.
Skill link
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/website-builder/wb-preview-url-modifier/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Make every Website Builder preview link include a signed token fetched from our preview service.”
5 new skills a week. 1 minute to read.
How it works
The skill explains how to write a small class that changes the preview address before it opens, then register that class in the project. The class can wait for remote values when needed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
URLobject directly. - No
wb.*collisions. Params prefixedwb.are reserved for internal use.
Related Skills
wb-custom-page-types-- registering custom page types via PageType abstractionwb-page-settings-- extending page settings groups and fields
FAQ
Can the change depend on remote data?
Yes. The modifier can be asynchronous, for example to fetch a signed token from an API.
Where is it registered?
It is wired through a feature and added in the project's webiny configuration file.
Does it change the published site?
The skill concerns the live preview links only, not the published site.
Details
Original description by the author
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).
repo: webiny/webiny-js
Popularity
- GitHub stars
- 8.1k
- Ranking position
- #12580
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
prd-to-plan
8.1kHelps your agent turn a product requirements document into a phased plan of small end-to-end slices, saved as a Markdown file.
webiny-admin-architect
8.1kTeaches your agent how to build admin screens for the Webiny platform, using its business logic layers and presenter pattern.
webiny-admin-permissions
8.1kTeaches your agent to add permission controls to Webiny admin screens, including auto-generated permission forms and hide-or-show checks.
webiny-form-model
8.1kTeaches your agent to build forms in Webiny using a declarative field builder, layouts, validation and conditional rules.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.