Triggered when the user wants to add, modify, view, or delete widgets (desktop components / mini apps / dashboard cards) on the OpenLoaf workbench / desktop. Typical phrasings: "add a weather widget", "build a pomodoro component", "change the color of this widget". **Not for**: one-off chart rendering inside a chat message (→visualization-ops-skill), AI image generation (→cloud-media-skill), casually mentioning "clock / countdown" in conversation (→answer directly).
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
This skill handles widget lifecycle management (scaffolding, querying, compile verification). Coding details (SDK API, component authoring, security sandbox) live in the generate-dynamic-widget skill — when you need to write code, first LoadSkill(skillName: "generate-dynamic-widget").
| Tool | Responsibility | Read-only |
|---|---|---|
WidgetInit | Generate the widget scaffold directory (~/.openloaf/dynamic-widgets/<id>/) | No |
WidgetList | List all created widgets | Yes |
WidgetGet | Read details of a single widget | Yes |
WidgetCheck | Compile widget (TypeScript) + trigger live preview refresh | Yes |
GenerateWidget | Widget code generation (see generate-dynamic-widget skill) | No |
Read | Widget code reading (always-available tool) | Yes |
Edit | Widget code editing (always-available tool) | No |
Loading:
Read/Editare always available;WidgetInit/WidgetList/WidgetGet/WidgetCheck/GenerateWidgetmust be activated viaToolSearch(names: "WidgetInit,WidgetList,WidgetGet,WidgetCheck,GenerateWidget")before calling, to load their schemas.
User wants a Widget
├── Does one already exist?
│ ├── Yes → WidgetList → WidgetGet → Read → understand the current state
│ │ └── Needs code changes → ToolSearch(names: "generate-dynamic-widget")
│ │ └── Edit → WidgetCheck
│ └── No → Create a new Widget (see flow below)
└── Just querying / browsing?
└── WidgetList / WidgetGet is enoughWhen the user wants to change an existing Widget:
WidgetInit — generate the scaffold directory
~/.openloaf/dynamic-widgets/<id>/), package.json, and type stub files. Skipping this and writing files directly will cause the compiler to fail to find type definitions.ToolSearch(names: "generate-dynamic-widget") — load the coding conventionsWrite — write widget.tsx (the frontend component)Write — write functions.ts (server-side functions, if needed)WidgetCheck — compile + trigger live preview
WidgetList → WidgetGet → Read — locate and read the sourceEdit — precise search-and-replace modificationWidgetCheck — verify via compileWhen WidgetCheck returns compile errors:
Cannot find module 'xxx' → widget.tsx may only import react, react/jsx-runtime, @openloaf/widget-sdk; remove the forbidden importType 'xxx' is not assignable → check SDK type definitions and confirm props/state types matchJSX element type does not have any construct → check that the component export is correct (must be export default)Edit → run WidgetCheck again, repeat until compile passesGood fits:
Poor fits:
~/.openloaf/dynamic-widgets/<widget-id>/widget.tsx may only import: react, react/jsx-runtime, @openloaf/widget-sdkfunctions.ts executes on the Server side with a 10-second timeout.env under the widget directory — never hardcodea1ab5be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.