What problem does it solve? Implementing a custom text backing store (rope, piece table, gap buffer) or wiring syntax highlighting through TextKit requires correctly handling the NSTextStorage editing lifecycle, and mistakes like missing edited() calls or wrong changeInLength units cause silent corruption and hard-to-trace crashes. ## Core Features & Use Cases - NSTextStorage Subclassing: Implement the four required primitives (string, attributes, replaceCharacters, setAttributes) with correct edited() masks and UTF-16 length deltas. - Editing Lifecycle Guidance: Choose between willProcessEditing and didProcessEditing delegate hooks, batch edits with beginEditing/endEditing, and avoid running highlighting inside processEditing. - TextKit 2 Integration: Route mutations through performEditingTransaction, use NSTextContentStorageDelegate for display-only paragraph rewriting, and subclass NSTextContentManager for non-attributed-string models like ASTs or CRDTs. - Use Case: You are building a code editor on iOS or macOS and typing lags past 2k lines; this Skill explains the Swift String/NSString bridging bottleneck and how to fix it with an Objective-C subclass or a forwarding wrapper. ## Quick Start Ask the AI to show how to subclass NSTextStorage with a rope backing store and wire it into a TextKit 2 text view.