paywall-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付费墙、引导流程或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.
- 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.
切勿凭记忆假设工具名称或签名。浏览器是唯一可信来源,其工具集会随版本更新而变化。
- 向用户索要编辑器界面显示的配对码。
- 连接:
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 - 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 - 用户完成操作后释放会话:。
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连接未释放。用户可从编辑器界面断开连接,然后你重试连接。
session_locked - :控制器令牌已过期——使用新的配对码重新连接。
unauthorized - :配对码约10分钟后过期,且断开连接时会轮换。请用户提供当前显示的配对码。
attach_failed: provide a valid current pairingCode