foundation

foundation is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 36 tokens per session (281 once invoked), scanned A, original, MIT.

A guide to Foundation’s AttributedString APIs for text that contains different styles, formatting, or selectable parts. It also covers using this rich text in SwiftUI, Apple’s framework for building app interfaces.

In plain words
What is it for?
Use it when formatting AttributedString values, building rich-text alignment or selection behavior, or connecting styled text to SwiftUI.
Why use it?
It helps you keep rich-text formatting, alignment, and selection logic consistent when displaying or editing styled text.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

Good fit Use it when formatting AttributedString values, building rich-text alignment or selection behavior, or connecting styled text to SwiftUI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/foundation
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 rshankras/claude-code-apple-skills --skill foundation
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 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 foundation

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/foundation/github.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/foundation)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/foundation"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/foundation/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 foundation

Your own site · 80×15
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/foundation"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/foundation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 281 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.00036 $0.00281
Opus 5 $0.00018 $0.00140
Sonnet 5 $0.00007 $0.00056
Haiku 4.5 $0.00004 $0.00028

Measured 9d ago against content hash 7bcc17160774, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

foundation 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 9d 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.

skills/foundation/SKILL.md · 33 lines

What it actually says

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

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 33 lines · 36 tokens per session scan A 7bcc17160774

Subscribe to this mod's changes

foundation is a skill published in the GitHub repository rshankras/claude-code-apple-skills (710 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 281 once invoked, about $0.0002 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-30.

Related

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.

travisjneuman/.claude · 33 tokens

ios-development

Comprehensive guide for building native Apple platform applications.

travisjneuman/.claude · 43 tokens

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.

travisjneuman/.claude · 54 tokens

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.

personamanagmentlayer/pcl · 76 tokens

ios-expert

Expert in iOS development with SwiftUI, UIKit, Combine, and Apple ecosystem integration. Use when the user mentions mobile, Swift, SwiftUI, UIKit, Apple platforms, or Xcode, or when the task involves iOS App Architecture, SwiftUI Fundamentals, UIKit Essentials, or Combine Framework.

personamanagmentlayer/pcl · 64 tokens

ios-swiftui-product

Use when designing, implementing, reviewing, or repairing native SwiftUI iOS apps. Covers SwiftUI architecture, XcodeGen projects, Swift packages, StoreKit, Sign in with Apple, SwiftData/local persistence, screenshot/demo harnesses, UI state, release/debug boundaries, and app-development quality gates.

JasonColapietro/ios-app-dev-skills · 67 tokens