用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Objective-Arts/lens-dist --skill charts命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | charts |
| description | Graphical integrity |
This skill applies Edward Tufte's principles of graphical excellence to review visualization code. Invoke when creating or reviewing D3, Chart.js, Recharts, or any data visualization implementation.
Which Tufte principle needs attention?
Share your visualization code or describe your chart, and I'll provide targeted guidance.
| Response | Reference File |
|---|---|
| 1, data-ink, chartjunk, gridlines, remove | references/data-ink-ratio.md |
| 2, lie factor, baseline, accuracy, distortion | references/lie-factor.md |
| 3, small multiples, facets, comparison, grid | references/small-multiples.md |
| 4, direct labels, legend, annotation | references/direct-labeling.md |
| 5, review, audit, comprehensive | (use full skill below) |
Maximize the share of ink devoted to data. Every drop of ink should have a reason.
Review for:
Target: Can any element be removed without losing information?
The size of an effect shown in the graphic should match the size of the effect in the data.
Lie Factor = (Size of effect in graphic) / (Size of effect in data)
Review for:
Target: Lie factor should be between 0.95 and 1.05
Eliminate non-data elements that clutter and distract.
Review for:
Target: Does every visual element earn its place?
Maximize information per unit area without sacrificing clarity.
Review for:
Target: Shrink the non-data elements, expand the data
Labels should be close to data, not segregated in legends.
Review for:
Target: Can the reader understand without consulting a legend?
Use consistent, repeated designs for comparison.
Review for:
Target: Same scales, same structure, easy scanning
When reviewing visualization code, evaluate:
// BAD: Heavy gridlines
.style("stroke", "#000")
.style("stroke-width", 2)
// GOOD: Subtle gridlines
.style("stroke", "#e0e0e0")
.style("stroke-width", 0.5)
// BAD: 3D-like effects
.style("filter", "drop-shadow(3px 3px 3px #000)")
// BAD: Redundant legend when direct labels possible
svg.append("g").attr("class", "legend")
// GOOD: Direct labels on data
text.attr("x", d => x(d.x) + 5).text(d => d.label)
When reviewing, provide:
Tufte Score: X/10 - Overall adherence to principles
Critical Issues - Must fix before shipping
Recommendations - Specific code changes with before/after
Data-Ink Analysis - What can be removed
Positive Notes - What's working well
## Tufte Visualization Review
**Score: 6/10**
### Critical Issues
1. Bar chart Y-axis starts at 50, exaggerating differences (Lie Factor ~2.3)
- Fix: Set domain to [0, max] or clearly mark truncation
### High Priority
2. Legend at bottom forces eye movement
- Fix: Add direct labels at line endpoints
3. Gridlines too prominent (#999, 1px)
- Fix: Lighten to #e5e5e5, 0.5px or remove
### Data-Ink Wins
- Good use of direct value labels on bars
- Appropriate chart type for comparison
- Clean typography
### Suggested Code Changes
[specific edits with line numbers]
Remember: The goal is clear thinking made visible. Every element should serve the reader's understanding of the data.