[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFWCS2WH12NV6E8AWHZMAB":3,"skill-same:01M6KFWCS2WH12NV6E8AWHZMAB":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6KFWCS2WH12NV6E8AWHZMAB","run2_d3-interactive-table",null,"Building a scrollable D3.js HTML table linked to a bubble chart with bidirectional click-highlight, correct scrollIntoView for overflow containers, and sector color badges.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",93,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fstock-data-visualization\u002Frun2_d3-interactive-table\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"table","interactive","d3","d3 interactive table","run2 d3 interactive table","containers","js","correct","html","chart","click","color","with","for","2026-11-10 10:12:30",false,"---\nname: run2_d3-interactive-table\ndescription: Building a scrollable D3.js HTML table linked to a bubble chart with bidirectional click-highlight, correct scrollIntoView for overflow containers, and sector color badges.\n---\n\n# D3.js v6 Interactive Table (Improved)\n\n## HTML Structure\n```html\n\u003Cdiv id=\"table-panel\">\n    \u003Ch2>All Stocks\u003C\u002Fh2>\n    \u003Cdiv id=\"table-container\">  \u003C!-- scrollable wrapper -->\n        \u003Ctable id=\"stock-table\">\n            \u003Cthead>\u003Ctr>\n                \u003Cth>Ticker\u003C\u002Fth>\u003Cth>Full Company Name\u003C\u002Fth>\n                \u003Cth>Sector\u003C\u002Fth>\u003Cth>Market Cap\u003C\u002Fth>\n            \u003C\u002Ftr>\u003C\u002Fthead>\n            \u003Ctbody id=\"table-body\">\u003C\u002Ftbody>\n        \u003C\u002Ftable>\n    \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n## CSS — Sticky Header + Scrollable Body\n```css\n#table-container {\n    flex: 1;\n    overflow-y: auto;   \u002F* Scroll within panel *\u002F\n}\n#stock-table thead {\n    position: sticky;\n    top: 0;\n    z-index: 2;\n    background: #f0f2f5;\n}\n```\n\n## Building Rows with D3\n```javascript\nconst sorted = [...data].sort((a, b) => a.ticker.localeCompare(b.ticker));\nconst rows = d3.select('#table-body')\n    .selectAll('tr')\n    .data(sorted, d => d.ticker)\n    .join('tr')\n    .attr('data-ticker', d => d.ticker);\n\nrows.each(function(d) {\n    const tr = d3.select(this);\n    tr.append('td').text(d.ticker);\n    tr.append('td').text(d['full name']);\n    \u002F\u002F Sector badge with matching bubble color\n    tr.append('td').append('span')\n        .attr('class', 'sector-badge')\n        .style('background-color', getSectorColor(d.sector))\n        .text(d.sector);\n    tr.append('td').text(formatMarketCap(d.marketCapNum));\n});\n```\n\n## Bidirectional Selection\n```javascript\nlet currentSelected = null;\n\nfunction handleSelection(ticker) {\n    if (currentSelected === ticker) {\n        \u002F\u002F Toggle off\n        currentSelected = null;\n        d3.selectAll('circle.bubble').classed('highlighted', false);\n        d3.selectAll('#table-body tr').classed('highlighted', false);\n    } else {\n        currentSelected = ticker;\n        d3.selectAll('circle.bubble').classed('highlighted', d => d.ticker === ticker);\n        d3.selectAll('#table-body tr').classed('highlighted', d => d.ticker === ticker);\n        scrollTableToTicker(ticker);\n    }\n}\n\n\u002F\u002F Wire up table rows and circles to the same handler\nrows.on('click', (event, d) => handleSelection(d.ticker));\ncircles.on('click', (event, d) => handleSelection(d.ticker));\n```\n\n## Correct scrollIntoView for Nested Overflow Container\nIMPORTANT: `scrollIntoView()` scrolls the nearest scrollable ancestor.\nSince `#table-container` is the scrollable container, this just works:\n```javascript\nfunction scrollTableToTicker(ticker) {\n    const row = document.querySelector(`#table-body tr[data-ticker=\"${ticker}\"]`);\n    if (row) {\n        row.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n    }\n}\n```\n\n`block: 'nearest'` is key — it scrolls only if the element is out of view,\nand scrolls within the nearest scrollable ancestor (`#table-container`).\n\n## CSS for Highlight States\n```css\n#stock-table tbody tr.highlighted {\n    background-color: #fff3cd;\n    font-weight: 600;\n}\n\ncircle.bubble.highlighted {\n    stroke: #222;\n    stroke-width: 3px;\n    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));\n}\n\n.sector-badge {\n    display: inline-block;\n    padding: 2px 7px;\n    border-radius: 10px;\n    font-size: 0.75rem;\n    color: white;\n}\n```\n","# D3.js v6 Interactive Table (Improved)\n\n## HTML Structure\n```html\n\u003Cdiv id=\"table-panel\">\n    \u003Ch2>All Stocks\u003C\u002Fh2>\n    \u003Cdiv id=\"table-container\">  \u003C!-- scrollable wrapper -->\n        \u003Ctable id=\"stock-table\">\n            \u003Cthead>\u003Ctr>\n                \u003Cth>Ticker\u003C\u002Fth>\u003Cth>Full Company Name\u003C\u002Fth>\n                \u003Cth>Sector\u003C\u002Fth>\u003Cth>Market Cap\u003C\u002Fth>\n            \u003C\u002Ftr>\u003C\u002Fthead>\n            \u003Ctbody id=\"table-body\">\u003C\u002Ftbody>\n        \u003C\u002Ftable>\n    \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n## CSS — Sticky Header + Scrollable Body\n```css\n#table-container {\n    flex: 1;\n    overflow-y: auto;   \u002F* Scroll within panel *\u002F\n}\n#stock-table thead {\n    position: sticky;\n    top: 0;\n    z-index: 2;\n    background: #f0f2f5;\n}\n```\n\n## Building Rows with D3\n```javascript\nconst sorted = [...data].sort((a, b) => a.ticker.localeCompare(b.ticker));\nconst rows = d3.select('#table-body')\n    .selectAll('tr')\n    .data(sorted, d => d.ticker)\n    .join('tr')\n    .attr('data-ticker', d => d.ticker);\n\nrows.each(function(d) {\n    const tr = d3.select(this);\n    tr.append('td').text(d.ticker);\n    tr.append('td').text(d['full name']);\n    \u002F\u002F Sector badge with matching bubble color\n    tr.append('td').append('span')\n        .attr('class', 'sector-badge')\n        .style('background-color', getSectorColor(d.sector))\n        .text(d.sector);\n    tr.append('td').text(formatMarketCap(d.marketCapNum));\n});\n```\n\n## Bidirectional Selection\n```javascript\nlet currentSelected = null;\n\nfunction handleSelection(ticker) {\n    if (currentSelected === ticker) {\n        \u002F\u002F Toggle off\n        currentSelected = null;\n        d3.selectAll('circle.bubble').classed('highlighted', false);\n        d3.selectAll('#table-body tr').classed('highlighted', false);\n    } else {\n        currentSelected = ticker;\n        d3.selectAll('circle.bubble').classed('highlighted', d => d.ticker === ticker);\n        d3.selectAll('#table-body tr').classed('highlighted', d => d.ticker === ticker);\n        scrollTableToTicker(ticker);\n    }\n}\n\n\u002F\u002F Wire up table rows and circles to the same handler\nrows.on('click', (event, d) => handleSelection(d.ticker));\ncircles.on('click', (event, d) => handleSelection(d.ticker));\n```\n\n## Correct scrollIntoView for Nested Overflow Container\nIMPORTANT: `scrollIntoView()` scrolls the nearest scrollable ancestor.\nSince `#table-container` is the scrollable container, this just works:\n```javascript\nfunction scrollTableToTicker(ticker) {\n    const row = document.querySelector(`#table-body tr[data-ticker=\"${ticker}\"]`);\n    if (row) {\n        row.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n    }\n}\n```\n\n`block: 'nearest'` is key — it scrolls only if the element is out of view,\nand scrolls within the nearest scrollable ancestor (`#table-container`).\n\n## CSS for Highlight States\n```css\n#stock-table tbody tr.highlighted {\n    background-color: #fff3cd;\n    font-weight: 600;\n}\n\ncircle.bubble.highlighted {\n    stroke: #222;\n    stroke-width: 3px;\n    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));\n}\n\n.sector-badge {\n    display: inline-block;\n    padding: 2px 7px;\n    border-radius: 10px;\n    font-size: 0.75rem;\n    color: white;\n}\n```\n",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fstock-data-visualization\u002Frun2_d3-interactive-table",8,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill run2_d3-interactive-table",{"tool":51,"command":52},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill run2_d3-interactive-table",{"tool":54,"command":55},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill run2_d3-interactive-table","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fstock-data-visualization\u002Frun2_d3-interactive-table\u002FSKILL.md",true,[],[60,73,94,112,132,143],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":32},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[],[67,68,69,70,71,72],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":32},"01M6KM51TMVXG79MMPCS6Y8G86","travel-planning-workflow","Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,31,89,90,91,92,93],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","user","it","requirements","essential","itineraries",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":32},"01M6KM4DY820XHS9YTSK5QP5HD","bundled-dataset-search-tool","invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[101,102,103,104,105,106,107,83,108,109,84,110,31,111,81],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":32},"01M6KM465BB9PQ0B548HQSVAWZ","glm-output","Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[119,120,121,31,122,123,124,125,126,127,128,129,110,130,131],"glm output","output","glm","tasks","metrics","json","basics","guidance","matching","verifier","processing","root","calibration",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":32},"01M6KM40KY3QWDW5W97S39R2BC","glm-calibration","Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[],[139,131,121,120,126,125,122,140,141,31,142],"glm calibration","setup","companion","metric",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":32},"01M6KM3VHHVSGMGHJQB3PPT6YG","glm-basics","A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[150,121,125,151,139,131,31,120,152,153,154,155,156,157,122],"glm basics","inspect","relevant","files","good","use","how","Evaluation"]