[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F3AJR4TE4SFTS077CZ20S9":3,"skill-same:01M6F3AJR4TE4SFTS077CZ20S9":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6F3AJR4TE4SFTS077CZ20S9","visualise",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fbentossell\u002Fvisualise\u002Fvisualise\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# Inline Visualizer\n\nRender rich visual content — SVG diagrams, HTML interactive widgets, charts — directly inline in a chat conversation. Output streams token-by-token into a sandboxed iframe. The result feels like a natural extension of the conversation, not an attachment.\n\n## How it works\n\nYou generate raw HTML or SVG fragments. The client renders them in a sandboxed iframe with the design system's CSS variables injected. No `\u003Chtml>`, `\u003Chead>`, or `\u003Cbody>` tags — just content fragments.\n\n**Two output modes:**\n\n- **SVG mode**: Output starts with `\u003Csvg>`. Client auto-wraps in a card. Best for static diagrams.\n- **HTML mode**: Raw HTML fragment. Best for interactive content (sliders, tabs, charts, controls). You can embed `\u003Csvg>` elements inside HTML mode.\n\nThe client detects which mode based on whether the output starts with `\u003Csvg`.\n\n## Before generating any visual\n\nRead the design system reference before your first visual in a conversation:\n\n1. **Always read first**: `references\u002Fdesign-system.md` — CSS variables, color ramps, typography, core rules\n2. **Then read the relevant module**:\n   - Diagrams (flowcharts, structural, illustrative): `references\u002Fdiagrams.md`\n   - Interactive explainers, comparisons, data records: `references\u002Fcomponents.md`\n   - Charts (Chart.js, data viz): `references\u002Fcharts.md`\n\nRead the design system file once per conversation. Read module files as needed for each visual type.\n\n## Streaming constraints\n\nOutput streams token-by-token into the DOM. This dictates structure:\n\n1. `\u003Cstyle>` first (keep under 15 lines — inline styles preferred)\n2. Visible HTML\u002FSVG content next (the user sees it building up)\n3. `\u003Cscript>` last (executes only after streaming completes)\n\n**Because of streaming:**\n- No gradients, drop shadows, blur, or glow — they flash during DOM diffs. Use flat fills.\n- No `display:none` or hidden content — it streams invisibly.\n- No `\u003C!-- comments -->` or `\u002F* comments *\u002F` — waste tokens, break streaming.\n- Inline `style=\"...\"` preferred over `\u003Cstyle>` blocks so elements look correct mid-stream.\n- No tabs or carousels that start hidden — show everything stacked vertically during stream. Post-streaming JS can add interactivity.\n\n## Iframe sandbox rules\n\nThe visual renders in a sandboxed iframe. These are hard constraints:\n\n- **No localStorage \u002F sessionStorage** — all state must be in-memory\n- **No position: fixed** — the iframe auto-sizes to content height; fixed elements collapse it\n- **No external fetches** — CSP blocks API calls from inside the widget\n- **CDN allowlist only**: `cdnjs.cloudflare.com`, `esm.sh`, `cdn.jsdelivr.net`, `unpkg.com`\n- **No DOCTYPE, `\u003Chtml>`, `\u003Chead>`, `\u003Cbody>`** — just content fragments\n- Background is transparent — the host provides the container\u002Fcard styling\n- Load libraries via `\u003Cscript src=\"https:\u002F\u002Fcdnjs.cloudflare.com\u002Fajax\u002Flibs\u002F...\">` (UMD globals)\n\n## The sendPrompt bridge\n\nA global `sendPrompt(text)` function is available inside the iframe. It sends a message to the chat as if the user typed it. Use it to make visuals conversational — clicking a node in a diagram can trigger a follow-up explanation.\n\nUse `sendPrompt` when the user's next step benefits from the model thinking. Handle filtering, sorting, toggling, and calculations in local JS instead.\n\n## Choosing the right visual type\n\nRoute on the verb, not the noun. The same subject gets different treatment depending on what was asked:\n\n| User says | Type | What to build |\n|-----------|------|---------------|\n| \"how does X work\" | Illustrative diagram | Spatial metaphor showing the mechanism |\n| \"what are the components of X\" | Structural diagram | Labelled boxes showing containment |\n| \"walk me through the steps\" | Flowchart | Sequential boxes and arrows |\n| \"compare X vs Y\" | Comparison layout | Side-by-side cards with metrics |\n| \"show me the data\" | Chart | Chart.js or inline data viz |\n| \"explain X\" (spatial concept) | Interactive explainer | Sliders, controls, live state |\n\nDefault to illustrative for \"how does X work\" — it's the more ambitious choice. Don't retreat to a flowchart because it feels safer.\n\n## Multiple visuals per response\n\nGenerate multiple visuals in a single response, interleaved with prose:\n\n1. Text block (introduce\u002Fexplain)\n2. Visual\n3. Text block (transition)\n4. Visual (if needed)\n\nNever stack visuals back-to-back without text between them.\n\n## Output wrapper\n\nWrap visual output in a code fence with the language tag `visualizer` so the client detects and routes it to the iframe renderer:\n\n````\n```visualizer\n\u003Csvg width=\"100%\" viewBox=\"0 0 680 400\">\n  ...\n\u003C\u002Fsvg>\n```\n````\n\nThe client strips the fence and injects the content into the iframe with theme variables prepended.\n\n## Quick reference\n\n| Rule | Value |\n|------|-------|\n| SVG viewBox width | Always 680px |\n| Font sizes | 14px labels, 12px subtitles only |\n| Stroke width | 0.5px for borders and edges |\n| Max colors per diagram | 2-3 ramps |\n| Box subtitle length | ≤5 words |\n| Corner radius (SVG) | rx=\"4\" default, rx=\"8\" for emphasis |\n| Corner radius (HTML) | `var(--border-radius-md)` or `-lg` |\n| Min font size | 11px |\n| Text weights | 400 regular, 500 bold only |\n| Heading sizes | h1=22px, h2=18px, h3=16px |\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fbentossell\u002Fvisualise\u002Fvisualise",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill visualise",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill visualise",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill visualise","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fbentossell\u002Fvisualise\u002Fvisualise\u002FSKILL.md",true,[],[46,55,64,73,79,85],{"skillNo":47,"name":48,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[52,53,54],"model","model hierarchy","model hierarchy skill",{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[61,62,63],"MCP","zoom","zoom mcp",{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[70,71,72,62],"sdk","zoom apps sdk","apps",{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[75],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[87]]