HomeClaw: Skill for Claude Code

.claude/skills/swiftui-expert-skill/SKILL.md

swiftui-expert-skill is a skill for Claude Code from omarshahine/HomeClaw. It costs 61 tokens per session (2,622 once invoked), scanned A, a copy of swiftui-expert-skill, MIT.

A set of guidelines for writing, reviewing, and refactoring SwiftUI, Apple's framework for building app interfaces on iOS and macOS. It covers view structure, state handling, modern APIs, availability checks, and performance investigations.

In plain words
What is it for?
Use it when building or reviewing SwiftUI views, managing state, improving performance, checking newer system APIs, or working with Instruments performance traces.
Why use it?
It helps avoid outdated APIs and designs that are difficult to test or slow at runtime. It also gives a consistent way to review SwiftUI code and investigate hangs, rendering problems, or excessive updates.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is omarshahine/HomeClaw's own configuration. It tells Claude Code how to work on HomeClaw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything HomeClaw configures →

Part of the homeclaw plugin — 17 skills, 4 commands shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to omarshahine/HomeClaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/omarshahine/HomeClaw/main/.claude/skills/swiftui-expert-skill/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/omarshahine/HomeClaw

Made for: Claude Code.

Or install homeclaw, the plugin that ships this one along with the rest of its 17 skills, 4 commands.

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-expert-skill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/omarshahine/homeclaw/swiftui-expert-skill"><img src="https://agentmods.dev/badge/skills/omarshahine/homeclaw/swiftui-expert-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,622 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.
Origin 97% copy Near-identical to another mod 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.00061 $0.02622
Opus 5 $0.00030 $0.01311
Sonnet 5 $0.00012 $0.00524
Haiku 4.5 $0.00006 $0.00262

Measured 11d ago against content hash 6621224bf68b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

swiftui-expert-skill 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 11d ago.

The scan reads SKILL.md. This mod also ships 13 executable files (scripts/analyze_trace.py, scripts/instruments_parser/__init__.py, scripts/instruments_parser/causes.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

97% identical to swiftui-expert-skill — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/swiftui-expert-skill/SKILL.md · 163 lines

How it starts

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

SwiftUI Expert Skill

Operating Rules

  • Consult references/latest-apis.md at the start of every task to avoid deprecated APIs
  • Prefer native SwiftUI APIs over UIKit/AppKit bridging unless bridging is necessary
  • Focus on correctness and performance; do not enforce specific architectures (MVVM, VIPER, etc.)
  • Encourage separating business logic from views for testability without mandating how
  • Follow Apple's Human Interface Guidelines and API design patterns
  • Only adopt Liquid Glass when explicitly requested by the user (see references/liquid-glass.md)
  • Present performance optimizations as suggestions, not requirements
  • Use #available gating with sensible fallbacks for version-specific APIs

Task Workflow

Review existing SwiftUI code

  • Read the code under review and identify which topics apply
  • Flag deprecated APIs (compare against references/latest-apis.md)
  • Run the Topic Router below for each relevant topic
  • Validate #available gating and fallback paths for iOS 26+ features

Improve existing SwiftUI code

  • Audit current implementation against the Topic Router topics
  • Replace deprecated APIs with modern equivalents from references/latest-apis.md
  • Refactor hot paths to reduce unnecessary state updates
  • Extract complex view bodies into separate subviews
  • Suggest image downsampling when UIImage(data:) is encountered (optional optimization, see references/image-optimization.md)

Implement new SwiftUI feature

  • Design data flow first: identify owned vs injected state
  • Structure views for optimal diffing (extract subviews early)
  • Apply correct animation patterns (implicit vs explicit, transitions)
  • Use Button for all tappable elements; add accessibility grouping and labels
  • Gate version-specific APIs with #available and provide fallbacks

Record a new Instruments trace

Trigger when the user asks to "record a trace", "profile the app", "capture a session", etc. Full reference: references/trace-recording.md.

  1. Confirm target — attach to a running app, launch an app, or record all processes? If the user didn't say, ask. List connected devices when useful:
    python3 "${SKILL_DIR}/scripts/record_trace.py" --list-devices
    
  2. Pick a template based on target kind — the SwiftUI template populates the SwiftUI lane on any real device: a physical iOS/iPadOS device or the host Mac. The only exception is the iOS Simulator, where the SwiftUI lane comes back empty — switch to --template "Time Profiler" in that case (still gives Time Profiler + Hangs + Animation Hitches). Always check --list-devices: simulators kind → Time Profiler; devices kind (real devices and the host Mac) → default SwiftUI. Full decision table in references/trace-recording.md.
  3. Start the recording. For agent-driven sessions where the user says "I'll tell you when I'm done", start in the background and use a stop-file:
    python3 "${SKILL_DIR}/scripts/record_trace.py" \
        --device "<name|udid>" --attach "<AppName>" \
        --stop-file /tmp/stop-trace --output ~/Desktop/session.trace
    
    For interactive sessions, just tell the user to press Ctrl+C when done.
  4. Signal stop — when the user says they've finished exercising the app, touch /tmp/stop-trace. The script cleanly SIGINTs xctrace and waits up to 60s for finalisation.
  5. Analyse the resulting trace (flow into the "Trace-driven improvement" workflow below).

Read the full file on GitHub · 163 lines

Files

What ships with it

36 files 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. 11d ago First seen · 163 lines · 61 tokens per session scan A 6621224bf68b

Subscribe to this mod's changes

swiftui-expert-skill is a skill published in the GitHub repository omarshahine/HomeClaw (167 stars, last pushed 3d ago), licensed MIT. It adds 61 tokens to every session and 2,622 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to swiftui-expert-skill, differing in 19 lines, and is treated as a copy.