Skip to main content
skill CX Codex

foundation — Claude Code skill: what it does, how to install

Guides coding assistants on Foundation AttributedString patterns, styling runs, alignment, and SwiftUI text integration.

MIT 202 installs ★ 905 updated 2026-07-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rshankras/claude-code-apple-skills --skill foundation -a claude-code
Open on GitHub

What foundation does

This skill routes styled text tasks directly to attributed-string/SKILL.md. It provides reference patterns for managing text runs, character attributes, text selection, and SwiftUI bindings on Apple platforms.

The skill restricts assistant actions to Read, Glob, and Grep. It inspects project files and reads bundled reference guides without invoking arbitrary commands.

Scope is strictly limited to the Foundation framework layer. If you need a complete UI built on TextEditor, that logic lives outside this skill.

What it helps with

  • Format styled text using Foundation AttributedString runs and attributes
  • Configure rich text alignment and custom text selection rules
  • Display Foundation AttributedString content cleanly inside SwiftUI views

Example prompts for the agent

  • Build a SwiftUI Text view showing an AttributedString with colored keywords.
  • How do I split and inspect runs inside an AttributedString in Swift?
  • Set paragraph alignment and link styling using Foundation AttributedString.

How to install foundation

1Skills CLI (Vercel)

npx skills add rshankras/claude-code-apple-skills --skill foundation -a claude-code

2Manually: put the files in place

~/.claude/skills/foundation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/foundation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about foundation

How do I install foundation in Claude Code?

Run npx skills add rshankras/claude-code-apple-skills --skill foundation -a claude-code. The skill will be available at ~/.claude/skills/foundation/SKILL.md.

What does the foundation skill cover?

It provides patterns for Apple's AttributedString API. The skill explains how to manage attributes, runs, alignment, and SwiftUI integration.

Does this skill handle TextEditor components?

No. Rich text editing interfaces based on TextEditor require separate SwiftUI guides rather than this Foundation-level skill.

Source text

SKILL.md · MIT
---
name: foundation
description: Foundation framework skills — AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text or AttributedString APIs.
allowed-tools: [Read, Glob, Grep]
last_verified: 2026-07-16
review_by: 2027-06-22
---

# Foundation Skills

Foundation framework patterns for Apple platforms.

## When This Skill Activates

Use this skill when the user:
- Works with **AttributedString** (formatting, attributes, runs)
- Needs **rich text** alignment, selection, or styling logic
- Integrates attributed text with **SwiftUI**

## Available Skills

Paths are relative to THIS file's directory — skills run with cwd set to the
user's project, so resolve each path from this SKILL.md's own location.

| Skill | Read | Covers |
|-------|------|--------|
| attributed-string | `attributed-string/SKILL.md` | AttributedString formatting, alignment, selection, SwiftUI integration |

## How to Route

1. Read `attributed-string/SKILL.md` (relative to this file) plus any reference files it lists.
2. Apply the guidance to the user's code. For TextEditor-based rich text editing UI, see also `../swiftui/text-editing/SKILL.md`.

© rshankras · MIT · rshankras/claude-code-apple-skills

Similar skills

All skills for Mobile →

From the same set23

The whole set →
monetization monetization is a Claude Code skill for choosing pricing models and setting up app monetization for iOS and macOS. It activates when planning revenue or checking whether an app is ready to charge. CX Codex +1 484installs growth A skill for indie Apple developers: metrics, press outreach, community and business ops. Useful once the app ships and growth stalls. CX Codex +1 452installs core-ml Guides Core ML, Vision, NaturalLanguage and Create ML work in iOS and macOS projects, from model integration to training a custom classifier. CX Codex +1 445installs swiftui swiftui is a Claude Code skill for diagnosing SwiftUI state and rendering issues. It also provides focused guidance on layouts, charts, text editing, toolbars, and WebKit. CX Codex +1 224installs performance performance diagnoses slow apps, hangs, and memory leaks using Instruments; spots unnecessary SwiftUI re-renders and view identity issues. CX Codex +1 212installs swiftdata A skill for designing hierarchical SwiftData models with class inheritance, polymorphic queries, and type safety. Guides you through inheritance patterns, type-based filtering, and inheritance-versus-enum decisions. CX Codex +1 204installs visionos Brings spatial-design patterns for visionOS: layout ergonomics, eyes-and-hands input, motion comfort, and immersive environments. CX Codex +1 202installs mapkit This skill guides agents through MapKit and GeoToolbox patterns for place data. Use it for geocoding or matching place identifiers across services. CX Codex +1 199installs

Project sponsors

Companies that keep this analytics open