widget-authoring

widget-authoring is a skill for Claude Code, Codex from ThinkEx-OSS/thinkex. It costs 49 tokens per session (1,024 once invoked), scanned A, original, MIT.

A guide for creating or editing ThinkEx widgets: self-contained interactive HTML blocks placed inside documents. These blocks can include local styling and JavaScript for interaction or computation.

In plain words
What is it for?
Use it to build small interactive diagrams, simulations, charts, games, or calculators with inline HTML, CSS, and vanilla JavaScript. The widget runs locally and cannot access the surrounding document or external resources.
Why use it?
It explains the format and restrictions needed for an interactive document block to work inside ThinkEx's isolated frame.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/thinkex-oss/thinkex/widget-authoring
Any agent
npx skills add ThinkEx-OSS/thinkex --skill widget-authoring
Clone the repo
git clone --depth 1 https://github.com/ThinkEx-OSS/thinkex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for widget-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/thinkex-oss/thinkex/widget-authoring.svg)](https://agentmods.dev/skills/thinkex-oss/thinkex/widget-authoring)
Your own site
<a href="https://agentmods.dev/skills/thinkex-oss/thinkex/widget-authoring"><img src="https://agentmods.dev/badge/skills/thinkex-oss/thinkex/widget-authoring.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.01024
Opus 5 $0.00024 $0.00512
Sonnet 5 $0.00010 $0.00205
Haiku 4.5 $0.00005 $0.00102

Measured 4d ago against content hash 37ef3f94f068, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

widget-authoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/features/workspaces/ai/skills/widget-authoring/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Author ThinkEx widgets

A widget is a document block whose HTML-escaped text content is one interactive HTML fragment:

<div data-type="widget" title="Short title">&lt;style&gt;...&lt;/style&gt;...</div>

There is no separate widget item type. A document containing only this block acts as a standalone widget.

Create

Follow this contract:

  1. Supply fragment content only: HTML plus inline <style> and <script> elements. Omit <!doctype>, <html>, <head>, and <body> because the runtime supplies the document shell.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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:

  1. Choose one primary interaction or visual and make it dominant. Group its controls together and keep supporting explanation secondary.
  2. Prefer the runtime's standard controls and .tx-stack, .tx-row, .tx-panel, .tx-muted, and .tx-visual helpers over rebuilding structural styles. Mark at most one main button with data-variant="primary".
  3. 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 --destructive for status, and --chart-1 through --chart-6 for data and expressive visuals. The root also has data-theme="light|dark" and the .dark class. Hard-code a color only when its literal identity carries meaning.
  4. 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.

Read the full file on GitHub · 51 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 51 lines · 49 tokens per session scan A 37ef3f94f068

Subscribe to this mod's changes

widget-authoring is a skill published in the GitHub repository ThinkEx-OSS/thinkex (55 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 1,024 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ingest

Turn messy source notes into structured wiki pages (frontmatter, wikilinks, one folder per type) and update the vault's index, log and hot cache. Use when the user drops files into inbox/ and asks to process them, points at a note or URL to ingest, or pastes raw content to file. Triggers on: "ingest", "ingesta"…

sturlese/hippocampus · 110 tokens

save

File the current conversation's valuable content (analysis, decision, session summary) as a structured wiki note so it isn't lost in chat history. Triggers on: "save this", "guarda esto", "guárdalo en el wiki", "/save", "$save", "file this", "apunta esto", "guarda esta conversación", "save this session".

sturlese/hippocampus · 78 tokens

plan-update

Use when you need to update a plan document with deep research across all compiler passes. Launches parallel subagents to analyze how a topic affects every compiler phase, then consolidates findings into the plan doc.

react/react · 44 tokens

powerpoint

Create designed, editable PowerPoint .pptx presentations with PptxGenJS. Use when the user asks to create, generate, update, or inspect a deck, slide deck, presentation, or .pptx file.

the-open-agent/openagent · 48 tokens

design-mcp-server

Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.

cyanheads/obsidian-mcp-server · 62 tokens

add-tool

Scaffold a new MCP tool definition. Use when the user asks to add a tool, create a new tool, or implement a new capability for the server.

cyanheads/obsidian-mcp-server · 35 tokens