Skip to content

sitapix/apple-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apple Text

Claude Code Agent Skills License: MIT

Agent Skills for Apple's text stack: TextKit 1 and 2, UITextView, NSTextView, AttributedString, Core Text, Writing Tools, and the iOS 26 SwiftUI TextEditor.

Install

# Any agent (Vercel skills CLI)
npx skills add sitapix/apple-text

# Claude Code
/plugin marketplace add sitapix/apple-text
/plugin install apple-text@apple-text

For Claude Code installs, prefix slash commands with apple-text: (e.g., /apple-text:txt-audit).

Skills

Diagnostics

Skill Covers
txt-audit Severity-ranked code review
txt-textkit-debug Symptom-driven diagnosis
txt-fallback-triggers TextKit 2→1 fallback catalog
txt-snippets Quick recipes

Picking an API

Skill Covers
txt-view-picker Which text view to use
txt-textkit-choice TextKit 1 vs 2
txt-attributed-string AttributedString vs NSAttributedString
txt-appkit-vs-uikit NSTextView vs UITextView
txt-swiftui-texteditor iOS 26 SwiftUI TextEditor

TextKit & layout

Skill Covers
txt-textkit1 TextKit 1 reference
txt-textkit2 TextKit 2 reference
txt-nstextstorage NSTextStorage subclassing
txt-viewport-rendering Viewport, fragments, rendering attributes
txt-layout-invalidation The invalidation model
txt-exclusion-paths Wrapping around shapes, multi-column
txt-line-breaking Hyphenation, truncation, paragraph spacing
txt-measurement boundingRect, sizeThatFits
txt-core-text Glyph-level access

Attributes & content

Skill Covers
txt-attribute-keys NSAttributedString.Key catalog
txt-attachments Inline images, Genmoji
txt-markdown Markdown in SwiftUI Text and AttributedString
txt-colors Text colors, dark mode, HDR
txt-detectors-tagger NSDataDetector, NLTagger, NLTokenizer

Editing & input

Skill Covers
txt-uitextinput UITextInput / NSTextInputClient
txt-selection-menus Selection UI, edit menus, gestures
txt-find-replace UIFindInteraction, NSTextFinder
txt-spell-autocorrect UITextChecker, NSSpellChecker
txt-undo NSUndoManager grouping
txt-pasteboard Copy/cut/paste, format stripping
txt-drag-drop UITextDraggable, UITextDroppable
txt-bidi RTL, bidirectional text
txt-regex Swift Regex vs NSRegularExpression

SwiftUI bridging

Skill Covers
txt-swiftui-interop What crosses the SwiftUI/TextKit boundary
txt-wrap-textview UIViewRepresentable around UITextView/NSTextView

Modern & maintenance

Skill Covers
txt-writing-tools UIWritingToolsCoordinator, behavior, ignored ranges
txt-dynamic-type UIFontMetrics, adjustsFontForContentSizeCategory
txt-accessibility VoiceOver, accessibilityTextualContext
txt-apple-docs Sosumi + xcrun mcpbridge
txt-refresh-against-sosumi Refresh latest-apis.md after Xcode releases

Example prompts

Phrasings that route to the right skill, including ones that don't name the API.

Diagnose a bug

Prompt Triggers
"Writing Tools stopped showing the inline rewrite animation — only the floating panel opens now. Started after we added a custom NSTextStorage." txt-fallback-triggers
"Lines in our editor sometimes render half-drawn — descenders chopped, characters bleeding into the next paragraph." txt-textkit-debug
"Cursor jumps to the end every time my SwiftUI binding pushes new text into the wrapped UITextView." txt-wrap-textview
"Cmd-Z undoes one character at a time after a paste — should be one step." txt-undo
"Diacritics get clipped at the top of my custom NSTextLayoutFragment." txt-viewport-rendering
"boundingRect returns a single-line size for multi-line text." txt-measurement
"Cursor jumps unpredictably when I type Arabic mixed with English." txt-bidi
"VoiceOver skips punctuation in our code editor." txt-accessibility

Pick an API

Prompt Triggers
"Starting a new code editor — TextKit 1 or TextKit 2?" txt-textkit-choice
"AttributedString or NSAttributedString for a notes-app model?" txt-attributed-string
"Multi-line search box in SwiftUI — TextField or TextEditor?" txt-view-picker
"Porting our Mac editor to iPad — what AppKit features have no UIKit equivalent?" txt-appkit-vs-uikit

Build a feature

Prompt Triggers
"How do I add a placeholder to UITextView?" txt-snippets
"Wrap article text around an inline circular thumbnail." txt-exclusion-paths
"Add cmd-F find UI to my UITextView with replace-all." txt-find-replace
"Drop an image into my editor as an inline attachment." txt-drag-drop
"Rewrite is mangling code blocks in our doc editor — protect them from Writing Tools." txt-writing-tools
"Bind AttributedString to TextEditor on iOS 26 with a formatting toolbar." txt-swiftui-texteditor
"Building a canvas-based code editor and the keyboard / autocorrect / magnifier are wrong." txt-uitextinput

Audit and maintenance

Prompt Triggers
"Review our text-editor module before we ship — flag fallback risks and deprecated APIs." txt-audit
"Refresh the skills against current Apple docs now that Xcode 26.4 is out." txt-refresh-against-sosumi
"Look up the current AttributedString(markdown:) initializer signature." txt-apple-docs

Contributing

AGENTS.md covers authoring rules, anti-patterns, and the freshness contract. references/topic-boundaries.md explains sibling splits. Skill content links to sosumi.ai instead of developer.apple.com (the latter renders with JavaScript and returns a stub to non-browser fetches).

Packages

 
 
 

Contributors