Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rshankras/claude-code-apple-skills --skill attributed-stringgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/attributed-string)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/attributed-string"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/attributed-string/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/attributed-string"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/attributed-string.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 82 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.02547 |
| Opus 5.5 | $0.00015 | $0.01019 |
| Sonnet 5.5 | $0.00007 | $0.00509 |
| Haiku 4.5 | $0.00004 | $0.00255 |
Grade A, and why
attributed-string scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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, line height)
| --> Text Alignment and Formatting section
|
+-- Control text layout
| |
| +-- Writing direction (LTR / RTL)
| | --> Writing Direction and Line Height section
| |
| +-- Line spacing / height
| --> Writing Direction and Line Height section
|
+-- Edit or select text programmatically
| |
| +-- Replace selection with characters or AttributedString
| | --> Text Selection and Editing section
| |
| +-- Work with multiple non-contiguous ranges
| --> DiscontiguousAttributedSubstring section
|
+-- Display in SwiftUI
--> SwiftUI Integration section
API Availability
| API | Minimum Version | Notes |
|---|---|---|
AttributedString |
iOS 15 / macOS 12 | Swift-native replacement for NSAttributedString |
AttributedString.paragraphStyle |
iOS 15 / macOS 12 | Uses NSMutableParagraphStyle |
AttributedString.writingDirection |
iOS 26 / macOS 26 | New in 2025 |
AttributedString.LineHeight |
iOS 26 / macOS 26 | .exact(points:), .multiple(factor:), .loose |
AttributedString.alignment |
iOS 26 / macOS 26 | .left, .center, .right |
AttributedTextSelection |
iOS 26 / macOS 26 | Programmatic text selection |
replaceSelection(_:withCharacters:) |
iOS 26 / macOS 26 | Replace selection with plain characters |
replaceSelection(_:with:) |
iOS 26 / macOS 26 | Replace selection with AttributedString |
DiscontiguousAttributedSubstring |
iOS 26 / macOS 26 | Non-contiguous range selections |
AttributedString.utf8 |
iOS 26 / macOS 26 | UTF-8 code unit view |
TextEditor(text:selection:) with AttributedString |
iOS 26 / macOS 26 | SwiftUI rich text editing |
.textSelectionAffinity(_:) |
iOS 26 / macOS 26 | Control cursor affinity at line boundaries |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 314 lines · 37 tokens per session scan A 82c403a3ae62
attributed-string is a skill published in the GitHub repository rshankras/claude-code-apple-skills (816 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 2,547 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
ios-development
Comprehensive guide for building native Apple platform applications.
macos-native
Native macOS development with AppKit, Catalyst, and macOS-specific APIs. Use when building Mac-native apps, menu bar apps, system extensions, or macOS-specific features.
kotlin-multiplatform
KMP/CMP shared business logic, Compose Multiplatform, expect/actual, Ktor, SQLDelight, and platform-specific implementations. Use when building cross-platform Kotlin applications for Android, iOS, desktop, or web.
agent-kotlin-expert
Specialist subagent: Kotlin Multiplatform, Compose Multiplatform, coroutines, Ktor, and JVM ecosystem specialist. Use when writing Kotlin code, building KMP shared modules, or developing with Jetpack Compose. Trigger phrases: Kotlin, KMP, Compose Multiplatform, coroutines, Ktor, Gradle, JVM, Flow, suspend, sealed…
swift-expert
Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.