[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCK49SGHQWKCVWY9TY6VET":3,"skill-same:01M6CCK49SGHQWKCVWY9TY6VET":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":52,"ownerDescription":17,"updatedAt":54,"install":55,"resources":68},"01M6CCK49SGHQWKCVWY9TY6VET","inline-widget","内联 HTML 小部件渲染","Inline HTML widgets: charts, dashboards, data tables rendered directly in the chat via ShowWidget","内联 HTML 小部件：通过 ShowWidget 在聊天中直接渲染图表、仪表盘和数据表。","ginlix-ai\u002FLangAlpha","ginlix-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255505137?v=4","01M6CCJK39A1C27GHF9AP4XWY0","Ginlix AI","01M6CCJK7GR7P1AWNRTPZYDJZY",2303,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Fplugins\u002Flangalpha_deliverables\u002Fskills\u002Finline-widget\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41],"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":9,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add ginlix-ai\u002FLangAlpha --skill inline-widget",{"tool":61,"command":62},"bunx","bunx skills add ginlix-ai\u002FLangAlpha --skill inline-widget",{"tool":64,"command":65},"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,[],[70,78,98,110,121,136],{"skillNo":71,"name":72,"nameZh":17,"description":73,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"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":79,"name":80,"nameZh":81,"description":82,"descriptionZh":83,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":92,"publishedAt":42},"01M6CCP2R7FYQ1DHW1D59NR7CR","fx-notes","Fx-notes 测试固定技能","Fixture skill fx-notes","测试固定装置技能 fx-notes。","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fvalid-full\u002Fskills\u002Ffx-notes\u002FSKILL.md",[86,89],{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSYDSNXQT2W2GMZGF0ZHH4","示例与演示技能",[93,94,95,96,97],"fx","fx notes","notes","fixture skill","fixture",{"skillNo":99,"name":100,"nameZh":101,"description":102,"descriptionZh":103,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":104,"categories":105,"keywords":108,"publishedAt":42},"01M6CCP16MF4A5J06320JAV03Z","good","Good 测试固定技能","Fixture skill good","测试固定装置技能 good。","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fskill-defects\u002Fskills\u002Fgood\u002FSKILL.md",[106,107],{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},[100,109,96,97],"skill good",{"skillNo":111,"name":112,"nameZh":113,"description":114,"descriptionZh":115,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":116,"categories":117,"keywords":120,"publishedAt":42},"01M6CCNZAYQT0RT73XFTFPTJC0","survivor","Survivor 测试固定技能","Fixture skill survivor","测试固定装置技能 survivor。","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fmcp-doc-invalid\u002Fskills\u002Fsurvivor\u002FSKILL.md",[118,119],{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},[112,96,97],{"skillNo":122,"name":123,"nameZh":124,"description":125,"descriptionZh":126,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":127,"categories":128,"keywords":132,"publishedAt":42},"01M6CCNX73ZH4DY2W1K0CH5BNP","alpha-notes","Alpha 事项笔记","Notes on alpha things.","关于 alpha（内测版）相关事物的笔记。","https:\u002F\u002Fgithub.com\u002Fginlix-ai\u002FLangAlpha\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fmarketplace-mixed\u002Fplugins\u002Falpha\u002Fskills\u002Falpha-notes\u002FSKILL.md",[129],{"categoryNo":130,"categoryName":131,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRFRAYBCBW9WKDY9TCSHY3","知识管理与沉淀",[133,134,95,135],"alpha","alpha notes","things",{"skillNo":137,"name":138,"nameZh":17,"description":139,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":42},"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",[],[143,144,145,146,147,148,149],"cli tips","tips","cli","line","for","command line","command"]