agentleFS
inttegrointtegro/labor/skills/apple-charts/SKILL.md

apple-charts

Skill1 starsChanged 4 days agoMITView on GitHub

Apple-native chart design and implementation guidance for iOS, iPadOS, macOS, watchOS, and visionOS. Use when Codex is designing, reviewing, or implementing charts, spending graphs, analytics summaries, KPI trends, category breakdowns, time-series visualizations, chart accessibility, Swift Charts code, or Apple HIG-compliant data visualization.

The file

Show its rules and text

We split this skill into the rules it gives an agent

40 rules. About 0 are common, 30 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈30

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to turn data into an Apple-quality chart experience.

    line 8
  2. Distinctive:

    If a single number, list, or table answers the question better, do not force a chart.

    line 22
  3. Distinctive:

    Use stable ids and semantic labels.

    line 27
  4. Distinctive:

    Never show future buckets as real values.

    line 30
  5. Distinctive:

    Put controls near what they affect.

    line 43
  6. Distinctive:

    Keep labels sentence case.

    line 44
  7. Distinctive:

    Use as few axes and grid lines as the reading task allows, but do not hide axes when precise reading matters.

    line 45
  8. Distinctive:

    Use annotations sparingly for one selected value, a threshold, or a meaningful anomaly.

    line 46
  9. Distinctive:

    Keep chart surfaces calm: no nested bordered controls, heavy outlines, or decorative chart noise.

    line 47
  10. Distinctive:

    Use color to encode meaning.

    line 49
  11. Distinctive:

    Do not rely on color alone.

    line 51
  12. Distinctive:

    Test light mode, dark mode, increased contrast, and Differentiate Without Color.

    line 53
  13. Distinctive:

    Test with realistic data early.

    line 61
  14. Very specific:

    Use PointMark for individual observations, outliers, and clusters.

    line 62
  15. Very specific:

    Use LineMark for trajectory and rate of change, but avoid misleading connections across missing or irregularly spaced data.

    line 63
  16. Very specific:

    Use BarMark when zero values, magnitude, cumulative totals, or discrete daily buckets need to remain visually meaningful.

    line 64
  17. Distinctive:

    Use stacked or grouped bars only when the part-to-whole or category comparison is the main question.

    line 65
  18. Very specific:

    Prefer intuitive ticks: currency round numbers, percent steps, hour/day/week/month boundaries.

    line 72
  19. Distinctive:

    Use the surrounding UI to frame the chart: title, summary value, selected range, and what the units mean.

    line 75
  20. Distinctive:

    Prefer a primary takeaway over a generic axis label when space is tight.

    line 76
  21. Distinctive:

    Keep descriptions brief, close to the chart, and part of the actual interface.

    line 77
  22. Distinctive:

    Do not make users infer whether values are money, counts, percentages, or time.

    line 78
  23. Distinctive:

    Add interaction only when it enables useful exploration: selected values, tooltips, range switching, comparisons, or linked detail.

    line 81
  24. Distinctive:

    Keep accessibility labels succinct, context-first, and fully spoken: use "August 12, USD 184.50", not abbreviations or naked numbers.

    line 85
  25. Distinctive:

    Use color to clarify categories, intensity, state, or emphasis.

    line 88
  26. Distinctive:

    Use color as an addition, not the only carrier of meaning.

    line 89
  27. Distinctive:

    Ensure colors contrast with each other and with the chart background.

    line 91
  28. Distinctive:

    Check color blindness filters, Differentiate Without Color, Dark Mode, Light Mode, and Increase Contrast.

    line 92
  29. Very specific:

    Use Charts and declarative marks:

    line 96
  30. Very specific:

    Use .value("Human label", value) with human-readable labels.

    line 142
  31. Very specific:

    Use real types for plottable values: Date, Double, Int, String, enums that conform appropriately.

    line 143
  32. Very specific:

    Prefer foregroundStyle(by:), symbol(by:), and position(by:) for multiple series.

    line 144
  33. Very specific:

    Use ChartProxy only when interaction earns its keep: selection, scrubbing, callouts, or linked detail.

    line 147
  34. Very specific:

    Do not hand-roll chart drawing in Canvas, SVG, or custom paths when Swift Charts can produce the result accessibly.

    line 148
  35. Distinctive:

    Ensure VoiceOver reads the value and context, not just the number.

    line 156
  36. Distinctive:

    Treat spending as positive unless the user is looking at refunds, reversals, or failed payments.

    line 165
  37. Distinctive:

    Use the product's positive semantic style for refunds or credits and its subdued destructive style for failures.

    line 166
  38. Distinctive:

    Do not mix light and dark modes in a single mockup or screen.

    line 168
  39. Distinctive:

    Keep the first viewport useful: summary, period control, chart, and top categories should fit before secondary feed content.

    line 169
  40. Distinctive:

    Before finishing chart work:

    line 173

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Apple Charts

Use this skill to turn data into an Apple-quality chart experience. Prefer Apple's Swift Charts framework for native Apple apps unless the requested chart cannot reasonably be expressed with Swift Charts.

Source baseline:

  • Apple HIG, Charts: organize data to communicate information clearly and with visual appeal.
  • WWDC 2022, "Design app experiences with charts": design the app experience before choosing chart mechanics.
  • WWDC 2022, "Design an effective chart" (https://developer.apple.com/videos/play/wwdc2022/110340/): choose marks, axes, descriptions, interaction, and color around the chart's purpose.
  • WWDC 2022, "Hello Swift Charts": implement with declarative marks and mark properties in SwiftUI.

Source baseline reviewed against official Apple Developer material on 2026-11-09.

Workflow

  1. Define the user question.
    • State the decision or understanding the chart supports.
    • If a single number, list, or table answers the question better, do not force a chart.
    • Decide the primary reading task: trend, comparison, composition, distribution, target progress, anomaly, or forecast.
  2. Prepare the data shape before drawing.
    • Sort the data in natural reading order.
    • Use stable ids and semantic labels.
    • Bin time periods intentionally: hourly for today, daily for 7d/1m, weekly for 3m, monthly for 1y.
    • Handle empty, loading, partial, stale, and outlier states.
    • Never show future buckets as real values.
  3. Choose a familiar chart form first.
    • Trend over time: LineMark, optionally with AreaMark only to imply volume or intensity.
    • Discrete comparison: BarMark; prefer horizontal bars when labels are long.
    • Category breakdown: ranked bars or compact progress rows before pie/donut charts.
    • Part-to-whole over the same total: stacked bars when segment comparison still matters.
    • Threshold, target, or average: RuleMark.
    • Specific observed points: PointMark, usually paired with a line or selection state.
    • Novel forms must be central to the app and introduced clearly. Do not use them as incidental decoration.
  4. Compose the section, not just the plot.
    • Pair the chart with a plain title, a primary summary value, and the selected range/filter.
    • Put controls near what they affect.
    • Keep labels sentence case.
    • Use as few axes and grid lines as the reading task allows, but do not hide axes when precise reading matters.
    • Use annotations sparingly for one selected value, a threshold, or a meaningful anomaly.
    • Keep chart surfaces calm: no nested bordered controls, heavy outlines, or decorative chart noise.
  5. Use color to encode meaning.
    • Color must clarify, not decorate.
    • Do not rely on color alone. Pair multi-series color with symbols, line styles, direct labels, or legends.
    • Respect semantic color: green for successful/refund/positive states, red for failed/destructive states, muted neutral for secondary data.
    • Test light mode, dark mode, increased contrast, and Differentiate Without Color.

Effective Chart Design

Apply the WWDC 2022 "Design an effective chart" process explicitly. A chart is not effective until it is focused, approachable, and accessible.

  1. Marks
    • Pick marks from the chart goal and the actual data, not from visual preference.
    • Test with realistic data early. Neat sample data can make a weak mark choice look acceptable.
    • Use PointMark for individual observations, outliers, and clusters.
    • Use LineMark for trajectory and rate of change, but avoid misleading connections across missing or irregularly spaced data.
    • Use BarMark when zero values, magnitude, cumulative totals, or discrete daily buckets need to remain visually meaningful.
    • Use stacked or grouped bars only when the part-to-whole or category comparison is the main question.
  2. Axes
    • Decide whether each axis range should be fixed or dynamic from the meaning of the metric.
    • Fix bounded domains such as percentages or battery level.
    • Let unbounded metrics use a dynamic upper bound, but usually keep bar charts anchored at zero so bar heights remain truthful.
    • Tune grid-line and label density to the chart context. Sparse preview charts can hide axes; detail charts need enough reference points for estimation.
    • Prefer intuitive ticks: currency round numbers, percent steps, hour/day/week/month boundaries.
  3. Descriptions
    • Use the surrounding UI to frame the chart: title, summary value, selected range, and what the units mean.
    • Prefer a primary takeaway over a generic axis label when space is tight.
    • Keep descriptions brief, close to the chart, and part of the actual interface.
    • Do not make users infer whether values are money, counts, percentages, or time.
  4. Interaction
    • Add interaction only when it enables useful exploration: selected values, tooltips, range switching, comparisons, or linked detail.
    • Make touch targets larger than visible marks; allow interaction over surrounding plot space.
    • Provide the same interaction path for keyboard, Voice Control, Switch Control, and VoiceOver when applicable.
    • Make focus and selection visibly obvious.
    • Keep accessibility labels succinct, context-first, and fully spoken: use "August 12, USD 184.50", not abbreviations or naked numbers.
  5. Color
    • Use color to clarify categories, intensity, state, or emphasis.
    • Use color as an addition, not the only carrier of meaning.
    • Balance saturation and luminosity so colors in the same semantic tier have equal visual weight.
    • Ensure colors contrast with each other and with the chart background.
    • Check color blindness filters, Differentiate Without Color, Dark Mode, Light Mode, and Increase Contrast.

Swift Charts Rules

Use Charts and declarative marks:

import Charts
import SwiftUI

struct SpendPoint: Identifiable {
	let id: String
	let date: Date
	let amount: Double
}

struct SpendChart: View {
	let points: [SpendPoint]

	var body: some View {
		Chart(points) { point in
			AreaMark(
				x: .value("Date", point.date),
				y: .value("Amount", point.amount)
			)
			.interpolationMethod(.catmullRom)
			.foregroundStyle(
				LinearGradient(
					colors: [Color.accentColor.opacity(0.28), Color.accentColor.opacity(0.02)],
					startPoint: .top,
					endPoint: .bottom
				)
			)

			LineMark(
				x: .value("Date", point.date),
				y: .value("Amount", point.amount)
			)
			.interpolationMethod(.catmullRom)
			.foregroundStyle(Color.accentColor)
			.lineStyle(StrokeStyle(lineWidth: 2.5, lineCap: .round, lineJoin: .round))
		}
		.chartXAxis(.hidden)
		.chartYAxis(.hidden)
		.accessibilityLabel("Spending over time")
	}
}

Implementation guidance:

  • Use .value("Human label", value) with human-readable labels; these labels support accessibility.
  • Use real types for plottable values: Date, Double, Int, String, enums that conform appropriately.
  • Prefer foregroundStyle(by:), symbol(by:), and position(by:) for multiple series.
  • Let Swift Charts create legends when encodings need explanation; remove legends only when direct labels make the mapping obvious.
  • Set chartYScale(domain:) intentionally when zero, targets, or outliers affect interpretation.
  • Use ChartProxy only when interaction earns its keep: selection, scrubbing, callouts, or linked detail.
  • Do not hand-roll chart drawing in Canvas, SVG, or custom paths when Swift Charts can produce the result accessibly.

Accessibility

Swift Charts provides accessible marks and audio graphs, but do not treat defaults as finished.

  • Give the chart a useful summary label.
  • Make every important mark navigable or summarize dense marks into meaningful ranges.
  • Ensure VoiceOver reads the value and context, not just the number.
  • For multi-series charts, differentiate without color using symbols, labels, or line style.
  • Respect Dynamic Type; if labels become crowded, reduce visible labels or move detail into selection, not tiny text.
  • For watchOS, reduce density: one primary metric, one compact trend, and one tap target for detail.

Financial Data Patterns

For financial surfaces:

  • Format amounts with an explicit currency code and monospaced digits, for example USD 728.50.
  • Treat spending as positive unless the user is looking at refunds, reversals, or failed payments.
  • Use the product's positive semantic style for refunds or credits and its subdued destructive style for failures; never rely on color alone.
  • For category breakdowns, rank by amount and show amount plus share.
  • Do not mix light and dark modes in a single mockup or screen.
  • Keep the first viewport useful: summary, period control, chart, and top categories should fit before secondary feed content.

Review Checklist

Before finishing chart work:

  • The chart answers a clear user question.
  • The chosen chart form matches the reading task.
  • Empty, loading, and outlier states are accounted for.
  • Labels, legends, and axes are sufficient but not noisy.
  • Color is not the only differentiator.
  • VoiceOver and audio graph behavior are considered or customized.
  • Light/dark, Dynamic Type, and small screens do not clip text.
  • Native build passes; for UI work, capture simulator/device screenshots.

Attribution

Apple, Swift, SwiftUI, Swift Charts, and related product names are trademarks of Apple Inc. This independently written skill is not affiliated with or endorsed by Apple.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.