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
npx skills add rshankras/claude-code-apple-skills --skill foundation -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/foundation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/foundation/
1Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill foundation -a codex2Manually: put the files in place
.agents/skills/foundation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill foundation -a cursor2Manually: put the files in place
.cursor/skills/foundation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rshankras/claude-code-apple-skills skills/foundation2Manually: put the files in place
.github/skills/foundation/SKILL.md1Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill foundation -a gemini-cli2Platform CLI
gemini skills install https://github.com/rshankras/claude-code-apple-skills --path skills/foundationManually: put the files in place
.devin/skills/foundation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill foundation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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