⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
hig-components-content
>-
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
HIG Doctor
Static checks for interface and accessibility issues. Apple-platform source is checked against Apple's Human Interface Guidelines; web and cross-platform source against HIG-aligned accessibility rules.
Run an audit
npx hig-doctor .
Output for scripts/fixtures/readme-audit (checked in CI):
2 moderate concerns · swiftui · 1 file
View.swift:5 · swift/navigation-view-deprecated
View.swift:7 · swift/hardcoded-color
75 concern checks flag probable problems across 14 frameworks. Another 356
detectors only note component usage or good practice, which decides which HIG
references the report includes (431 rules in total). Configuration, inline
suppressions, baselines, SARIF output, and --fail-on let you gate only new findings.
Surfaces
| Surface | Use it for | Start |
|---|---|---|
| Audit CLI | Source scans and CI gates | npx hig-doctor . |
| MCP server | Search, lookup, file audits, and explanations | npx -y hig-mcp |
| Agent skills | Design guidance and source audits | Canonical agent skills |
| Core package | Embed the rule engine | npm install @raintree-technology/hig-doctor-core |
The MCP server runs over stdio or streamable HTTP. See packages/mcp for client setup.
How analysis works
framework detection → regex scan → structural refinement → categorized findings → report or SARIF
A comment- and string-aware regex tier runs first. Swift structural analysis and the TypeScript compiler (when installed) then drop findings the code already handles. Each finding records which engine produced it.
Framework coverage
| Framework | Concern checks | Detectors | Basis |
|---|---|---|---|
SwiftUI (swift) | 13 | 57 | Apple HIG |
| UIKit | 9 | 26 | Apple HIG |
| AppKit | 4 | 21 | Apple HIG |
| watchOS | 0 | 13 | Apple HIG |
| visionOS | 0 | 10 | Apple HIG |
React / Next.js (web) | 24 | 98 | HIG-aligned |
| CSS / SCSS | 10 | 15 | HIG-aligned |
| Vue / Nuxt | 1 | 18 | HIG-aligned |
| Angular | 1 | 16 | HIG-aligned |
| Svelte / SvelteKit | 1 | 13 | HIG-aligned |
| Flutter | 3 | 18 | HIG-aligned |
| Jetpack Compose | 4 | 24 | HIG-aligned |
| Android XML | 4 | 14 | HIG-aligned |
| React Native | 1 | 13 | HIG-aligned |
| Rule ID | Severity | Fix | HIG |
|---|---|---|---|
swift/navigation-view-deprecated | moderate | Migrate to NavigationStack (single column) or NavigationSplitView (sidebar layouts). | hig |
swift/hardcoded-color | moderate | Use semantic colors (.primary, .secondary, or an asset-catalog color) that adapt to dark mode. | color |
swift/hardcoded-rgbcolor | moderate | Move the color into an asset catalog with light/dark variants. | color |
swift/hardcoded-uicolor | moderate | Use a semantic UIColor (label, systemBackground) or an asset-catalog color. | color |
swift/hardcoded-color-ui-color | moderate | color | |
swift/hardcoded-font-size | moderate | typography | |
swift/hardcoded-uifont | moderate | typography | |
swift/on-tap-gesture-without-traits | moderate | Prefer Button, or add .accessibilityAddTraits(.isButton) so VoiceOver announces it. | accessibility |
swift/image-without-a11y | moderate | accessibility | |
swift/is-accessibility-element-false-on-interactive | serious | Keep interactive elements exposed to accessibility; give them a label instead of hiding them. | accessibility |
swift/hardcoded-cgrect | moderate | layout | |
swift/ignores-safe-area | moderate | layout | |
swift/non-private-state | moderate | feedback | |
uikit/hardcoded-uifont-name | moderate | Scale custom fonts with UIFontMetrics, or use preferredFont(forTextStyle:). | typography |
uikit/hardcoded-uicolor-constant | moderate | Use a semantic UIColor (.label, .systemBackground, .tintColor) that adapts to appearance. | color |
uikit/view-with-tag-lookup | moderate | Reference views by outlet or property; tag-based lookup is fragile and breaks with view reordering. | accessibility |
uikit/uiscreen-main-bounds-for-layout | moderate | Lay out against the view's bounds or safeAreaLayoutGuide; UIScreen.main ignores Split View and Slide Over. | layout |
uikit/uialert-view-deprecated | moderate | Use UIAlertController with a .alert style. | modality |
uikit/uiaction-sheet-deprecated | moderate | Use UIAlertController with an .actionSheet style. | modality |
uikit/uiweb-view-deprecated | moderate | Use WKWebView. | layout |
uikit/uisearch-display-controller-deprecated | moderate | Use UISearchController. | searching |
uikit/set-status-bar-style-deprecated | moderate | Override preferredStatusBarStyle on the view controller instead. | layout |
appkit/hardcoded-nscolor-red | moderate | Use a semantic NSColor (.labelColor, .controlAccentColor) or a Color Set asset with light/dark variants. | color |
appkit/hardcoded-nscolor-constant | moderate | Use a semantic NSColor (.labelColor, .windowBackgroundColor) that adapts to appearance and accent color. | color |
appkit/hardcoded-nsfont-size | moderate | Use NSFont.preferredFont(forTextStyle:) so text respects the user's size settings. | typography |
appkit/nsmenu-item-set-submenu-deprecated | moderate | Set the item's submenu property directly. | the-menu-bar |
web/missing-alt | critical | Add descriptive alt text, or alt="" when the image is purely decorative. | accessibility |
web/image-without-alt | critical | Add descriptive alt text, or alt="" when the image is purely decorative. | accessibility |
web/svg-without-a11y | critical | Give inline SVG role="img" plus a or aria-label, or aria-hidden="true" |
// HOW IT'S BUILT
// FILES
10 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
skills/hig-components-content/SKILL.md5.2 KB2f653f1f6241upstream ↗
--- name: hig-components-content version: 1.0.0 description: >- Apple Human Interface Guidelines for content display components. Use this skill when the user asks about "charts component", "collection view", "image view", "web view", "color well", "image well", "activity view", "lockup", "data visualization", "content display", displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says "how should I display charts", "what's the best way to show images", "should I use a web view", "how do I build a grid of items", "what component shows media", or "how do I present a share sheet". Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior. --- # Apple HIG: Content Components Check for `.claude/apple-design-context.md` before asking questions. Use existing context and only ask for information not already covered. ## Key Principles 1. **Adapt to different sizes and contexts.** Content components must work across screen sizes, orientations, and multitasking configurations. Use Auto Layout and size classes. 2. **Make content accessible.** Charts need audio graph support. Images need alt text. Collections need proper VoiceOver navigation order. All content components need labels and descriptions. 3. **Maintain visual hierarchy.** Use spacing, sizing, and grouping to establish clear information hierarchy. Primary content should be visually prominent. 4. **Use system components first.** Evaluate UICollectionView, SwiftUI Charts, WKWebView before building custom. System components come with built-in accessibility and platform adaptation. 5. **Respect platform conventions.** A collection on tvOS uses large lockups with parallax. The same collection on iOS uses compact cells with touch targets. On visionOS, content gains depth and hover effects. 6. **Handle empty states.** Show a meaningful empty state with guidance on how to populate it, not a blank screen. 7. **Optimize for performance.** Use lazy loading, cell reuse, pagination, and prefetching for large datasets. ## Reference Index | Reference | Topic | Key content | |---|---|---| | [charts.md](references/charts.md) | Charts | Swift Charts, bar/line/area/point marks, chart accessibility, audio graphs | | [collections.md](references/collections.md) | Collections | Grid/list layouts, compositional layout, selection, reordering, diffable data sources | | [image-views.md](references/image-views.md) | Image Views | Aspect ratio handling, content modes, SF Symbol images, accessibility | | [image-wells.md](references/image-wells.md) | Image Wells | Drag-and-drop image selection, macOS-specific, placeholder content | | [color-wells.md](references/color-wells.md) | Color Wells | Color selection UI, system color picker, custom color spaces | | [web-views.md](references/web-views.md) | Web Views | WKWebView, SFSafariViewController, navigation controls, content restrictions | | [activity-views.md](references/activity-views.md) | Activity Views | Share sheets, activity items, custom activities, action extensions | | [lockups.md](references/lockups.md) | Lockups | Image+text elements, tvOS card layouts, focus effects, shelf layouts | ## Component Selection Guide | Content Need | Recommended Component | Platform Notes | |---|---|---| | Visualizing quantitative data | Charts (Swift Charts) | iOS 16+, macOS 13+, watchOS 9+ | | Browsing a grid or list of items | Collection View | Compositional layout for complex arrangements | | Displaying a single image | Image View | Support aspect ratio fitting; provide accessibility description | | Selecting an image via drag or browse | Image Well | macOS primarily; use image pickers on iOS | | Selecting a color | Color Well | Triggers system color picker; macOS, iOS 14+ | | Showing web content inline | Web View (WKWebView) | Use SFSafariViewController for external browsing | | Sharing content to other apps | Activity View | System share sheet with configurable activity types | | Content card (image + text) | Lockup | Primarily tvOS; adaptable to other platforms | ## Output Format 1. **Component recommendation with rationale**, referencing the relevant HIG reference file. 2. **Configuration guidance** -- key properties and setup. 3. **Accessibility requirements** for the recommended component. 4. **Platform-specific notes** for targeted platforms. ## Questions to Ask 1. What type of content? (Quantitative data, images, web content, browsable collection, share action?) 2. Which platforms? 3. Static or dynamic content? 4. How much content? (Few items vs hundreds/thousands affects component choice and optimization.) ## Related Skills - **hig-foundations** -- Color, typography, accessibility, and image guidelines - **hig-patterns** -- Data visualization, sharing, and loading patterns - **hig-components-layout** -- Structural containers (scroll views, lists, split views) hosting content - **hig-platforms** -- Platform-specific component behavior (lockups on tvOS, web views on macOS) --- *Built by [Raintree Technology](https://raintree.technology) · [More developer tools](https://raintree.technology)*skills/hig-components-content/references/activity-views.md1.9 KB257a766b1c4eupstream ↗
--- title: "Activity views | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/activity-views --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/activity-views. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Activity views ## Best practices **Avoid creating duplicate versions of common actions that are already available in the activity view.** **Consider using a symbol to represent your custom activity.** **Write a succinct, descriptive title for each custom action you provide.** **Make sure activities are appropriate for the current context.** **Use the Share button to display an activity view.** ## Share and action extensions * In iOS and iPadOS, share and action extensions are displayed in the share sheet that appears when people choose an Action button. * In macOS, people access share extensions by clicking a Share button in the toolbar or choosing Share in a context menu. People can access an action extension by holding the pointer over certain types of embedded content — like an image they add to a Mail compose window — clicking a toolbar button, or choosing a quick action in a Finder window. **If necessary, create a custom interface that feels familiar to people.** **Streamline and limit interaction.** **Avoid placing a modal view above your extension.** **If necessary, provide an image that communicates the purpose of your extension.** **Use your main app to denote the progress of a lengthy operation.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/activity-viewsskills/hig-components-content/references/charts.md4.5 KBf1d1d5421118upstream ↗
--- title: "Charts | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/charts --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/charts. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Charts * Learn how upcoming weather conditions might affect their plans. * Analyze stock prices to understand past performance and discover trends. * Review fitness data to monitor their progress and set new goals. ## Marks **Choose a mark type based on the information you want to communicate about the data.** **Consider combining mark types when it adds clarity to your chart.** ## Axes **Use a fixed or dynamic axis range depending on the meaning of your chart.** **Define the value of the lower bound based on mark type and chart usage.** **Prefer familiar sequences of values in the tick and grid-line labels for an axis.** **Tailor the appearance of grid lines and labels to a chart’s use cases.** ## Descriptive content **Write descriptions that help people understand what a chart does before they view it.** **Summarize the main message of your chart to help make it approachable and useful for everyone.** ## Best practices **Establish a consistent visual hierarchy that helps communicate the relative importance of various chart elements.** **In a compact environment, maximize the width of the plot area to give people enough space to comfortably examine a chart.** **Make every chart in your app accessible.** **Let people interact with the data when it makes sense, but don’t require interaction to reveal critical information.** **Make it easy for everyone to interact with a chart.** **Make an interactive chart easy to navigate when using keyboard commands (including full keyboard access) or Switch Control.** **Help people notice important changes in a chart.** **Align a chart with surrounding interface elements.** ## Color **Avoid relying solely on color to differentiate between different pieces of data or communicate essential information in a chart.** **Aid comprehension by adding visual separation between contiguous areas of color.** ## Enhancing the accessibility of a chart **Consider using Audio Graphs to give VoiceOver users more information about your chart.** **Write accessibility labels that support the purpose of your chart.** * **Prioritize clarity and comprehensiveness.** In general, it’s rarely enough to merely report a data value unless you also include context that helps people understand it, like the date or location that’s associated with it. Aim to concisely describe the context for a value without repeating information that people can get in other ways, like an axis name that Audio Graphs or your overview provides. Follow context-setting information with a succinct description of the element’s details. * **Avoid using subjective terms.** Subjective words — like rapidly, gradually, and almost — communicate your interpretation of the data. To help people form their own interpretations, use actual values in your descriptions. * **Maximize clarity in data descriptions by avoiding potentially ambiguous formats and abbreviations.** For example, using “June 6” is clearer than using “6/6”; similarly, spelling out “60 minutes” or “60 meters” is clearer than using the abbreviation “60m.” * **Describe what the chart’s details represent, not what they look like.** Consider a chart that uses red and blue colors to help people visually distinguish two different data series. It’s crucial to create accessibility labels that identify what each series represents, but describing the colors that visually represent them can add unnecessary information and be distracting. * **Be consistent throughout your app when referring to a specific axis.** For example, if you always mention the X axis first, people can spend less time figuring out which axis is relevant in a description. **Hide visible text labels for axes and ticks from assistive technologies.** ## Platform considerations ### watchOS **In general, avoid requiring complex chart interactions in your watchOS app.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/chartsskills/hig-components-content/references/collections.md1.1 KBd0303c9283d9upstream ↗
--- title: "Collections | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/collections --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/collections. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Collections ## Best practices **Use the standard row or grid layout whenever possible.** **Consider using a table instead of a collection for text.** **Make it easy to choose an item.** **Add custom interactions when necessary.** **Consider using animations to provide feedback when people insert, delete, or reorder items.** ## Platform considerations ### iOS, iPadOS **Use caution when making dynamic layout changes.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/collectionsskills/hig-components-content/references/color-wells.md830 B514164677e56upstream ↗
--- title: "Color wells | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/color-wells --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/color-wells. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Color wells ## Best practices **Consider the system-provided color picker for a familiar experience.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/color-wellsskills/hig-components-content/references/image-views.md1.3 KB129a090c442eupstream ↗
--- title: "Image views | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/image-views --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/image-views. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Image views ## Best practices **Use an image view when the primary purpose of the view is simply to display an image.** **If you want to display an icon in your interface, consider using a symbol or interface icon instead of an image view.** ## Content **Take care when overlaying text on images.** **Aim to use a consistent size for all images in an animated sequence.** ## Platform considerations ### macOS **If your app needs an editable image view, use an image well.** **Use an image button instead of an image view to make a clickable image.** ### watchOS **Use SwiftUI to create animations when possible.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/image-viewsskills/hig-components-content/references/image-wells.md916 B190e331edcc4upstream ↗
--- title: "Image wells | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/image-wells --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/image-wells. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Image wells ## Best practices **Revert to a default image when necessary.** **If your image well supports copy and paste, make sure the standard copy and paste menu items are available.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/image-wellsskills/hig-components-content/references/lockups.md883 Befe4768d6f2fupstream ↗
--- title: "Lockups | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/lockups --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/lockups. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Lockups ## Best practices **Allow adequate space between lockups.** **Use consistent lockup sizes within a row or group.** ## Monograms **Prefer images over initials.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/lockupsskills/hig-components-content/references/web-views.md857 Bdccd44cae98bupstream ↗
--- title: "Web views | Apple Developer Documentation" source: https://developer.apple.com/design/human-interface-guidelines/web-views --- <!-- hig-doctor:attribution --> > **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/web-views. > This file is a structured index of that content, snapshot 2025-02-02. > Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only. # Web views ## Best practices **Support forward and back navigation when appropriate.** **Avoid using a web view to build a web browser.** --- <!-- hig-doctor:canonical-footer --> For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/web-viewsREADME.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/raintree-technology-hig-doctor-skills-hig-components-content.md