Skip to main content
AI assistants are good at widget code, but they don’t know how StreamWizard widgets work. Out of the box they’ll write a full web page, load scripts from other sites and guess at event names, and none of that runs here. The block below fixes that: paste it in first and the assistant knows the four tabs, the events, the settings fields and the sandbox rules.

Before you start

  • You can open the widget editor. See the quickstart.
  • You have an AI assistant open in another tab.

Use it

1

Copy the block

Use the copy button on the block below.
2

Paste it into your assistant

Start a new chat and paste it as your first message, or into the assistant’s custom instructions if you build widgets often.
3

Describe your widget

Say what it should show and when. “A sub goal bar that fills on every sub and gift, with the goal as a setting” is plenty.
4

Paste the answer into the tabs

The assistant answers with four parts. Each one goes into the tab of the same name: HTML, JS, Fields and Extra CSS.
5

Test it

Fire events from the demo bar above the preview. See testing.

The block

streamwizard-widget-api.md

Good to know

  • Check what comes back. The assistant can still get things wrong. If the widget shows nothing, open the console under the preview: errors from your code show up there.
  • Give it the event page for unusual events. The block lists the common events. For anything else, paste the matching section of the event reference into the chat.
  • Don’t paste secrets. Keep API keys and webhook URLs out of your widget and out of the chat, especially if you plan to publish it.

Next steps

Event reference

Every event with its exact payload.

Testing your widget

Fire fake events at it before anyone is watching.