thierryc/pretty-good-type-scale/apple

Claude Code and agent skill by thierryc/pretty-good-type-scale

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Apply Pretty Good Type Scale (PGTS) in iOS, iPadOS, and macOS Swift or SwiftUI projects using the generated PGTS.swift export. Use when a coding agent needs to map PGTS roles to Apple text styles, Dynamic Type, custom fonts, or native app typography.

Install

npx vskill@latest install thierryc/pretty-good-type-scale/apple

SKILL.md

PGTS Apple

Use this skill when the target is an Apple platform project. Use platforms/apple/PGTS.swift as the generated starter export, tokens/pgts.tokens.json as the canonical PGTS source, and tokens/apple-dynamic-type.json as the Apple Dynamic Type adapter source.

Canonical roles: editorial-mega-display, display-large, display, headline-large, headline, title-large, title, body, footnote, caption, legal.

Lean roles for product UI: display, headline-large, title-large, title, body, footnote.

Integration

Copy or import the generated Swift file into the host app module. Add a package or module declaration only if the host project requires it.

Use PGTSRole for semantic identity, PGTSContext for mobile, desktop, or print contexts, and PGTS.style(_:) for the numeric values:

swift
let style = PGTS.style(.display)
let font = style.font(for: .mobile, design: .serif)

Dynamic Type

Use role.dynamicTypeTextStyle as the semantic scaling hint. The generated file provides point-size anchors, Apple text-style mappings, Dynamic Type size names, and preview helpers, but the host app should still rely on Apple runtime scaling for final rendering.

For SwiftUI custom fonts, use Font.custom(name, size: style.pointSize(for: platform), relativeTo: role.dynamicTypeTextStyle) or style.customFont(name:platform:).

For UIKit custom fonts, use UIFontMetrics(forTextStyle: role.uiKitTextStyle).scaledFont(for:) and set adjustsFontForContentSizeCategory = true on the text control.

Use style.scaledPointSize(for:dynamicTypeSize:) and style.scaledLineHeight(for:dynamicTypeSize:) for previews, web visualization, and design-token inspection. Do not replace Apple runtime scaling with these preview values in production app text controls.

For tvOS, treat generated values as projected until exact tvOS 27 SDK probe data replaces the projection source. Standard SwiftUI and UIKit text controls should still use the platform Dynamic Type APIs.

Font Ownership

PGTS does not bundle fonts. Apply the host app's custom font separately and test the selected typeface for x-height, ascenders, descenders, optical size, and line-height behavior.

Verification

  • Confirm all lean roles exist in the host typography layer.
  • Check Dynamic Type or text-size accessibility settings.
  • Test xSmall, large, xxxLarge, accessibility1, and accessibility5.
  • Check tvOS Large Text states when targeting tvOS 27 or later.
  • Verify display roles do not clip on compact widths.
  • Verify footnote, caption, and legal remain readable.
  • Use examples/apple-dynamic-type.html for web-first inspection of the Apple Dynamic Type scale.
  • Run npm run build after token changes and npm run validate before returning work.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thierryc/pretty-good-type-scale/apple/badge)](https://verified-skill.com/skills/thierryc/pretty-good-type-scale/apple)

Something wrong with this skill or its page? Tell us.