thinkex-oss/thinkex/widget-authoring
Claude Code and agent skill by thinkex-oss/thinkex
- community
Checking that the SKILL.md file is still in the repository.
Author or edit ThinkEx widgets, which are self-contained interactive HTML blocks inside documents. Use when the user explicitly asks for a widget, asks for interaction or live computation, or wants a document visual that ordinary blocks cannot express.
Install
npx vskill@latest install thinkex-oss/thinkex/widget-authoringSKILL.md
Author ThinkEx widgets
A widget is a document block whose HTML-escaped text content is one interactive HTML fragment:
There is no separate widget item type. A document containing only this block acts as a standalone widget.
Create
Follow this contract:
- Supply fragment content only: HTML plus inline
<style>and<script>elements. Omit<!doctype>,<html>,<head>, and<body>because the runtime supplies the document shell. - Write vanilla JavaScript inline. The opaque-origin frame cannot read ThinkEx cookies, storage, parent DOM, or workspace data. Its policy blocks connection APIs and external subresources. A script can still navigate its own frame, so keep all behavior local and never navigate.
- Use a native shell and expressive core. Let the runtime style structural UI such as type, controls, focus, spacing, and panels. Give the diagram, simulation, chart, game, or other central experience the custom SVG, canvas, color, and motion it needs.
- Fit the host chrome. The block already provides its title, border, background, and gutter, so never repeat the widget title or wrap the entire source in another card. Reserve panels and borders for distinct internal regions.
- Let normal content determine height and fill the available width. Give only elements without natural height, such as a canvas or chart area, an explicit pixel height. The host clamps the frame between 120px and 720px and scrolls taller content.
- Create and edit tools validate inline script syntax before saving. If one returns
widget_script_syntax_error, use its detail to repair the existing source and retry the same write. Let later runtime failures throw; the sandbox catches them and offers the user an Ask AI to fix action.
Compose the experience before coding it:
- Choose one primary interaction or visual and make it dominant. Group its controls together and keep supporting explanation secondary.
- Prefer the runtime's standard controls and
.tx-stack,.tx-row,.tx-panel,.tx-muted, and.tx-visualhelpers over rebuilding structural styles. Mark at most one main button withdata-variant="primary". - Theme structural UI with the semantic background, foreground, card, primary, secondary, muted, accent, border, input, ring, radius, and font variables. Use
--success,--warning,--info, and--destructivefor status, and--chart-1through--chart-6for data and expressive visuals. The root also hasdata-theme="light|dark"and the.darkclass. Hard-code a color only when its literal identity carries meaning. - Keep interface text compact, make layouts wrap on narrow widths, label controls, and ensure every visible control works. Use motion to explain state changes rather than as decoration.
For a complex widget with several interactions or a large script, build in working slices. Create the smallest complete version that delivers the primary interaction, then follow the Edit workflow to add one coherent capability at a time with focused replace_text edits. Every saved slice must be functional and presentable; never publish scaffolding, placeholder regions, or dead controls. Create ordinary widgets in one write.
Bundled references are included below; consult them when they apply:
- For a new widget or a ground-up rebuild, follow
references/starter.mdbefore writing source. - For any
<canvas>drawing, followreferences/canvas.mdbefore writing source.
Use the document tool's HTML math markup. The runtime renders matching math elements when they are added or changed. KaTeX is the only bundled library; create other diagrams and charts with inline SVG or canvas.
Edit
- Read the document to locate the widget placeholder and its
data-ref. - Read that exact content with
{ mode: "ref", path, ref }to obtain the current source and currentref. - For a focused change, use
replace_textwith afindstring copied exactly from the block read. Include enough surrounding text to make the match unique. - For a ground-up rebuild, follow
references/starter.md, then usereplaceon the widget's currentref.
Complete the operation only when the source follows the contract, the main interaction or visual is immediately clear, the widget has no duplicate host chrome or unintended overflow, every visible control works, both themes remain readable, runtime failures remain reportable, and an edit changes only the intended widget using the latest block read's exact ref.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/features/workspaces/ai/skills/widget-authoring/SKILL.md
Popularity
- Repository stars
- 54
- Repository forks
- 11
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thinkex-oss/thinkex/widget-authoring)