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 plugin — 197 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, the plugin that ships this one along with the rest of its 197 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 $0.00026 $0.00489
Sonnet 5 $0.00010 $0.00195
Haiku 4.5 $0.00005 $0.00098

Measured 10d ago against content hash c2f144396312, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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. 10d 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 (9 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 977 once invoked, about $0.0003 per session on Opus 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

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 50 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

menu-transitions-rtl

Animate react-horizontal-scrolling-menu scrolling and build right-to-left menus: noPolyfill defaults to true since v8, so transitionDuration (default 500), a custom-easing-function transitionBehavior, and per-call ScrollOptions { duration, boundary } on scrollToItem/scrollNext/scrollPrev are silently ignored unless…

asmyshlyaev177/react-horizontal-scrolling-menu · 137 tokens