[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BP51GP9CWHDWMEDNP3W95V":3,"skill-same:01M7BP51GP9CWHDWMEDNP3W95V":63},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BP51GP9CWHDWMEDNP3W95V","d3-visualization",null,"Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML\u002FSVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes\u002Fscales, legends, tooltips, or data-driven SVG output.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: d3-visualization\ndescription: Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML\u002FSVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes\u002Fscales, legends, tooltips, or data-driven SVG output.\n---\n\n# D3.js Visualization Skill\n\nUse this skill to turn structured data (CSV\u002FTSV\u002FJSON) into **clean, reproducible** visualizations using **D3.js**. The goal is to produce **stable outputs** that can be verified by diffing files or hashing.\n\n## When to use\n\nActivate this skill when the user asks for any of the following:\n\n- “Make a chart\u002Fplot\u002Fgraph\u002Fvisualization”\n- bar\u002Fline\u002Fscatter\u002Farea\u002Fhistogram\u002Fbox\u002Fviolin\u002Fheatmap\n- timelines, small multiples, faceting\n- axis ticks, scales, legends, tooltips\n- data-driven SVG output for a report or web page\n- converting data to a static SVG or HTML visualization\n\nIf the user only needs a quick table or summary, **don’t** use D3—use a spreadsheet or plain markdown instead.\n\n---\n\n## Inputs you should expect\n\n- One or more local data files: `*.csv`, `*.tsv`, `*.json`\n- A chart intent:\n  - chart type (or you infer the best type)\n  - x\u002Fy fields and aggregation rules\n  - sorting\u002Ffiltering rules\n  - dimensions (width\u002Fheight) and margins\n  - color rules (categorical \u002F sequential)\n  - any labeling requirements (title, axis labels, units)\n- Output constraints:\n  - “static only”, “no animation”, “must be deterministic”, “offline”, etc.\n\nIf details are missing, **make reasonable defaults** and document them in comments near the top of the output file.\n\n---\n\n## Outputs you should produce\n\nPrefer producing **all of** the following when feasible:\n\n1. `dist\u002Fchart.html` — standalone HTML that renders the visualization\n2. `dist\u002Fchart.svg` — exported SVG (stable and diff-friendly)\n3. (Optional) `dist\u002Fchart.png` — if the task explicitly needs a raster image\n\nAlways keep outputs in a predictable folder (default: `dist\u002F`), unless the task specifies paths.\n\n---\n\n## Determinism rules (non-negotiable)\n\nTo keep results stable across runs and machines:\n\n### Data determinism\n- **Sort** input rows deterministically before binding to marks (e.g., by x then by category).\n- Use stable grouping order (explicit `Array.from(grouped.keys()).sort()`).\n- Avoid locale-dependent formatting unless fixed (use `d3.format`, `d3.timeFormat` with explicit formats).\n\n### Rendering determinism\n- **No randomness**: do not use `Math.random()` or `d3-random`.\n- **No transitions\u002Fanimations** by default (transitions can introduce timing variance).\n- **Fixed** `width`, `height`, `margin`, `viewBox`.\n- Use **explicit tick counts** only when needed; otherwise rely on D3 defaults but keep domains fixed.\n- Avoid layout algorithms with non-deterministic iteration unless you control seeds\u002Fiterations (e.g., force simulation). If a force layout is required:\n  - fix the tick count,\n  - fix initial positions deterministically (e.g., sorted nodes placed on a grid),\n  - run exactly N ticks and stop.\n\n### Offline + dependency determinism\n- Do **not** load D3 from a CDN.\n- Pin D3 to a specific version (default: **d3@7.9.0**).\n- Prefer vendoring a minified D3 bundle (e.g., `vendor\u002Fd3.v7.9.0.min.js`) or bundling with a lockfile.\n\n### File determinism\n- Stable SVG output:\n  - Avoid auto-generated IDs that may change.\n  - If you must use IDs (clipPath, gradients), derive them from stable strings (e.g., `\"clip-plot\"`).\n- Use LF line endings.\n- Keep numeric precision consistent (e.g., round to 2–4 decimals if needed).\n\n---\n\n## Recommended project layout\n\nIf the task doesn't specify an existing structure, use:\n\n```\ndist\u002F\n  chart.html        # standalone HTML with inline or linked JS\u002FCSS\n  chart.svg         # exported SVG (optional but nice)\n  chart.png         # rasterized (optional)\nvendor\u002F\n  d3.v7.9.0.min.js  # pinned D3 library\n```\n\n---\n\n## Interactive features (tooltips, click handlers, hover effects)\n\nWhen the task requires interactivity (e.g., tooltips on hover, click to highlight):\n\n### Tooltip pattern (recommended)\n\n1. **Create a tooltip element** in HTML:\n```html\n\u003Cdiv id=\"tooltip\" class=\"tooltip\">\u003C\u002Fdiv>\n```\n\n2. **Style with CSS** using `.visible` class for show\u002Fhide:\n```css\n.tooltip {\n    position: absolute;\n    padding: 10px;\n    background: rgba(0, 0, 0, 0.8);\n    color: white;\n    border-radius: 4px;\n    pointer-events: none;  \u002F* Prevent mouse interference *\u002F\n    opacity: 0;\n    transition: opacity 0.2s;\n    z-index: 1000;\n}\n\n.tooltip.visible {\n    opacity: 1;  \u002F* Show when .visible class is added *\u002F\n}\n```\n\n3. **Add event handlers** to SVG elements:\n```javascript\nsvg.selectAll('circle')\n    .on('mouseover', function(event, d) {\n        d3.select('#tooltip')\n            .classed('visible', true)  \u002F\u002F Add .visible class\n            .html(`\u003Cstrong>${d.name}\u003C\u002Fstrong>\u003Cbr\u002F>${d.value}`)\n            .style('left', (event.pageX + 10) + 'px')\n            .style('top', (event.pageY - 10) + 'px');\n    })\n    .on('mouseout', function() {\n        d3.select('#tooltip').classed('visible', false);  \u002F\u002F Remove .visible class\n    });\n```\n\n**Key points:**\n- Use `opacity: 0` by default (not `display: none`) for smooth transitions\n- Use `.classed('visible', true\u002Ffalse)` to toggle visibility\n- `pointer-events: none` prevents tooltip from blocking mouse events\n- Position tooltip relative to mouse with `event.pageX\u002FpageY`\n\n### In-shape label overlay (text drawn on top of marks)\n\nUse this pattern when a mark (circle\u002Frect\u002Fpath) must carry an **in-situ textual identifier**\n(e.g., a ticker symbol inside a bubble, a short code inside a cell). The label layer must\nnot interfere with click\u002Fhover on the mark beneath it.\n\n**Mechanism:**\n\n1. **Append a parallel `\u003Ctext>` selection** bound to the same data array as the marks.\n   Keep the two selections sibling layers in the SVG; draw text **after** marks so it renders on top.\n\n2. **Center the label on the mark** with:\n   - `text-anchor=\"middle\"` (horizontal centering)\n   - `dominant-baseline=\"central\"` (vertical centering)\n\n3. **Keep text position synchronized** with the mark. If a force simulation is used,\n   update both selections inside the same `tick` handler using `d.x` \u002F `d.y`:\n\n```javascript\nconst labels = svg.selectAll('text.bubble-label')\n    .data(data, d => d.ticker)   \u002F\u002F same key as the circles\n    .join('text')\n    .attr('class', 'bubble-label')\n    .attr('text-anchor', 'middle')\n    .attr('dominant-baseline', 'central')\n    .attr('font-size', d => Math.max(8, d.radius * 0.5))  \u002F\u002F scale with radius\n    .text(d => d.radius >= MIN_LABEL_RADIUS ? d.ticker : ''); \u002F\u002F skip when too small\n\nsimulation.on('tick', () => {\n    bubbles.attr('cx', d => d.x).attr('cy', d => d.y);\n    labels.attr('x', d => d.x).attr('y', d => d.y);\n});\n```\n\n4. **Make the overlay pointer-transparent** so clicks\u002Fhovers continue to reach the mark below.\n   Set this either in CSS or as an attribute on the text selection:\n\n```css\n.bubble-label {\n    pointer-events: none;    \u002F* clicks\u002Fhover pass through to the circle underneath *\u002F\n    user-select: none;\n}\n```\n\n5. **Legibility threshold**: when the underlying mark is too small to host readable text,\n   emit an empty string (as shown above) rather than clipping or overflowing. Pick a\n   `MIN_LABEL_RADIUS` consistent with the chosen `font-size` scaling.\n\n**Scope note:** this pattern is for annotation layers that identify the mark they sit on.\nIt is **not** a substitute for axis tick labels, external legends, or tooltip content, and\nshould not be applied to overlays that must themselves receive events (e.g., close buttons).\n\n### Click handlers for selection\u002Fhighlighting\n\n```javascript\n\u002F\u002F Add 'selected' class on click\nsvg.selectAll('.bar')\n    .on('click', function(event, d) {\n        \u002F\u002F Remove previous selection\n        d3.selectAll('.bar').classed('selected', false);\n        \u002F\u002F Add to clicked element\n        d3.select(this).classed('selected', true);\n    });\n```\n\nCSS for highlighting:\n```css\n.bar.selected {\n    stroke: #000;\n    stroke-width: 3px;\n}\n```\n\n#### Cross-view selection (bidirectional chart ↔ table linkage)\n\nWhen two or more views (e.g., a chart of marks and a tabular list of rows) represent the\n**same entities** and must stay in sync — a click in either view must highlight the matching\nentity in both — use a shared **stable key** and a pair of symmetric handlers.\n\n**Mechanism:**\n\n1. **Pick one stable key** that uniquely identifies an entity across views (e.g., `ticker`).\n   Both the mark selection and the row selection must be data-joined with this same key.\n\n2. **Define two symmetric selection functions.** Each one is the single source of truth for\n   its originating view, and each updates **both** views by the shared key:\n\n```javascript\n\u002F\u002F Called when the user clicks a bubble in the chart.\nfunction selectFromChart(key) {\n    \u002F\u002F Clear prior selection on BOTH views\n    d3.selectAll('.bubble').classed('selected', false);\n    d3.selectAll('#data-table tbody tr').classed('selected', false);\n    \u002F\u002F Set selection on BOTH views by shared key\n    d3.selectAll('.bubble').filter(d => d.ticker === key).classed('selected', true);\n    d3.selectAll('#data-table tbody tr').filter(d => d.ticker === key).classed('selected', true);\n}\n\n\u002F\u002F Called when the user clicks a row in the table.\nfunction selectFromTable(key) {\n    \u002F\u002F Same symmetric behavior — the two handlers are intentionally mirror images.\n    d3.selectAll('.bubble').classed('selected', false);\n    d3.selectAll('#data-table tbody tr').classed('selected', false);\n    d3.selectAll('.bubble').filter(d => d.ticker === key).classed('selected', true);\n    d3.selectAll('#data-table tbody tr').filter(d => d.ticker === key).classed('selected', true);\n}\n```\n\n3. **Wire each view's click to its handler:**\n\n```javascript\nbubbles.on('click', (event, d) => selectFromChart(d.ticker));\nrows.on('click',    (event, d) => selectFromTable(d.ticker));\n```\n\n4. **Style `.selected` on both views** so the highlight is visible wherever the entity appears:\n\n```css\ncircle.bubble.selected {\n    stroke: #000;\n    stroke-width: 3px;\n}\ntr.selected {\n    background: #e3f2fd;\n    border-left: 3px solid #2196f3;\n}\n```\n\n5. **If the bundled helpers are used** (`scripts\u002Finteractive_table_example.js` exposes\n   `highlightTableRow(ticker)` and the bubble-chart example exposes `highlightBubble(ticker)`),\n   invoke them **symmetrically** from both click handlers — not just one direction — so that\n   clicking either view updates the other.\n\n**Interaction with the in-shape label overlay:** because selection relies on `click` events\nreaching the mark, any overlay drawn on top of the mark (see “In-shape label overlay”) **must**\nhave `pointer-events: none`. Otherwise the overlay silently intercepts clicks and the\nbidirectional linkage will appear to work from table → chart but not from chart → table.\n\n**Scope note:** this pattern applies to selection of a single shared entity. Do not reuse the\nsame channel to synchronize unrelated state (filters, sorts, hover-only highlights, multi-select)\nunless those are explicitly required — those need their own, separately-named channels.\n\n### Conditional interactivity\n\nSometimes only certain elements should be interactive:\n```javascript\n.on('mouseover', function(event, d) {\n    \u002F\u002F Example: Don't show tooltip for certain categories\n    if (d.category === 'excluded') {\n        return;  \u002F\u002F Exit early, no tooltip\n    }\n    \u002F\u002F Show tooltip for others\n    showTooltip(event, d);\n})\n```\n\n---\n","# D3.js Visualization Skill\n\nUse this skill to turn structured data (CSV\u002FTSV\u002FJSON) into **clean, reproducible** visualizations using **D3.js**. The goal is to produce **stable outputs** that can be verified by diffing files or hashing.\n\n## When to use\n\nActivate this skill when the user asks for any of the following:\n\n- “Make a chart\u002Fplot\u002Fgraph\u002Fvisualization”\n- bar\u002Fline\u002Fscatter\u002Farea\u002Fhistogram\u002Fbox\u002Fviolin\u002Fheatmap\n- timelines, small multiples, faceting\n- axis ticks, scales, legends, tooltips\n- data-driven SVG output for a report or web page\n- converting data to a static SVG or HTML visualization\n\nIf the user only needs a quick table or summary, **don’t** use D3—use a spreadsheet or plain markdown instead.\n\n---\n\n## Inputs you should expect\n\n- One or more local data files: `*.csv`, `*.tsv`, `*.json`\n- A chart intent:\n  - chart type (or you infer the best type)\n  - x\u002Fy fields and aggregation rules\n  - sorting\u002Ffiltering rules\n  - dimensions (width\u002Fheight) and margins\n  - color rules (categorical \u002F sequential)\n  - any labeling requirements (title, axis labels, units)\n- Output constraints:\n  - “static only”, “no animation”, “must be deterministic”, “offline”, etc.\n\nIf details are missing, **make reasonable defaults** and document them in comments near the top of the output file.\n\n---\n\n## Outputs you should produce\n\nPrefer producing **all of** the following when feasible:\n\n1. `dist\u002Fchart.html` — standalone HTML that renders the visualization\n2. `dist\u002Fchart.svg` — exported SVG (stable and diff-friendly)\n3. (Optional) `dist\u002Fchart.png` — if the task explicitly needs a raster image\n\nAlways keep outputs in a predictable folder (default: `dist\u002F`), unless the task specifies paths.\n\n---\n\n## Determinism rules (non-negotiable)\n\nTo keep results stable across runs and machines:\n\n### Data determinism\n- **Sort** input rows deterministically before binding to marks (e.g., by x then by category).\n- Use stable grouping order (explicit `Array.from(grouped.keys()).sort()`).\n- Avoid locale-dependent formatting unless fixed (use `d3.format`, `d3.timeFormat` with explicit formats).\n\n### Rendering determinism\n- **No randomness**: do not use `Math.random()` or `d3-random`.\n- **No transitions\u002Fanimations** by default (transitions can introduce timing variance).\n- **Fixed** `width`, `height`, `margin`, `viewBox`.\n- Use **explicit tick counts** only when needed; otherwise rely on D3 defaults but keep domains fixed.\n- Avoid layout algorithms with non-deterministic iteration unless you control seeds\u002Fiterations (e.g., force simulation). If a force layout is required:\n  - fix the tick count,\n  - fix initial positions deterministically (e.g., sorted nodes placed on a grid),\n  - run exactly N ticks and stop.\n\n### Offline + dependency determinism\n- Do **not** load D3 from a CDN.\n- Pin D3 to a specific version (default: **d3@7.9.0**).\n- Prefer vendoring a minified D3 bundle (e.g., `vendor\u002Fd3.v7.9.0.min.js`) or bundling with a lockfile.\n\n### File determinism\n- Stable SVG output:\n  - Avoid auto-generated IDs that may change.\n  - If you must use IDs (clipPath, gradients), derive them from stable strings (e.g., `\"clip-plot\"`).\n- Use LF line endings.\n- Keep numeric precision consistent (e.g., round to 2–4 decimals if needed).\n\n---\n\n## Recommended project layout\n\nIf the task doesn't specify an existing structure, use:\n\n```\ndist\u002F\n  chart.html        # standalone HTML with inline or linked JS\u002FCSS\n  chart.svg         # exported SVG (optional but nice)\n  chart.png         # rasterized (optional)\nvendor\u002F\n  d3.v7.9.0.min.js  # pinned D3 library\n```\n\n---\n\n## Interactive features (tooltips, click handlers, hover effects)\n\nWhen the task requires interactivity (e.g., tooltips on hover, click to highlight):\n\n### Tooltip pattern (recommended)\n\n1. **Create a tooltip element** in HTML:\n```html\n\u003Cdiv id=\"tooltip\" class=\"tooltip\">\u003C\u002Fdiv>\n```\n\n2. **Style with CSS** using `.visible` class for show\u002Fhide:\n```css\n.tooltip {\n    position: absolute;\n    padding: 10px;\n    background: rgba(0, 0, 0, 0.8);\n    color: white;\n    border-radius: 4px;\n    pointer-events: none;  \u002F* Prevent mouse interference *\u002F\n    opacity: 0;\n    transition: opacity 0.2s;\n    z-index: 1000;\n}\n\n.tooltip.visible {\n    opacity: 1;  \u002F* Show when .visible class is added *\u002F\n}\n```\n\n3. **Add event handlers** to SVG elements:\n```javascript\nsvg.selectAll('circle')\n    .on('mouseover', function(event, d) {\n        d3.select('#tooltip')\n            .classed('visible', true)  \u002F\u002F Add .visible class\n            .html(`\u003Cstrong>${d.name}\u003C\u002Fstrong>\u003Cbr\u002F>${d.value}`)\n            .style('left', (event.pageX + 10) + 'px')\n            .style('top', (event.pageY - 10) + 'px');\n    })\n    .on('mouseout', function() {\n        d3.select('#tooltip').classed('visible', false);  \u002F\u002F Remove .visible class\n    });\n```\n\n**Key points:**\n- Use `opacity: 0` by default (not `display: none`) for smooth transitions\n- Use `.classed('visible', true\u002Ffalse)` to toggle visibility\n- `pointer-events: none` prevents tooltip from blocking mouse events\n- Position tooltip relative to mouse with `event.pageX\u002FpageY`\n\n### In-shape label overlay (text drawn on top of marks)\n\nUse this pattern when a mark (circle\u002Frect\u002Fpath) must carry an **in-situ textual identifier**\n(e.g., a ticker symbol inside a bubble, a short code inside a cell). The label layer must\nnot interfere with click\u002Fhover on the mark beneath it.\n\n**Mechanism:**\n\n1. **Append a parallel `\u003Ctext>` selection** bound to the same data array as the marks.\n   Keep the two selections sibling layers in the SVG; draw text **after** marks so it renders on top.\n\n2. **Center the label on the mark** with:\n   - `text-anchor=\"middle\"` (horizontal centering)\n   - `dominant-baseline=\"central\"` (vertical centering)\n\n3. **Keep text position synchronized** with the mark. If a force simulation is used,\n   update both selections inside the same `tick` handler using `d.x` \u002F `d.y`:\n\n```javascript\nconst labels = svg.selectAll('text.bubble-label')\n    .data(data, d => d.ticker)   \u002F\u002F same key as the circles\n    .join('text')\n    .attr('class', 'bubble-label')\n    .attr('text-anchor', 'middle')\n    .attr('dominant-baseline', 'central')\n    .attr('font-size', d => Math.max(8, d.radius * 0.5))  \u002F\u002F scale with radius\n    .text(d => d.radius >= MIN_LABEL_RADIUS ? d.ticker : ''); \u002F\u002F skip when too small\n\nsimulation.on('tick', () => {\n    bubbles.attr('cx', d => d.x).attr('cy', d => d.y);\n    labels.attr('x', d => d.x).attr('y', d => d.y);\n});\n```\n\n4. **Make the overlay pointer-transparent** so clicks\u002Fhovers continue to reach the mark below.\n   Set this either in CSS or as an attribute on the text selection:\n\n```css\n.bubble-label {\n    pointer-events: none;    \u002F* clicks\u002Fhover pass through to the circle underneath *\u002F\n    user-select: none;\n}\n```\n\n5. **Legibility threshold**: when the underlying mark is too small to host readable text,\n   emit an empty string (as shown above) rather than clipping or overflowing. Pick a\n   `MIN_LABEL_RADIUS` consistent with the chosen `font-size` scaling.\n\n**Scope note:** this pattern is for annotation layers that identify the mark they sit on.\nIt is **not** a substitute for axis tick labels, external legends, or tooltip content, and\nshould not be applied to overlays that must themselves receive events (e.g., close buttons).\n\n### Click handlers for selection\u002Fhighlighting\n\n```javascript\n\u002F\u002F Add 'selected' class on click\nsvg.selectAll('.bar')\n    .on('click', function(event, d) {\n        \u002F\u002F Remove previous selection\n        d3.selectAll('.bar').classed('selected', false);\n        \u002F\u002F Add to clicked element\n        d3.select(this).classed('selected', true);\n    });\n```\n\nCSS for highlighting:\n```css\n.bar.selected {\n    stroke: #000;\n    stroke-width: 3px;\n}\n```\n\n#### Cross-view selection (bidirectional chart ↔ table linkage)\n\nWhen two or more views (e.g., a chart of marks and a tabular list of rows) represent the\n**same entities** and must stay in sync — a click in either view must highlight the matching\nentity in both — use a shared **stable key** and a pair of symmetric handlers.\n\n**Mechanism:**\n\n1. **Pick one stable key** that uniquely identifies an entity across views (e.g., `ticker`).\n   Both the mark selection and the row selection must be data-joined with this same key.\n\n2. **Define two symmetric selection functions.** Each one is the single source of truth for\n   its originating view, and each updates **both** views by the shared key:\n\n```javascript\n\u002F\u002F Called when the user clicks a bubble in the chart.\nfunction selectFromChart(key) {\n    \u002F\u002F Clear prior selection on BOTH views\n    d3.selectAll('.bubble').classed('selected', false);\n    d3.selectAll('#data-table tbody tr').classed('selected', false);\n    \u002F\u002F Set selection on BOTH views by shared key\n    d3.selectAll('.bubble').filter(d => d.ticker === key).classed('selected', true);\n    d3.selectAll('#data-table tbody tr').filter(d => d.ticker === key).classed('selected', true);\n}\n\n\u002F\u002F Called when the user clicks a row in the table.\nfunction selectFromTable(key) {\n    \u002F\u002F Same symmetric behavior — the two handlers are intentionally mirror images.\n    d3.selectAll('.bubble').classed('selected', false);\n    d3.selectAll('#data-table tbody tr').classed('selected', false);\n    d3.selectAll('.bubble').filter(d => d.ticker === key).classed('selected', true);\n    d3.selectAll('#data-table tbody tr').filter(d => d.ticker === key).classed('selected', true);\n}\n```\n\n3. **Wire each view's click to its handler:**\n\n```javascript\nbubbles.on('click', (event, d) => selectFromChart(d.ticker));\nrows.on('click',    (event, d) => selectFromTable(d.ticker));\n```\n\n4. **Style `.selected` on both views** so the highlight is visible wherever the entity appears:\n\n```css\ncircle.bubble.selected {\n    stroke: #000;\n    stroke-width: 3px;\n}\ntr.selected {\n    background: #e3f2fd;\n    border-left: 3px solid #2196f3;\n}\n```\n\n5. **If the bundled helpers are used** (`scripts\u002Finteractive_table_example.js` exposes\n   `highlightTableRow(ticker)` and the bubble-chart example exposes `highlightBubble(ticker)`),\n   invoke them **symmetrically** from both click handlers — not just one direction — so that\n   clicking either view updates the other.\n\n**Interaction with the in-shape label overlay:** because selection relies on `click` events\nreaching the mark, any overlay drawn on top of the mark (see “In-shape label overlay”) **must**\nhave `pointer-events: none`. Otherwise the overlay silently intercepts clicks and the\nbidirectional linkage will appear to work from table → chart but not from chart → table.\n\n**Scope note:** this pattern applies to selection of a single shared entity. Do not reuse the\nsame channel to synchronize unrelated state (filters, sorts, hover-only highlights, multi-select)\nunless those are explicitly required — those need their own, separately-named channels.\n\n### Conditional interactivity\n\nSometimes only certain elements should be interactive:\n```javascript\n.on('mouseover', function(event, d) {\n    \u002F\u002F Example: Don't show tooltip for certain categories\n    if (d.category === 'excluded') {\n        return;  \u002F\u002F Exit early, no tooltip\n    }\n    \u002F\u002F Show tooltip for others\n    showTooltip(event, d);\n})\n```\n\n---\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","controlled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill d3-visualization",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill d3-visualization",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill d3-visualization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002FSKILL.md",true,[45,51,55,59],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Fbubble_chart_example.js","SCRIPT","脚本",3679,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002Fscripts\u002Fbubble_chart_example.js",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"scripts\u002Fcheck_tooltip.js",1752,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002Fscripts\u002Fcheck_tooltip.js",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"scripts\u002Finteractive_table_example.js",4439,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002Fscripts\u002Finteractive_table_example.js",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"scripts\u002Ftooltip_handler.js",5741,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-data-to-d3\u002Frun\u002Finputs\u002Fskills\u002Fd3-visualization\u002Fscripts\u002Ftooltip_handler.js",[64,71,78,85,90,95],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"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":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":86,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":91,"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":92,"categories":93,"keywords":94,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":96,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]