🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
HIG audit CLI and MCP tools for agent workflows
HIG Doctor checks source code for Apple HIG and accessibility issues, then points to the exact file, rule, and fix guidance. It uses one shared catalog across the CLI, MCP server, skills, and core package, so the same checks and references show up in different agent workflows.
Builders who want their agent to audit interface code against Apple HIG and accessibility rules.
You can catch reviewable UI issues before release and give your agent bounded, source-backed guidance.
What it does
Source audits with severity
Scans projects and files, then reports concerns with severity, locations, rule IDs, and fix guidance.
Apple HIG and accessibility rule catalog
Uses a shared catalog across SwiftUI, UIKit, AppKit, watchOS, visionOS, and web frameworks.
Baseline and suppression support
Supports gradual adoption with configuration, inline suppressions, baselines, SARIF output, and `--fail-on`.
MCP search and explanation tools
Lets agents search the frozen reference corpus, look up topics, audit files or projects, and explain findings.
Shared core package
Provides an embeddable rule engine in `packages/core` for other tools and agent setups.
HIG skill packs
Includes packaged skills under `skills/*` for foundations, patterns, inputs, platforms, and component guidance.
How to get it
- 1HIG Doctor helps developers and coding agents find interface issues before release. It…
npx hig-doctor .
- 2The CLI detects the project frameworks, reports concerns by severity, and points to a…
2 moderate concerns · swiftui · 1 file View.swift:5 · swift/navigation-view-deprecated View.swift:7 · swift/hardcoded-color
- 3Install the public Codex marketplace first with codex plugin marketplace add…
framework detection → regex scan → structural refinement → categorized findings → report or SARIF
README
HIG Doctor
Active open-source project · MIT tooling with attributed Apple reference content
HIG Doctor helps developers and coding agents find interface issues before release. It checks Apple-platform source against Apple’s Human Interface Guidelines and checks web and cross-platform source against aligned accessibility and interface-quality rules.
Run an audit
npx hig-doctor .
The CLI detects the project frameworks, reports concerns by severity, and points to a
specific fix and source reference. This result is generated from the committed
test/fixtures/readme-audit project and checked in the test suite:
2 moderate concerns · swiftui · 1 file
View.swift:5 · swift/navigation-view-deprecated
View.swift:7 · swift/hardcoded-color
The audit catalog currently contains 431 rules across 14 frameworks. Counts are generated from the rule catalog and checked in CI; they are coverage inventory, not a claim of complete HIG conformance.
Why use HIG Doctor
- Catch reviewable source issues. Findings include severity, location, rule ID, fix guidance, and the reference that supports the concern.
- Gate only new debt. Configuration, inline suppressions, content-based baselines,
SARIF, and
--fail-onsupport gradual adoption. - Give agents bounded guidance. MCP tools search the frozen reference corpus and explain individual findings without presenting generated advice as canonical HIG.
- Use one engine across workflows. The CLI, MCP server, and embeddable core package share the same catalog and analysis tiers.
Choose a surface
| 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 | codex plugin add hig-doctor@raintree |
| Core package | Embed the rule engine | npm install @raintree-technology/hig-doctor-core |
The MCP server works over stdio or streamable HTTP. Its six tools list skills, look up topics, search the corpus, audit projects or files, and explain findings. See the MCP package README for client configuration.
Install the public Codex marketplace first with
codex plugin marketplace add raintree-technology/plugins.
How analysis works
framework detection → regex scan → structural refinement → categorized findings → report or SARIF
- The zero-dependency regex tier is comment- and string-aware.
- Swift structural analysis follows chained modifiers to remove handled findings.
- The TypeScript compiler refines selected JSX accessibility checks when available.
- Every finding records the engine that produced it.
Precision and recall are measured on an annotated fixture corpus in
docs/benchmark.md. CI enforces the published floors.
Framework coverage
Apple-platform rows are checked against the HIG directly. Web and cross-platform rows use universal accessibility and interface-quality principles that align with the HIG.
| Framework | Rules | Basis |
|---|---|---|
SwiftUI (swift) | 70 | Apple HIG |
| UIKit | 35 | Apple HIG |
| AppKit | 25 | Apple HIG |
| watchOS | 13 | Apple HIG |
| visionOS | 10 | Apple HIG |
React / Next.js (web) | 122 | HIG-aligned universal checks |
| CSS / SCSS | 25 | HIG-aligned universal checks |
| Vue / Nuxt | 19 | HIG-aligned universal checks |
| Angular | 17 | HIG-aligned universal checks |
| Svelte / SvelteKit | 14 | HIG-aligned universal checks |
| Flutter | 21 | HIG-aligned universal checks |
| Jetpack Compose | 28 | HIG-aligned universal checks |
| Android XML | 18 | HIG-aligned universal checks |
| React Native | 14 | HIG-aligned universal checks |
The authoritative per-rule inventory is docs/rules.md.
Skills corpus
The frozen 2025-02-02 snapshot contains 14 skills and 156 reference topics. Apple’s live Human Interface Guidelines remain canonical.
| Skill | Description |
|---|---|
hig-foundations | Color, typography, symbols, accessibility, layout, motion, privacy, and branding |
hig-platforms | iOS, iPadOS, macOS, tvOS, watchOS, and visionOS |
hig-patterns | Onboarding, navigation, search, feedback, modality, and settings |
hig-inputs | Touch, Pencil, keyboard, controller, pointer, Crown, and eye input |
hig-technologies | Siri, Apple Pay, HealthKit, ARKit, ML, Sign in with Apple, and SharePlay |
hig-project-context | Shared project context for tailored guidance |
hig-components-content | Charts, collections, images, web views, and lockups |
hig-components-controls | Pickers, toggles, sliders, buttons, and fields |
hig-components-dialogs | Alerts, action sheets, popovers, and sheets |
hig-components-layout | Sidebars, split views, tabs, lists, tables, and windows |
hig-components-menus | Menus, toolbars, buttons, and menu bars |
hig-components-search | Search fields, page controls, and path controls |
hig-components-status | Progress indicators, status bars, and activity rings |
hig-components-system | Widgets, live activities, notifications, complications, and App Clips |
Nightly drift detection compares the snapshot with Apple’s DocC JSON. Content changes remain human-reviewed; a hash change does not automatically rewrite guidance.
Limits and evidence boundary
Automated findings support review. They do not prove accessibility, HIG conformance, or design quality. Regex fallback can produce different precision than structural analysis, and project-specific context can justify a documented suppression.
Apple owns the HIG content. This repository provides organization, cross-referencing, and detection rules. Each reference retains attribution and a canonical source URL.
Documentation
- CLI package — Flags, configuration, baselines, and CI.
- MCP package — Tools, transports, and client setup.
- Core package — Embedding API.
- Rule catalog — Current generated inventory.
- Detection benchmark — Fixture method, results, and limits.
- Brand system and Remotion showcase.
- Project website — Human and agent-readable topics.
Raintree open-source system
HIG Doctor owns interface guidance and source audits. It can be used independently. DocPull acquires evidence, PolicyStrata tests policy behavior, Trellis enforces shared code policy, and Raintree Standards defines governed requirements. See the Raintree open-source portfolio.
Project policies
Contributing · Code of Conduct · Security · Changelog · Source repository · MIT License · Third-party notices
Apple HIG reference text in skills/*/references/ is © Apple Inc. and remains subject
to Apple’s terms.
Files in the repo
- .agents
- .claude-plugin
- .github
- brand
- demos
- docs
- packages
- plugin
- scripts
- skills
- test
- website
- .editorconfig
- .env.example
- .gitattributes
- .gitignore
- .infisical.json
- action.yml
- AGENTS.md
- bun.lock
- CHANGELOG.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- hig-snapshot.json
- LICENSE
- mise.lock
- mise.toml
- package.json
- README.md
- renovate.json
- SECURITY.md
- socket.yml
- THIRD_PARTY_NOTICES.md
- VERSIONS.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.
An open-source AI agent that brings the power of Gemini directly into your terminal.
AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,115+ agentic skills. Includes CLI, local MCP, catalog, plugins, and Workbench.