Agent skill

attributed-string

AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text, text editing, or AttributedString APIs.

rshankras589★ · 1 repos on radarProfile →
claude-coderead-onlyMIT
Install
npx skills add rshankras/claude-code-apple-skills --skill attributed-string --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Allowed tools: ReadGlobGrep
Path: skills/foundation/attributed-string/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 589
Language: Swift

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# AttributedString Patterns Correct API shapes and patterns for Foundation's `AttributedString`. Covers creating styled text, applying attributes to ranges, text alignment, writing direction, line height control, text selection and editing, discontiguous substrings, and SwiftUI integration. ## When This Skill Activates Use this skill when the user: - Asks about **AttributedString** creation or manipulation - Wants to **style text** with fonts, colors, underlines, or other attributes - Mentions **text alignment**, **writing direction**, or **line height** - Asks about **text selection** or **text editing** with AttributedString - Wants to work with **DiscontiguousAttributedSubstring** or **RangeSet** - Mentions **TextEditor** with **AttributedString** in SwiftUI - Asks about **rich text** formatting in Swift - Wants to **replace** or **modify** text within an AttributedString - Mentions **paragraphStyle**, **textSelectionAffinity**, or **AttributedTextSelection** ## Decision Tree ``` What do you need with AttributedString? | +-- Create or style text | | | +-- Simple inline attributes (font, color) | | --> Creating and Styling section | | | +-- Paragraph-level formatting (alignment,

What's inside
Steps it walks through
  1. When This Skill Activates
  2. Decision Tree
  3. API Availability
  4. Top 5 Mistakes
  5. Creating and Styling
  6. Basic Initialization
  7. Applying Attributes to Ranges
  8. Creating from a Substring
  9. Text Alignment and Formatting
  10. Legacy Approach (iOS 15+)
  11. Modern Approach (iOS 26+)
  12. Writing Direction and Line Height
  13. Writing Direction (iOS 26+)
  14. Line Height (iOS 26+)
More from claude-code-apple-skills
All skills →
About this skill
What does the attributed-string skill do?

AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text, text editing, or AttributedString APIs.

How do I install it?

Run `npx skills add rshankras/claude-code-apple-skills --skill attributed-string --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From rshankras/claude-code-apple-skills, a repository with 589 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going