paywall-editor

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Superwall Paywall Editor

Superwall付费墙编辑器

Paywalls are built in a browser editor that exposes its tools over an authenticated relay. This skill drives that relay from the CLI — the exact same surface the MCP gateway uses — so every tool you invoke runs inside the live browser session the user has open.
付费墙在浏览器编辑器中构建,该编辑器通过经过身份验证的中继暴露其工具。本技能通过CLI驱动该中继——与MCP网关使用的界面完全相同——因此你调用的每个工具都运行在用户打开的实时浏览器会话中。

When to use

使用场景

  • The user wants to build, edit, or review a Superwall paywall, onboarding, or web2app flow.
  • The user pastes a pairing code and asks you to take over editing.
  • The user asks "what tools can you run right now?" — discover them via the browser, not from memory.
  • 用户想要构建、编辑或审核Superwall付费墙、引导流程或Web转App流程。
  • 用户粘贴配对码并要求你接管编辑工作。
  • 用户询问“你现在可以运行哪些工具?”——通过浏览器查询,而非凭记忆回答。

Start here: attach, then discover

操作步骤:先连接,再发现

Never assume a tool name or signature from memory. The browser is the source of truth and its tool set changes across releases.
  1. Ask the user for the pairing code shown in the editor UI.
  2. Attach:
    scripts/sw-editor.sh attach <pairing-code>
  3. Discover what is available right now:
    scripts/sw-editor.sh tools
  4. Invoke tools:
    scripts/sw-editor.sh call <tool-name> --args '<json>'
Full CLI reference: references/cli.md.
切勿凭记忆假设工具名称或签名。浏览器是唯一可信来源,其工具集会随版本更新而变化。
  1. 向用户索要编辑器界面显示的配对码
  2. 连接:
    scripts/sw-editor.sh attach <pairing-code>
  3. 查看当前可用工具:
    scripts/sw-editor.sh tools
  4. 调用工具:
    scripts/sw-editor.sh call <tool-name> --args '<json>'
完整CLI参考文档:references/cli.md

How to build and edit

构建与编辑方法

  • Workflow, build order, and when to use which tool: references/workflow.md
  • Native
    sw-*
    elements (multiple-choice, indicator, drawer, picker, lottie, navigation): references/native-elements.md
  • Design standards, review checkpoints, typography, and conversion principles: references/design.md
  • 工作流、构建顺序及工具使用时机:references/workflow.md
  • 原生
    sw-*
    元素(选择题、指示器、抽屉、选择器、Lottie动画、导航):references/native-elements.md
  • 设计标准、审核检查点、排版及转化原则:references/design.md

Orchestration rules

编排规则

  • Always
    attach
    before anything else.
    tools
    ,
    call
    ,
    status
    ,
    release
    all require an attached session.
  • Before calling a tool you have not used this session, run
    tools
    to confirm it exists and to read the current parameter schema. Tools are defined in the browser bundle — an updated editor ships new or renamed tools without any change to this skill.
  • Use
    get_screenshot
    (if present in the tool list) every 2–3 modifications to verify. Don't fly blind.
  • Prefer semantic tools (
    update_styles
    ,
    set_text_content
    ,
    set_dynamic_value
    ,
    move_nodes
    ) over re-running
    write_html
    on existing structure. See
    references/workflow.md
    .
  • Prefer native
    sw-*
    elements over hand-rolled
    <div>
    recreations whenever the UI represents a semantic control. See
    references/native-elements.md
    .
  • Release when the user is done:
    scripts/sw-editor.sh release
    .
  • 始终先执行
    attach
    操作。
    tools
    call
    status
    release
    均需要已连接的会话。
  • 在调用本次会话中未使用过的工具前,运行
    tools
    确认其存在并查看当前参数 schema。工具定义在浏览器包中——编辑器更新后会新增或重命名工具,而无需修改本技能。
  • 每进行2-3次修改后,使用
    get_screenshot
    (若工具列表中存在)进行验证,避免盲目操作。
  • 对于现有结构,优先使用语义化工具(
    update_styles
    set_text_content
    set_dynamic_value
    move_nodes
    ),而非重新运行
    write_html
    。详见
    references/workflow.md
  • 当UI代表语义化控件时,优先使用原生
    sw-*
    元素,而非手动编写
    <div>
    来实现。详见
    references/native-elements.md
  • 用户完成操作后释放会话:
    scripts/sw-editor.sh release

When things go wrong

故障排查

  • session_not_ready
    : the browser disconnected or reloaded. Ask the user to bring the editor tab back, then re-attach (the pairing code rotates — they'll need to read you the new one).
  • session_locked
    : another client is already attached. The user either attached from another MCP client, or a previous CLI attachment wasn't released. They can detach from the editor UI and you can retry.
  • unauthorized
    : the controller token is stale — re-attach with a fresh pairing code.
  • attach_failed: provide a valid current pairingCode
    : pairing codes expire after ~10 minutes and rotate on detach. Ask the user to show you the current one.
  • session_not_ready
    :浏览器已断开连接或重新加载。请用户重新打开编辑器标签页,然后重新连接(配对码会轮换——需要用户提供新的配对码)。
  • session_locked
    :已有其他客户端连接。用户可能从另一个MCP客户端连接过,或之前的CLI连接未释放。用户可从编辑器界面断开连接,然后你重试连接。
  • unauthorized
    :控制器令牌已过期——使用新的配对码重新连接。
  • attach_failed: provide a valid current pairingCode
    :配对码约10分钟后过期,且断开连接时会轮换。请用户提供当前显示的配对码。