superwall-editor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSuperwall 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付费墙、引导流程或web2app流程。
- 用户粘贴配对代码并要求你接管编辑工作。
- 用户询问“你现在可以运行哪些工具?”——通过浏览器发现它们,而非凭记忆。
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.
- Ask the user for the pairing code shown in the editor UI.
- Attach:
scripts/sw-editor.sh attach <pairing-code> - Discover what is available right now:
scripts/sw-editor.sh tools - Invoke tools:
scripts/sw-editor.sh call <tool-name> --args '<json>'
Full CLI reference: references/cli.md.
永远不要凭记忆假设工具名称或签名。浏览器是事实来源,其工具集会随版本更新而变化。
- 向用户索要编辑器UI中显示的配对代码。
- 连接:
scripts/sw-editor.sh attach <pairing-code> - 发现当前可用工具:
scripts/sw-editor.sh tools - 调用工具:
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 elements (multiple-choice, indicator, drawer, picker, lottie, navigation): references/native-elements.md
sw-* - Design standards, review checkpoints, typography, and conversion principles: references/design.md
- 工作流、构建顺序以及何时使用何种工具:references/workflow.md
- 原生元素(选择题、指示器、抽屉、选择器、lottie、导航):references/native-elements.md
sw-* - 设计标准、审核检查点、排版和转化原则:references/design.md
Orchestration rules
编排规则
- Always before anything else.
attach,tools,call,statusall require an attached session.release - Before calling a tool you have not used this session, run 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.
tools - Use (if present in the tool list) every 2–3 modifications to verify. Don't fly blind.
get_screenshot - Prefer semantic tools (,
update_styles,set_text_content,set_dynamic_value) over re-runningmove_nodeson existing structure. Seewrite_html.references/workflow.md - Prefer native elements over hand-rolled
sw-*recreations whenever the UI represents a semantic control. See<div>.references/native-elements.md - When parsing CLI output, use — never Python. Example:
jqsw-editor.sh call get_subtree --args '...' | jq -r '.content[0].text' - Release when the user is done: .
scripts/sw-editor.sh release
- 始终先执行操作。
attach、tools、call、status都需要已连接的会话。release - 在调用本次会话中未使用过的工具之前,运行以确认其存在并读取当前参数 schema。工具定义在浏览器包中——更新后的编辑器会发布新工具或重命名工具,而无需修改本技能。
tools - 每进行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 - 解析CLI输出时,使用——绝不使用Python。示例:
jqsw-editor.sh call get_subtree --args '...' | jq -r '.content[0].text' - 用户完成操作后释放会话:。
scripts/sw-editor.sh release
When things go wrong
故障排查
- : 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_not_ready - : 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.
session_locked - : the controller token is stale — re-attach with a fresh pairing code.
unauthorized - : pairing codes expire after ~10 minutes and rotate on detach. Ask the user to show you the current one.
attach_failed: provide a valid current pairingCode
- :浏览器断开连接或重新加载。请用户重新打开编辑器标签页,然后重新连接(配对代码会轮换——他们需要提供新的代码)。
session_not_ready - :另一个客户端已连接。用户可能从其他MCP客户端连接过,或者之前的CLI连接未释放。他们可以从编辑器UI断开连接,然后你重试。
session_locked - :控制器令牌过期——使用新的配对代码重新连接。
unauthorized - :配对代码约10分钟后过期,断开连接时会轮换。请用户提供当前显示的配对代码。
attach_failed: provide a valid current pairingCode