[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCK49SGHQWKCVWY9TY6VET":3,"skill-same:01M6CCK49SGHQWKCVWY9TY6VET":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":53,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6CCK49SGHQWKCVWY9TY6VET","inline-widget",null,"Inline HTML widgets: charts, dashboards, data tables rendered directly in the chat via ShowWidget","ginlix-ai\u002FLangAlpha","ginlix-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255505137?v=4","01M6CCJK39A1C27GHF9AP4XWY0","Ginlix AI","01M6CCJK7GR7P1AWNRTPZYDJZY",2303,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Fplugins\u002Flangalpha_deliverables\u002Fskills\u002Finline-widget\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42],"inline widget","widget","inline","data","Charts","dashboards","html","chat","widgets","via","tables","2026-11-10 10:12:30",false,"---\nname: inline-widget\ndescription: \"Inline HTML widgets: charts, dashboards, data tables rendered directly in the chat via ShowWidget\"\n---\n\n# Inline Widget\n\nRender interactive HTML\u002FSVG widgets directly inside the chat conversation using `ShowWidget`. Widgets appear inline between text — no sandbox, no preview URL, no side panel. They run JavaScript, so lean into making them **interactive and explorable** where it helps — something the user can sort, filter, toggle, and hover over, not just a static picture.\n\n## When to Use\n\n- User wants a **quick visualization** embedded in the conversation (chart, metric card, data table)\n- The visualization is **self-contained** — all data is embedded in the HTML, no server needed\n- User wants **interactivity** within the chat: buttons, toggles, hover effects, animated charts\n- The output is a **single view** — not a multi-page app or dashboard that needs routing\n\n**Use `interactive-dashboard` instead if:** User needs a multi-page web app, server-side data, live data refresh, or complex interactivity requiring React\u002FFastAPI.\n\nRead `.agents\u002Fskills\u002Fui-design\u002FSKILL.md` for design quality — its color discipline, chart restraint, and anti-slop principles apply here too. Its font pairings and type scale, though, are for full documents; a widget sits on the chat surface, so use the host-font typography rules below instead.\n\n## ShowWidget API\n\n```\nShowWidget(html: str, title: str | None = None, data_files: list[str] | None = None)\n```\n\n- `html`: Raw HTML fragment — no `\u003C!DOCTYPE>`, `\u003Chtml>`, `\u003Chead>`, or `\u003Cbody>` tags\n- `title`: Optional metadata (not displayed to user)\n- `data_files`: Optional list of sandbox file paths to make available as `window.__WIDGET_DATA__`\n\nThe HTML is rendered in a sandboxed iframe with:\n- **CDN libraries**: `cdnjs.cloudflare.com`, `cdn.jsdelivr.net`, `unpkg.com`, `esm.sh`\n- **CSS theme variables**: automatically injected (see Theme section)\n- **`sendPrompt('text')`**: global function to trigger follow-up chat messages\n- **`window.__WIDGET_DATA__`**: dict of filename→content for files passed via `data_files`\n- **No network to non-CDN origins**: `fetch()` \u002F `XMLHttpRequest` to arbitrary URLs are blocked by CSP — only CDN domains (cdnjs, jsdelivr, unpkg, esm.sh) are allowed. Use `data_files` for sandbox files, or embed small data directly in HTML\n\n## Layout Rules (CRITICAL)\n\nThe widget sits directly on the chat surface inside a transparent iframe. Follow these rules for seamless integration:\n\n### Outer Element — Transparent Shell\n\nThe **outermost HTML element** must have:\n- **NO background** (or `background: transparent`)\n- **NO border**\n- **NO border-radius**\n- **NO box-shadow**\n- **NO padding** — add padding on inner sections only\n\n```html\n\u003C!-- CORRECT: transparent outer shell -->\n\u003Cdiv>\n  \u003Cdiv style=\"background: var(--color-bg-card, #ffffff); border-radius: 8px; padding: 16px; ...\">\n    ...inner card content...\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003C!-- WRONG: styled outer wrapper — will be rejected -->\n\u003Cdiv style=\"background: var(--color-bg-page); border: 1px solid ...; border-radius: 8px; padding: 20px;\">\n  ...content...\n\u003C\u002Fdiv>\n```\n\n### Inner Elements — Use Theme Variables\n\nInner cards, sections, and components should use CSS variables for styling, always in the fallback form:\n\n```css\n\u002F* Card *\u002F\nbackground: var(--color-bg-card, #ffffff);\nborder: 0.5px solid var(--color-border-muted, #e4e1dc);\nborder-radius: 8px;\npadding: 16px;\n\n\u002F* Metric card *\u002F\nbackground: var(--color-bg-subtle, #f4f2ee);\nborder: 0.5px solid var(--color-border-muted, #e4e1dc);\nborder-radius: 8px;\n```\n\nIn chat the variables are always injected, so the fallback never shows there — it is what renders when the widget is saved as a workspace `.html` file and previewed before theme injection or opened standalone. Use the light literals from the html-report skill's table.\n\n### Positioning\n\n- **NO `position: fixed`** — breaks iframe auto-sizing (elements collapse to 0 height)\n- Use `position: relative` for chart containers\n- No nested scrolling — the iframe auto-sizes to fit all content\n\n## Theme Variables\n\nThese CSS variables are automatically injected and resolve correctly in both light and dark mode:\n\n| Variable | Purpose |\n|----------|---------|\n| `--color-bg-page` | Page background |\n| `--color-bg-card` | Card\u002Fpanel background |\n| `--color-bg-elevated` | Elevated surface |\n| `--color-bg-subtle` | Subtle\u002Fmuted background |\n| `--color-bg-hover` | Hover state background |\n| `--color-text-primary` | Primary text |\n| `--color-text-secondary` | Secondary\u002Fmuted text |\n| `--color-text-tertiary` | Hint\u002Flabel text |\n| `--color-border-muted` | Default border (use with 0.5px) |\n| `--color-accent-primary` | Brand\u002Faccent color |\n| `--color-profit` | Positive\u002Fgain (green) |\n| `--color-loss` | Negative\u002Floss (red) |\n| `--color-warning` | Warning (amber) |\n| `--color-info` | Info (blue) |\n| `--color-success` | Success (green) |\n\n**Never hardcode colors** like `#333` or `rgb(...)` for text, backgrounds, or borders — they break in dark mode. Author every color as `var(--color-x, #lightLiteral)`: the injected variable always wins in chat, and the fallback keeps the widget legible on its secondary surfaces. The only exception is chart canvas colors — Chart.js canvas cannot read CSS variables; resolve them via `getComputedStyle` with a literal fallback.\n\n## Charts (Chart.js)\n\nLoad Chart.js from CDN and follow these rules:\n\n```html\n\u003C!-- Wrapper div with explicit height — REQUIRED -->\n\u003Cdiv style=\"position: relative; height: 200px;\">\n  \u003Ccanvas id=\"myChart\">\u003C\u002Fcanvas>\n\u003C\u002Fdiv>\n\n\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fchart.js\">\u003C\u002Fscript>\n\u003Cscript>\n  \u002F\u002F Read CSS variables for chart colors (canvas can't use var());\n  \u002F\u002F the literal fallback covers the widget opened outside the chat surface.\n  var cs = getComputedStyle(document.documentElement);\n  function pick(name, fallback) { return cs.getPropertyValue(name).trim() || fallback; }\n  var accent = pick('--color-accent-primary', '#1f5fb4');\n  var border = pick('--color-border-muted', '#e4e1dc');\n\n  new Chart(document.getElementById('myChart'), {\n    type: 'line',\n    data: {\n      labels: [...],\n      datasets: [{\n        data: [...],\n        borderColor: accent,\n        backgroundColor: accent + '20',\n        tension: 0.4,\n        fill: true\n      }]\n    },\n    options: {\n      responsive: true,\n      maintainAspectRatio: false,\n      plugins: { legend: { display: true } },\n      scales: {\n        y: { grid: { color: border } },\n        x: { grid: { display: false } }\n      }\n    }\n  });\n\u003C\u002Fscript>\n```\n\n**Key rules:**\n- Set height on the **wrapper div**, never on the canvas\n- Always use `responsive: true, maintainAspectRatio: false`\n- Use UMD build from CDN (sets `window.Chart` global)\n- Read CSS variables via `getComputedStyle` with a literal fallback (`pick()`) for chart colors\n\n## Typography\n\n- Font: inherited from host (`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`)\n- Weight: favor **400** (regular) and **500** (medium); use 600 sparingly for a key figure or heading. Avoid 700 — it reads heavy on the chat surface\n- Heading sizes: h1 = 22px, h2 = 18px, h3 = 16px (all weight 500)\n- Body: 14-16px, weight 400\n- Use **sentence case** — no Title Case or ALL CAPS (except short metric labels)\n\n## Interactivity\n\n### Make it explorable\n\nA widget runs JavaScript, so prefer something the user can **poke at**, not just read. When the data supports it, reach for:\n\n- **Sortable \u002F filterable tables** — click a header to sort by P&L or weight; filter to a sector or watchlist.\n- **Series & metric toggles** — show\u002Fhide chart series, switch price ↔ % change, flip timeframe (1M \u002F 6M \u002F 1Y).\n- **Hover detail** — tooltips on chart points and table rows that surface the underlying numbers.\n- **What-if inputs** — a slider or field that recomputes a figure live (drag a growth rate, watch the projection update).\n- **Tabs \u002F segmented views** — split a dense widget (Overview \u002F Holdings \u002F Performance) so the reader drills in.\n\nIt all runs **client-side over the embedded data** — never `fetch()` a non-CDN origin (CSP blocks it; use `data_files` for anything large). Keep a meaningful default state so the widget reads correctly before any interaction. Use `sendPrompt()` only when the next step genuinely belongs back in the chat (a new query, a deeper analysis) — handle exploration the widget can do itself in-place.\n\n### sendPrompt()\n\nCall `sendPrompt('text')` from buttons to trigger a follow-up chat message:\n\n```html\n\u003Cbutton onclick=\"sendPrompt('Show detailed revenue breakdown')\"\n        style=\"padding: 8px 16px; background: var(--color-accent-primary); color: white;\n               border: none; border-radius: 6px; cursor: pointer;\">\n  Revenue Details ↗\n\u003C\u002Fbutton>\n```\n\nAdd a **↗ arrow** on buttons that call `sendPrompt()` to signal they trigger a chat action.\n\n### Refresh \u002F Animation\n\n`setInterval` and `requestAnimationFrame` work normally for animations and live tickers:\n\n```javascript\nsetInterval(function() {\n  \u002F\u002F Update prices, rotate data, animate\n  updateDisplay();\n}, 3000);\n```\n\n## File Data\n\nUse `data_files` to load data from sandbox files instead of inlining everything in the HTML string. This is especially useful for larger datasets.\n\n### Workflow\n\n1. Generate data files via Python\n2. Pass file paths to `ShowWidget` via `data_files`\n3. Access data in the widget via `window.__WIDGET_DATA__[\"filename\"]`\n\n```python\n# Step 1: Generate data\nimport json\ndata = {\"labels\": [\"Q1\", \"Q2\", \"Q3\"], \"values\": [100, 150, 200]}\nwith open(\"\u003Ctask_name>\u002Fchart_data.json\", \"w\") as f:\n    json.dump(data, f)\n\n# Step 2: Agent calls ShowWidget with data_files\nShowWidget(\n    html='\u003Cdiv id=\"chart\">...\u003C\u002Fdiv>\u003Cscript>var d = JSON.parse(__WIDGET_DATA__[\"chart_data.json\"]); ...\u003C\u002Fscript>',\n    data_files=[\"\u003Ctask_name>\u002Fchart_data.json\"]\n)\n```\n\n### Widget access\n\n```javascript\n\u002F\u002F Text files (json, csv, txt, etc.) — returned as strings\nvar data = JSON.parse(window.__WIDGET_DATA__[\"chart_data.json\"]);\nvar csvText = window.__WIDGET_DATA__[\"results.csv\"];\n\n\u002F\u002F Binary files (png, jpg, etc.) — returned as data URLs\ndocument.getElementById(\"img\").src = window.__WIDGET_DATA__[\"chart.png\"];\n```\n\n### Supported file types\n\n- **Text** (returned as strings): `.json`, `.csv`, `.txt`, `.html`, `.xml`, `.svg`, `.md`, `.yaml`, `.yml`, `.tsv`, `.geojson`, `.topojson`\n- **Binary** (returned as data URLs): `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.ico`\n\n### Size limits\n\nTotal inline data is capped at 500KB across all files. Keep datasets concise — aggregate or sample large files before passing them.\n\n## Blocked Patterns\n\nThe following will cause `ShowWidget` to **reject** your HTML with an error. Fix and retry:\n\n| Pattern | Why blocked |\n|---------|-------------|\n| `new ResizeObserver(...)` | Host handles iframe sizing — your observer creates infinite resize loops |\n| `parent.postMessage(...)` | Use `sendPrompt()` instead — direct postMessage bypasses the bridge |\n| `window.top.*` \u002F `window.parent.*` | Sandboxed iframe — parent access is blocked |\n| `position: fixed` | Breaks iframe auto-sizing |\n| Background\u002Fborder on outermost element | Breaks seamless integration with chat surface |\n\n## Design Patterns\n\n### Metric Cards Row\n\n```html\n\u003Cdiv style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px;\">\n  \u003Cdiv style=\"background: var(--color-bg-subtle); padding: 14px 16px; border-radius: 8px; border: 0.5px solid var(--color-border-muted);\">\n    \u003Cdiv style=\"font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;\">Revenue\u003C\u002Fdiv>\n    \u003Cdiv style=\"font-size: 24px; font-weight: 500;\">$2.4M\u003C\u002Fdiv>\n    \u003Cdiv style=\"font-size: 12px; color: var(--color-profit);\">+12.5%\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n  \u003C!-- more cards... -->\n\u003C\u002Fdiv>\n```\n\n### Data Table\n\n```html\n\u003Ctable style=\"width: 100%; border-collapse: collapse; font-size: 14px;\">\n  \u003Cthead>\n    \u003Ctr style=\"border-bottom: 0.5px solid var(--color-border-muted);\">\n      \u003Cth style=\"text-align: left; padding: 8px; color: var(--color-text-secondary); font-weight: 500; font-size: 12px;\">Symbol\u003C\u002Fth>\n      \u003Cth style=\"text-align: right; padding: 8px; color: var(--color-text-secondary); font-weight: 500; font-size: 12px;\">Price\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr style=\"border-bottom: 0.5px solid var(--color-border-muted);\">\n      \u003Ctd style=\"padding: 8px; font-weight: 500;\">AAPL\u003C\u002Ftd>\n      \u003Ctd style=\"text-align: right; padding: 8px;\">$213.18\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n```\n\n### Section with Chart\n\n```html\n\u003Cdiv style=\"background: var(--color-bg-card); border-radius: 8px; border: 0.5px solid var(--color-border-muted); padding: 16px; margin-bottom: 16px;\">\n  \u003Cdiv style=\"font-size: 16px; font-weight: 500; margin-bottom: 12px;\">Performance\u003C\u002Fdiv>\n  \u003Cdiv style=\"position: relative; height: 200px;\">\n    \u003Ccanvas id=\"perfChart\">\u003C\u002Fcanvas>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n","# Inline Widget\n\nRender interactive HTML\u002FSVG widgets directly inside the chat conversation using `ShowWidget`. Widgets appear inline between text — no sandbox, no preview URL, no side panel. They run JavaScript, so lean into making them **interactive and explorable** where it helps — something the user can sort, filter, toggle, and hover over, not just a static picture.\n\n## When to Use\n\n- User wants a **quick visualization** embedded in the conversation (chart, metric card, data table)\n- The visualization is **self-contained** — all data is embedded in the HTML, no server needed\n- User wants **interactivity** within the chat: buttons, toggles, hover effects, animated charts\n- The output is a **single view** — not a multi-page app or dashboard that needs routing\n\n**Use `interactive-dashboard` instead if:** User needs a multi-page web app, server-side data, live data refresh, or complex interactivity requiring React\u002FFastAPI.\n\nRead `.agents\u002Fskills\u002Fui-design\u002FSKILL.md` for design quality — its color discipline, chart restraint, and anti-slop principles apply here too. Its font pairings and type scale, though, are for full documents; a widget sits on the chat surface, so use the host-font typography rules below instead.\n\n## ShowWidget API\n\n```\nShowWidget(html: str, title: str | None = None, data_files: list[str] | None = None)\n```\n\n- `html`: Raw HTML fragment — no `\u003C!DOCTYPE>`, `\u003Chtml>`, `\u003Chead>`, or `\u003Cbody>` tags\n- `title`: Optional metadata (not displayed to user)\n- `data_files`: Optional list of sandbox file paths to make available as `window.__WIDGET_DATA__`\n\nThe HTML is rendered in a sandboxed iframe with:\n- **CDN libraries**: `cdnjs.cloudflare.com`, `cdn.jsdelivr.net`, `unpkg.com`, `esm.sh`\n- **CSS theme variables**: automatically injected (see Theme section)\n- **`sendPrompt('text')`**: global function to trigger follow-up chat messages\n- **`window.__WIDGET_DATA__`**: dict of filename→content for files passed via `data_files`\n- **No network to non-CDN origins**: `fetch()` \u002F `XMLHttpRequest` to arbitrary URLs are blocked by CSP — only CDN domains (cdnjs, jsdelivr, unpkg, esm.sh) are allowed. Use `data_files` for sandbox files, or embed small data directly in HTML\n\n## Layout Rules (CRITICAL)\n\nThe widget sits directly on the chat surface inside a transparent iframe. Follow these rules for seamless integration:\n\n### Outer Element — Transparent Shell\n\nThe **outermost HTML element** must have:\n- **NO background** (or `background: transparent`)\n- **NO border**\n- **NO border-radius**\n- **NO box-shadow**\n- **NO padding** — add padding on inner sections only\n\n```html\n\u003C!-- CORRECT: transparent outer shell -->\n\u003Cdiv>\n  \u003Cdiv style=\"background: var(--color-bg-card, #ffffff); border-radius: 8px; padding: 16px; ...\">\n    ...inner card content...\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003C!-- WRONG: styled outer wrapper — will be rejected -->\n\u003Cdiv style=\"background: var(--color-bg-page); border: 1px solid ...; border-radius: 8px; padding: 20px;\">\n  ...content...\n\u003C\u002Fdiv>\n```\n\n### Inner Elements — Use Theme Variables\n\nInner cards, sections, and components should use CSS variables for styling, always in the fallback form:\n\n```css\n\u002F* Card *\u002F\nbackground: var(--color-bg-card, #ffffff);\nborder: 0.5px solid var(--color-border-muted, #e4e1dc);\nborder-radius: 8px;\npadding: 16px;\n\n\u002F* Metric card *\u002F\nbackground: var(--color-bg-subtle, #f4f2ee);\nborder: 0.5px solid var(--color-border-muted, #e4e1dc);\nborder-radius: 8px;\n```\n\nIn chat the variables are always injected, so the fallback never shows there — it is what renders when the widget is saved as a workspace `.html` file and previewed before theme injection or opened standalone. Use the light literals from the html-report skill's table.\n\n### Positioning\n\n- **NO `position: fixed`** — breaks iframe auto-sizing (elements collapse to 0 height)\n- Use `position: relative` for chart containers\n- No nested scrolling — the iframe auto-sizes to fit all content\n\n## Theme Variables\n\nThese CSS variables are automatically injected and resolve correctly in both light and dark mode:\n\n| Variable | Purpose |\n|----------|---------|\n| `--color-bg-page` | Page background |\n| `--color-bg-card` | Card\u002Fpanel background |\n| `--color-bg-elevated` | Elevated surface |\n| `--color-bg-subtle` | Subtle\u002Fmuted background |\n| `--color-bg-hover` | Hover state background |\n| `--color-text-primary` | Primary text |\n| `--color-text-secondary` | Secondary\u002Fmuted text |\n| `--color-text-tertiary` | Hint\u002Flabel text |\n| `--color-border-muted` | Default border (use with 0.5px) |\n| `--color-accent-primary` | Brand\u002Faccent color |\n| `--color-profit` | Positive\u002Fgain (green) |\n| `--color-loss` | Negative\u002Floss (red) |\n| `--color-warning` | Warning (amber) |\n| `--color-info` | Info (blue) |\n| `--color-success` | Success (green) |\n\n**Never hardcode colors** like `#333` or `rgb(...)` for text, backgrounds, or borders — they break in dark mode. Author every color as `var(--color-x, #lightLiteral)`: the injected variable always wins in chat, and the fallback keeps the widget legible on its secondary surfaces. The only exception is chart canvas colors — Chart.js canvas cannot read CSS variables; resolve them via `getComputedStyle` with a literal fallback.\n\n## Charts (Chart.js)\n\nLoad Chart.js from CDN and follow these rules:\n\n```html\n\u003C!-- Wrapper div with explicit height — REQUIRED -->\n\u003Cdiv style=\"position: relative; height: 200px;\">\n  \u003Ccanvas id=\"myChart\">\u003C\u002Fcanvas>\n\u003C\u002Fdiv>\n\n\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fchart.js\">\u003C\u002Fscript>\n\u003Cscript>\n  \u002F\u002F Read CSS variables for chart colors (canvas can't use var());\n  \u002F\u002F the literal fallback covers the widget opened outside the chat surface.\n  var cs = getComputedStyle(document.documentElement);\n  function pick(name, fallback) { return cs.getPropertyValue(name).trim() || fallback; }\n  var accent = pick('--color-accent-primary', '#1f5fb4');\n  var border = pick('--color-border-muted', '#e4e1dc');\n\n  new Chart(document.getElementById('myChart'), {\n    type: 'line',\n    data: {\n      labels: [...],\n      datasets: [{\n        data: [...],\n        borderColor: accent,\n        backgroundColor: accent + '20',\n        tension: 0.4,\n        fill: true\n      }]\n    },\n    options: {\n      responsive: true,\n      maintainAspectRatio: false,\n      plugins: { legend: { display: true } },\n      scales: {\n        y: { grid: { color: border } },\n        x: { grid: { display: false } }\n      }\n    }\n  });\n\u003C\u002Fscript>\n```\n\n**Key rules:**\n- Set height on the **wrapper div**, never on the canvas\n- Always use `responsive: true, maintainAspectRatio: false`\n- Use UMD build from CDN (sets `window.Chart` global)\n- Read CSS variables via `getComputedStyle` with a literal fallback (`pick()`) for chart colors\n\n## Typography\n\n- Font: inherited from host (`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`)\n- Weight: favor **400** (regular) and **500** (medium); use 600 sparingly for a key figure or heading. Avoid 700 — it reads heavy on the chat surface\n- Heading sizes: h1 = 22px, h2 = 18px, h3 = 16px (all weight 500)\n- Body: 14-16px, weight 400\n- Use **sentence case** — no Title Case or ALL CAPS (except short metric labels)\n\n## Interactivity\n\n### Make it explorable\n\nA widget runs JavaScript, so prefer something the user can **poke at**, not just read. When the data supports it, reach for:\n\n- **Sortable \u002F filterable tables** — click a header to sort by P&L or weight; filter to a sector or watchlist.\n- **Series & metric toggles** — show\u002Fhide chart series, switch price ↔ % change, flip timeframe (1M \u002F 6M \u002F 1Y).\n- **Hover detail** — tooltips on chart points and table rows that surface the underlying numbers.\n- **What-if inputs** — a slider or field that recomputes a figure live (drag a growth rate, watch the projection update).\n- **Tabs \u002F segmented views** — split a dense widget (Overview \u002F Holdings \u002F Performance) so the reader drills in.\n\nIt all runs **client-side over the embedded data** — never `fetch()` a non-CDN origin (CSP blocks it; use `data_files` for anything large). Keep a meaningful default state so the widget reads correctly before any interaction. Use `sendPrompt()` only when the next step genuinely belongs back in the chat (a new query, a deeper analysis) — handle exploration the widget can do itself in-place.\n\n### sendPrompt()\n\nCall `sendPrompt('text')` from buttons to trigger a follow-up chat message:\n\n```html\n\u003Cbutton onclick=\"sendPrompt('Show detailed revenue breakdown')\"\n        style=\"padding: 8px 16px; background: var(--color-accent-primary); color: white;\n               border: none; border-radius: 6px; cursor: pointer;\">\n  Revenue Details ↗\n\u003C\u002Fbutton>\n```\n\nAdd a **↗ arrow** on buttons that call `sendPrompt()` to signal they trigger a chat action.\n\n### Refresh \u002F Animation\n\n`setInterval` and `requestAnimationFrame` work normally for animations and live tickers:\n\n```javascript\nsetInterval(function() {\n  \u002F\u002F Update prices, rotate data, animate\n  updateDisplay();\n}, 3000);\n```\n\n## File Data\n\nUse `data_files` to load data from sandbox files instead of inlining everything in the HTML string. This is especially useful for larger datasets.\n\n### Workflow\n\n1. Generate data files via Python\n2. Pass file paths to `ShowWidget` via `data_files`\n3. Access data in the widget via `window.__WIDGET_DATA__[\"filename\"]`\n\n```python\n# Step 1: Generate data\nimport json\ndata = {\"labels\": [\"Q1\", \"Q2\", \"Q3\"], \"values\": [100, 150, 200]}\nwith open(\"\u003Ctask_name>\u002Fchart_data.json\", \"w\") as f:\n    json.dump(data, f)\n\n# Step 2: Agent calls ShowWidget with data_files\nShowWidget(\n    html='\u003Cdiv id=\"chart\">...\u003C\u002Fdiv>\u003Cscript>var d = JSON.parse(__WIDGET_DATA__[\"chart_data.json\"]); ...\u003C\u002Fscript>',\n    data_files=[\"\u003Ctask_name>\u002Fchart_data.json\"]\n)\n```\n\n### Widget access\n\n```javascript\n\u002F\u002F Text files (json, csv, txt, etc.) — returned as strings\nvar data = JSON.parse(window.__WIDGET_DATA__[\"chart_data.json\"]);\nvar csvText = window.__WIDGET_DATA__[\"results.csv\"];\n\n\u002F\u002F Binary files (png, jpg, etc.) — returned as data URLs\ndocument.getElementById(\"img\").src = window.__WIDGET_DATA__[\"chart.png\"];\n```\n\n### Supported file types\n\n- **Text** (returned as strings): `.json`, `.csv`, `.txt`, `.html`, `.xml`, `.svg`, `.md`, `.yaml`, `.yml`, `.tsv`, `.geojson`, `.topojson`\n- **Binary** (returned as data URLs): `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.ico`\n\n### Size limits\n\nTotal inline data is capped at 500KB across all files. Keep datasets concise — aggregate or sample large files before passing them.\n\n## Blocked Patterns\n\nThe following will cause `ShowWidget` to **reject** your HTML with an error. Fix and retry:\n\n| Pattern | Why blocked |\n|---------|-------------|\n| `new ResizeObserver(...)` | Host handles iframe sizing — your observer creates infinite resize loops |\n| `parent.postMessage(...)` | Use `sendPrompt()` instead — direct postMessage bypasses the bridge |\n| `window.top.*` \u002F `window.parent.*` | Sandboxed iframe — parent access is blocked |\n| `position: fixed` | Breaks iframe auto-sizing |\n| Background\u002Fborder on outermost element | Breaks seamless integration with chat surface |\n\n## Design Patterns\n\n### Metric Cards Row\n\n```html\n\u003Cdiv style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px;\">\n  \u003Cdiv style=\"background: var(--color-bg-subtle); padding: 14px 16px; border-radius: 8px; border: 0.5px solid var(--color-border-muted);\">\n    \u003Cdiv style=\"font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;\">Revenue\u003C\u002Fdiv>\n    \u003Cdiv style=\"font-size: 24px; font-weight: 500;\">$2.4M\u003C\u002Fdiv>\n    \u003Cdiv style=\"font-size: 12px; color: var(--color-profit);\">+12.5%\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n  \u003C!-- more cards... -->\n\u003C\u002Fdiv>\n```\n\n### Data Table\n\n```html\n\u003Ctable style=\"width: 100%; border-collapse: collapse; font-size: 14px;\">\n  \u003Cthead>\n    \u003Ctr style=\"border-bottom: 0.5px solid var(--color-border-muted);\">\n      \u003Cth style=\"text-align: left; padding: 8px; color: var(--color-text-secondary); font-weight: 500; font-size: 12px;\">Symbol\u003C\u002Fth>\n      \u003Cth style=\"text-align: right; padding: 8px; color: var(--color-text-secondary); font-weight: 500; font-size: 12px;\">Price\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr style=\"border-bottom: 0.5px solid var(--color-border-muted);\">\n      \u003Ctd style=\"padding: 8px; font-weight: 500;\">AAPL\u003C\u002Ftd>\n      \u003Ctd style=\"text-align: right; padding: 8px;\">$213.18\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n```\n\n### Section with Chart\n\n```html\n\u003Cdiv style=\"background: var(--color-bg-card); border-radius: 8px; border: 0.5px solid var(--color-border-muted); padding: 16px; margin-bottom: 16px;\">\n  \u003Cdiv style=\"font-size: 16px; font-weight: 500; margin-bottom: 12px;\">Performance\u003C\u002Fdiv>\n  \u003Cdiv style=\"position: relative; height: 200px;\">\n    \u003Ccanvas id=\"perfChart\">\u003C\u002Fcanvas>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n",{"name":5,"description":7},"main","f5d250aa1bedbf685a23b5220f50f9192f76289a","plugins\u002Flangalpha_deliverables\u002Fskills\u002Finline-widget",387,"https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha","https:\u002F\u002Flangalpha.ai","https:\u002F\u002Fgithub.com\u002Fginlix-ai","2026-11-15 02:14:56",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add ginlix-ai\u002FLangAlpha --skill inline-widget",{"tool":62,"command":63},"bunx","bunx skills add ginlix-ai\u002FLangAlpha --skill inline-widget",{"tool":65,"command":66},"pnpm","pnpm dlx skills add ginlix-ai\u002FLangAlpha --skill inline-widget","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Fplugins\u002Flangalpha_deliverables\u002Fskills\u002Finline-widget\u002FSKILL.md",true,[],[71,79,92,101,109,119],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":78},"01M743D4A5JN1KT6ZFH64N893X","dashboard-page","The user's own LangAlpha Dashboard: build or change the page they see when they open LangAlpha, with live market data and custom data refreshed on a schedule","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Fplugins\u002Flangalpha_deliverables\u002Fskills\u002Fdashboard-page\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":86,"publishedAt":43},"01M6CCP2R7FYQ1DHW1D59NR7CR","fx-notes","Fixture skill fx-notes","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fvalid-full\u002Fskills\u002Ffx-notes\u002FSKILL.md",[85],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[87,88,89,90,91],"fx","fx notes","notes","fixture skill","fixture",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":99,"publishedAt":43},"01M6CCP16MF4A5J06320JAV03Z","good","Fixture skill good","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fskill-defects\u002Fskills\u002Fgood\u002FSKILL.md",[98],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[94,100,90,91],"skill good",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":108,"publishedAt":43},"01M6CCNZAYQT0RT73XFTFPTJC0","survivor","Fixture skill survivor","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fmcp-doc-invalid\u002Fskills\u002Fsurvivor\u002FSKILL.md",[107],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[103,90,91],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":43},"01M6CCNX73ZH4DY2W1K0CH5BNP","alpha-notes","Notes on alpha things.","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fmarketplace-mixed\u002Fplugins\u002Falpha\u002Fskills\u002Falpha-notes\u002FSKILL.md",[],[116,117,89,118],"alpha","alpha notes","things",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":43},"01M6CCNVK5ZV4CZ2T0M6SH8QB9","cli-tips","Tips for the command line.","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fdialect-cursor\u002Fskills\u002Fcli-tips\u002FSKILL.md",[],[126,127,128,129,130,131,132],"cli tips","tips","cli","line","for","command line","command"]