Worldos widget authoring
Skill Story-Engine-Inc/worldos-agent-skills/skills/worldos-widget-authoring
Design, validate, create, inspect, or update a private reusable WorldOS UGC widget through the WorldOS MCP. Use when a Simulation needs an interactive interface or persistent domain structure that no existing WorldOS app can represent, or when an owned unpublished widget draft needs revision.From its SKILL.md
npx -y skills add Story-Engine-Inc/worldos-agent-skills --skill worldos-widget-authoringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.2 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
WorldOS Widget Authoring
Create a reusable private UGC widget only when existing WorldOS apps cannot express the required interaction or state. Built-in apps, shared apps, published apps, and platform code are outside this workflow.
Confirm that a widget is necessary
- Call
get_authoring_guide. - Call
search_appswith several focused queries for the required capability. - Call
get_app_guidefor plausible existing apps. - Prefer an existing app with world-specific install config.
- Create a widget only when a clear capability gap remains.
Do not create a second source of truth for data already owned by stats, inventory, quests, chat, social, time, calendar, map, or another installed app.
Read references/widget-quality.md before validation.
Separate reusable behavior from world content
A widget is a reusable, domain-neutral interface. Put reusable structure and behavior in the app draft:
- neutral name and slug;
- concise store description and tagline;
- single-file HTML, CSS, and JavaScript;
- reusable prompt describing the widget’s meaning and supported interactions;
- generic
defaultConfig; - a short
configGuideexplaining how a world author should seed it.
Put world-specific labels, people, organizations, starting records, and local rules in the world’s app installation config. Avoid slugs tied to one story when the same interface could serve many worlds.
Use the WorldOS widget SDK
Use the host-provided SDK rather than inventing storage or a transport layer:
WS.statefor the widget’s current persistent namespace;WS.onUpdate(callback)to render new host state;WS.sendAction(payload)for a deliberate player action that should consume a Simulation turn and receive an AI response;WS.engage({ kind, id, label, on })for lightweight reversible engagement such as liking, following, voting, bookmarking, or reposting when no turn should be consumed immediately.
Use sendAction only for choices worth a turn. Use engage for passive micro-interactions. Keep payloads semantic and player-facing; do not expose raw state paths or operation grammar.
Respect the sandbox
Treat the widget as a sandboxed opaque-origin iframe:
- do not rely on
localStorage,sessionStorage, cookies, or browser persistence; - do not rely on arbitrary network fetches or external scripts;
- keep transient interface state in ordinary JavaScript variables;
- persist meaningful state only through the WorldOS SDK and Simulation turn flow;
- avoid navigation, popups, downloads, and attempts to escape the frame;
- use self-contained HTML, CSS, and JavaScript wherever possible.
Never use scrollIntoView, autofocus, or focus-on-mount. Scroll a specific internal container by setting its own scrollTop. If focus is necessary after a user gesture, use focus({ preventScroll: true }) when supported.
Design for mobile and failure
- Make input, textarea, and select text at least 16px on mobile.
- Use responsive layouts without fixed desktop-only widths.
- Give buttons meaningful text or accessible labels.
- Preserve visible keyboard focus.
- Use adequate contrast and do not rely on color alone.
- Render an empty state and recover gracefully from absent optional fields.
- Escape untrusted text and avoid assigning user content through unsafe HTML.
- Keep image containers bounded and preserve image aspect ratio with
object-fit. - Provide fallbacks for missing or failed images.
Build the draft
Choose a lowercase hyphenated slug that does not collide with an existing app. Keep names and public copy understandable to non-technical world creators. Do not mention operations, reducers, modules, raw state, or prompt internals in player-facing copy.
Make configGuide short and precise. It should explain the expected installation data shape and identify which fields are localizable, without embedding one world’s data.
Make defaultConfig small but renderable. It should demonstrate the generic structure without shipping a fictional world’s full content.
Validate before writing
Call validate_app_draft and repair every error. Review warnings about:
- sandbox violations;
- unsupported SDK usage;
- storage or navigation;
- external resources;
- unsafe HTML;
- mobile behavior;
- oversized content;
- incomplete metadata or configuration guidance.
Do not create or update a widget that fails validation.
Create or update
Create
Use create_app_draft with a stable idempotency key. Reuse the key only to retry an identical draft. The result is a private UGC draft; do not describe it as built-in, shared, or published.
Update
- Use
list_owned_appswhen selection is needed. - Call
get_owned_appand retain the full draft and exactupdatedAt. - Preserve untouched fields while applying the intended change.
- Re-run
validate_app_drafton the complete candidate. - Call
update_app_draftwith the exact version. - Fetch the app again and verify the new version.
On a stale version, refetch, reapply the intended change, revalidate, and submit again. Never overwrite concurrent changes blindly.
Install into a world
After creating a widget, install it only in a world owned by the authorized account. Put world-specific opening data and local rules in that world’s installation config. Revalidate the complete world draft after adding the widget.
Handoff
Report the widget name, slug, private status, editor/market URLs, SDK actions, configuration contract, validation warnings, and the worlds or use cases it is intended to support. State that a human must review and publish it in WorldOS.
Hard boundaries
- Do not create or edit built-in apps.
- Do not edit another creator’s, shared, or published app.
- Do not make the widget public or claim it was published.
- Do not bypass validation or ownership through a database or private endpoint.
- Do not put secrets, access tokens, or private URLs in HTML or config.
What ships with it: 1 file
2.0 KB alongside SKILL.md
references/
- widget-quality.md2.0 KB