swiftui-text-editing

swiftui-text-editing is a skill for Claude Code from ariadoss/superskills. It costs 52 tokens per session (977 once invoked), scanned A, original, MIT.

A guide to displaying styled text and building rich-text editors in SwiftUI. Rich text means text that can contain formatting such as bold, italic, color, links, or Markdown.

In plain words
What is it for?
Use it to render Markdown, show styled text, build a formatting toolbar, edit rich text, work with AttributedString, or apply formatting to selected text.
Why use it?
It helps select an appropriate text model and API for read-only text or editable content. It also clarifies which formatting features are available on different iOS versions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the superskills-design plugin — 40 skills shipped together

Good fit Use it to render Markdown, show styled text, build a formatting toolbar, edit rich text, work with AttributedString, or apply formatting to selected text.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ariadoss/superskills/swiftui-text-editing
Install

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.

Any agent
npx skills add ariadoss/superskills --skill swiftui-text-editing
Clone the repo
git clone --depth 1 https://github.com/ariadoss/superskills

Made for: Claude Code.

Or install superskills-design, the plugin that ships this one along with the rest of its 40 skills.

Wrote 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.

agentmods badge for swiftui-text-editing

README.md
[![agentmods](https://agentmods.dev/badge/skills/ariadoss/superskills/swiftui-text-editing/github.svg)](https://agentmods.dev/skills/ariadoss/superskills/swiftui-text-editing)
Your own site
<a href="https://agentmods.dev/skills/ariadoss/superskills/swiftui-text-editing"><img src="https://agentmods.dev/badge/skills/ariadoss/superskills/swiftui-text-editing/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.

agentmods 80×15 button for swiftui-text-editing

Your own site · 80×15
<a href="https://agentmods.dev/skills/ariadoss/superskills/swiftui-text-editing"><img src="https://agentmods.dev/badge/skills/ariadoss/superskills/swiftui-text-editing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 977 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00977
Opus 5.5 $0.00021 $0.00391
Sonnet 5.5 $0.00010 $0.00195
Haiku 4.5 $0.00005 $0.00098

Measured 1mo ago against content hash c2f144396312, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swiftui-text-editing 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.

design-skills/swiftui-text-editing/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Styled Text Editing in SwiftUI

Patterns for displaying styled text and building rich text editors in SwiftUI.

When This Skill Activates

Use this skill when the user needs to:

  • Display styled text (bold, italic, colored, linked)
  • Build rich text editors with formatting toolbars
  • Work with AttributedString
  • Implement TextEditor with selection-based formatting
  • Render Markdown in SwiftUI
  • Create custom text formatting definitions

Decision Tree

What text task do you need?
|
+-- Display styled text (read-only)
|   +-- Simple modifiers -> Text("Hello").bold().foregroundStyle(.blue)
|   +-- Mixed styles -> AttributedString
|   +-- Markdown -> Text(try! AttributedString(markdown: "**Bold**"))
|
+-- Editable text
    +-- Plain text -> TextEditor(text: $text)
    +-- Rich/styled text -> TextEditor with AttributedString binding (iOS 18+)
    +-- With formatting toolbar -> iOS 18+ AttributedTextFormattingDefinition

API Availability

API Minimum iOS Notes
Text modifiers (.bold(), .italic()) iOS 13 Read-only
AttributedString iOS 15 Rich text model
Markdown in Text iOS 15 Inline Markdown only
TextEditor(text:) iOS 14 Plain text editing
TextEditor with AttributedString iOS 18 Rich text editing
AttributedTextFormattingDefinition iOS 18 Custom formatting constraints
Text selection reading iOS 18 textEditorSelection

Text Styling Quick Reference

// Simple modifiers
Text("Hello world")
    .font(.headline)
    .bold()
    .foregroundStyle(.blue)
    .italic()

// AttributedString for mixed styles
var attributed = AttributedString("Hello world")
attributed[attributed.range(of: "Hello")!].font = .boldSystemFont(ofSize: 16)
attributed[attributed.range(of: "world")!].foregroundColor = .blue
Text(attributed)

Rich Text Editor (iOS 18+)

struct RichTextEditor: View {
    @State private var text = AttributedString("Start typing...")
    @State private var isBold = false

    var body: some View {
        VStack {
            HStack {
                Button("B") { isBold.toggle() }
                    .bold(isBold)
            }
            TextEditor(text: $text)
        }
    }
}

Read the full file on GitHub · 119 lines

Changes

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.

  1. 1mo ago First seen · 119 lines · 52 tokens per session scan A c2f144396312

Subscribe to this mod's changes

swiftui-text-editing is a skill published in the GitHub repository ariadoss/superskills (12 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 977 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens