swift-charts — Claude Code skill: Swift Charts visuals
A skill that steers your coding agent through Swift Charts work on iOS 26+. Useful for bars, lines, donuts, heat maps and 3D surfaces.
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a claude-codeWhat swift-charts does
The skill covers Swift Charts end to end: composing marks inside Chart or Chart3D, configuring axes and scales with view modifiers, adding selection, scrolling, annotations and a legend. Separate sections handle vectorized plots (BarPlot, LinePlot, AreaPlot, PointPlot) and 3D ones (Chart3D, SurfacePlot).
It walks through a workflow: define data as an Identifiable struct, pick mark types, encode visual channels with .foregroundStyle(by:), .symbol(by:) and .lineStyle(by:), then set scale domains. There is also a review checklist and a list of common mistakes. Past 1000 2D points, the skill points you at vectorized plots.
Targets start at iOS 26+, so some examples (SectorMark, Chart3D) will not compile on older deployment targets. One trap worth knowing: SectorMark expects strictly positive values, so zeros and negatives have to be filtered or explained outside the pie. Longer recipes live in references/charts-patterns.md.
What it helps with
- build a monthly revenue bar chart
- add tap selection and an annotation to a chart point
- render a donut with a custom inner radius
- draw a Gantt chart from interval bars
- plot a 3D surface from spatial data
Example prompts for the agent
- build a monthly revenue chart with Swift Charts
- add segment selection to this donut and annotate the picked slice
- rewrite this chart as a vectorized LinePlot, there are over a thousand points
How to install swift-charts
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a claude-code2Manually: put the files in place
~/.claude/skills/swift-charts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift-charts/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a codex2Manually: put the files in place
.agents/skills/swift-charts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a cursor2Manually: put the files in place
.cursor/skills/swift-charts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills swift-charts2Manually: put the files in place
.github/skills/swift-charts/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swift-chartsManually: put the files in place
.devin/skills/swift-charts/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift-charts
How do I install swift-charts in Claude?
Run npx skills add dpearson2699/swift-ios-skills --skill swift-charts -a claude-code. The skill lands at ~/.claude/skills/swift-charts/SKILL.md.
What does swift-charts do?
It guides the agent through writing and reviewing Swift Charts code: marks, axes, scales, legends, selection, scrolling, annotations, vectorized and 3D plots.
Which iOS versions does the skill target?
The main target is iOS 26+. Some pieces map to earlier releases: SectorMark from iOS 17, vectorized plots from iOS 18, Chart3D from iOS 26.