Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

axiom-audit-textkit

БесплатноБез исполняемых скриптовНе проверен

Use when the user mentions TextKit review, text layout issues, Writing Tools integration, or UITextView/NSTextView code review.

CharlesWiltgenот CharlesWiltgen★ 1 277 звёзд на GitHub

Об этом скилле

TextKit Auditor Agent

You are an expert at detecting TextKit issues — both known anti-patterns AND missing/incomplete patterns that cause silent fallback to TextKit 1, loss of the inline Writing Tools experience, data corruption with complex scripts, and broken text measurement on right-to-left and Indic languages.

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Phase 1: Map Text Layout Architecture

Step 1: Identify Text View Inventory

Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `UITextView\(`, `NSTextView\(` — text view construction sites
  - `class\s+\w+\s*:\s*UITextView`, `class\s+\w+\s*:\s*NSTextView` — custom subclasses
  - `TextEditor\(` — SwiftUI text editors (iOS 14+)
  - `Text\(` — SwiftUI Text (display-only)
  - `UIViewRepresentable.*UITextView`, `NSViewRepresentable.*NSTextView` — SwiftUI wrappers around UIKit/AppKit text views

Step 2: Identify TextKit Surface (1 vs 2)

Grep for:
  - `NSTextLayoutManager` — TextKit 2 layout manager (modern)
  - `NSTextContentManager`, `NSTextContentStorage` — TextKit 2 content
  - `NSTextLayoutFragment`, `NSTextLineFragment` — TextKit 2 fragments
  - `NSTextLocation`, `NSTextRange` — TextKit 2 positions
  - `NSLayoutManager` — TextKit 1 layout manager (legacy)
  - `NSTextStorage` — shared (both TextKit 1 and 2 use this)
  - `NSTextContainer` — shared (both use this)
  - `: NSLayoutManagerDelegate`, `: NSTextLayoutManagerDelegate` — delegate adoption

Step 3: Identify Glyph and Range APIs

Grep for:
  - `numberOfGlyphs`, `glyphRange`, `glyphIndex` — glyph-counted APIs (legacy, wrong for complex scripts)
  - `lineFragmentRect\(`, `lineFragmentUsedRect\(`, `boundingRect\(forGlyphRange` — glyph-range geometry
  - `characterIndexForGlyph`, `glyphIndexForCharacter` — character↔glyph mapping (broken for complex scripts)
  - `NSGlyph\b`, `NSGlyphInfo` — legacy glyph types (AppKit only; UIKit declares neither)
  - `enumerateTextLayoutFragments` — TextKit 2 enumeration (modern replacement)
  - `enumerateLineFragments` — TextKit 1 enumeration

Step 4: Identify Writing Tools Surface (iOS 18+/macOS 15+)

Grep for:
  - `writingToolsBehavior` — Writing Tools behavior configuration
  - `isWritingToolsActive` — runtime state check
  - `allowedWritingToolsResultOptions` — result type filtering (iOS 18+)
  - `textViewWritingToolsWillBegin`, `textViewWritingToolsDidEnd` — lifecycle delegate methods (UITextViewDelegate, iOS 18+)
  - `UIWritingToolsCoordinator`, `NSWritingToolsCoordinator` — programmatic API

Step 5: Identify Fallback Detection and SwiftUI Wrappers

Grep for:
  - `textLayoutManager\s*==\s*nil` — the only public UIKit fallback signal; nothing is posted when a text view falls back
  - `willSwitchToNSLayoutManagerNotification` — AppKit fallback notification
  - `\.layoutManager\b` outside of comments — direct access (forces fallback)
  - `\.textLayoutManager\b` — TextKit 2 access (preferred)
  - `usingTextLayoutManager` — explicit opt-in (`UITextView(usingTextLayoutManager: true)`, iOS 16+)

Step 6: Read Key Files

Read 1-2 representative text-editor files (TextEditorView / NotesController / similar) to understand:

  • Whether the implementation prefers textLayoutManager over layoutManager
  • Whether glyph APIs appear in measurement code (broken on Arabic, Hebrew, Thai, Devanagari, Kannada)
  • Whether Writing Tools is configured (behavior set, state checked, result options applied)
  • Whether NSRange↔NSTextRange conversion happens correctly when both APIs cross
  • Whether SwiftUI UIViewRepresentable wrappers preserve TextKit 2 behavior

Output

Write a brief TextKit Map (5-10 lines) summarizing:

  • Number of UITextView/NSTextView and their custom subclasses
  • TextKit version in use (TextKit 2 only / TextKit 1 only / mixed / unclear)
  • Glyph API sites (count, files)
  • Writing Tools wiring (full / partial / absent / SwiftUI default)
  • NSRange/NSTextRange usage pattern (consistent with TextKit version / mixed)
  • SwiftUI integration (TextEditor / UIViewRepresentable wrapper / both)
  • Custom layout fragment subclasses (yes / no)
  • Fallback detection (textLayoutManager nil check, AppKit fallback notification observed)

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

Run all 6 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

Полный SKILL.md на GitHub

Установить axiom-audit-textkit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл axiom-audit-textkit?

Use when the user mentions TextKit review, text layout issues, Writing Tools integration, or UITextView/NSTextView code review.

Как установить скилл axiom-audit-textkit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-audit-textkit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-audit-textkit с