Agent skill

Swiftui Expert Skill

by omarshahine in omarshahine/HomeClaw

A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…

MITAuto-check passedMobile

Install Swiftui Expert Skill

skills CLI
$ npx skills add omarshahine/HomeClaw --skill swiftui-expert-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install omarshahine/HomeClaw swiftui-expert-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/omarshahine/HomeClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/swiftui-expert-skill .claude/skills/swiftui-expert-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swiftui-expert-skill
GitHub stars
175
Used in
4 other repos
Token cost
~2.8k tokens
SKILL.md length
1,097 words
Files
39 (incl. scripts, references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…

  • Works in 5 steps: Confirm target — attach to a running… → Pick a template based on target kind —… → Start the recording. For agent-driven… → …
  • Refactoring SwiftUI code for iOS
  • SKILL.md covers Operating Rules, Task Workflow, Correctness Checklist and References
  • Calls python3

What it does

Swiftui Expert Skill is an agent skill from omarshahine/HomeClaw. Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace capture/analysis for hangs, hitches, CPU hotspots, or excessive view updates.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 39 other files, including scripts and reference files (for example `references/accessibility-patterns.md`, `references/animation-advanced.md` and `references/animation-basics.md`).

It sits in Mobile, covering iOS development. It works with SwiftUI, macOS and iOS. The repository describes itself as: HomeKit smart home control via MCP — lights, locks, thermostats, and scenes for Claude Desktop, Claude Code, and OpenClaw. The licence is MIT.

When your agent uses it

  • Refactoring SwiftUI code for iOS
  • Including state management
  • View composition
  • Liquid Glass adoption

Example prompts

  • “/swiftui-expert-skill”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.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…
  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…
  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…
  4. Signal stop — when the user says they've finished exercising the app, touch /tmp/stop-trace. The script cleanly SIGINTs xctrace and waits…
  5. Analyse the resulting trace (flow into the "Trace-driven improvement" workflow below).

What it can do on your machine

Read from SKILL.md and the folder at commit da69700. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swiftui Expert Skill loads about 2.8k tokens when it runs, and up to ~62k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 1,097 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~62k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from omarshahine/HomeClaw at commit da69700, republished under its MIT licence (© omarshahine). 1,097 words, ~2,774 tokens.

Download SKILL.mdSave it as .claude/skills/swiftui-expert-skill/SKILL.md (or your agent's skills folder). This skill also uses 38 other files; get the full folder from GitHub.
name
swiftui-expert-skill
description
Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments `.trace` capture/analysis for hangs, hitches, CPU hotspots, or excessive view updates.

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:
    bash
    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:
    bash
    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).
Trace-driven improvement (Instruments .trace provided)

Trigger whenever the user's request references a .trace file. A target SwiftUI source file is optional — if given, cite specific lines; if not, recommend where to look based on view names and symbols the trace already reveals.

Full reference: references/trace-analysis.md. Summary of the composition pattern:

  1. Scope the analysis. Ask yourself: does the user want the whole trace, or a slice?
    • "focus on X / after X / between X and Y / during X" → resolve to a window first (see step 2).
    • No scoping cue → analyse the whole trace.
  2. Resolve a window (only if the user scoped). The parser exposes two discovery modes:
    bash
    # Find a log that marks the start/end of the region of interest:
    python3 "${SKILL_DIR}/scripts/analyze_trace.py" --trace <path> \
        --list-logs --log-message-contains "loaded feed" --log-limit 5
    # Or list os_signpost intervals (paired begin/end), filterable by name:
    python3 "${SKILL_DIR}/scripts/analyze_trace.py" --trace <path> \
        --list-signposts --signpost-name-contains "ImageDecode"
    Both modes accept --window START_MS:END_MS to scope discovery. Pick the time_ms (for logs) or start_ms/end_ms (for signposts) that match the user's description. Build a window like --window 10400:11700.
  3. Run the main analysis (with or without --window):
    bash
    python3 "${SKILL_DIR}/scripts/analyze_trace.py" --trace <path> \
        --json-only --top 10 [--window START_MS:END_MS]
  4. Interpret with references/trace-analysis.md — key diagnostics:
    • main_running_coverage_pct inside each correlation (<25% = blocked; ≥75% = CPU-bound).
    • swiftui-causes.top_sources reveals why updates keep happening — high-edge-count sources like UserDefaultObserver.send() or wide EnvironmentWriter entries are structural invalidation bugs. Fixing one often collapses many downstream hot views.
  5. When a specific view shows as expensive, ask who's invalidating it. Use --fanin-for "<view name>" to get the ranked list of source nodes driving the updates.
  6. Optionally ground in source. If the user pointed at a file, read it and match view names / user-code symbols against identifiers there. If not, recommend which files to open based on the view names SwiftUI reported.
  7. Return a prioritised plan. Cite evidence (coverage %, hot symbol, overlapping view, log timestamp, cause-graph edges) and route each recommendation to a Topic Router reference.
  8. Only edit code if the user asked for edits.
Show full SKILL.md (387 more words)Show less
Topic Router

Consult the reference file for each topic relevant to the current task:

TopicReference
State managementreferences/state-management.md
View compositionreferences/view-structure.md
Performancereferences/performance-patterns.md
Lists and ForEachreferences/list-patterns.md
Layoutreferences/layout-best-practices.md
Sheets and navigationreferences/sheet-navigation-patterns.md
ScrollViewreferences/scroll-patterns.md
Focus managementreferences/focus-patterns.md
Animations (basics)references/animation-basics.md
Animations (transitions)references/animation-transitions.md
Animations (advanced)references/animation-advanced.md
Accessibilityreferences/accessibility-patterns.md
Swift Chartsreferences/charts.md
Charts accessibilityreferences/charts-accessibility.md
Image optimizationreferences/image-optimization.md
Liquid Glass (iOS 26+)references/liquid-glass.md
macOS scenesreferences/macos-scenes.md
macOS window stylingreferences/macos-window-styling.md
macOS viewsreferences/macos-views.md
Text patternsreferences/text-patterns.md
Deprecated API lookupreferences/latest-apis.md
Instruments trace analysisreferences/trace-analysis.md
Instruments trace recordingreferences/trace-recording.md

Correctness Checklist

These are hard rules -- violations are always bugs:

  • @State properties are private
  • @Binding only where a child modifies parent state
  • Passed values never declared as @State or @StateObject (they ignore updates)
  • @StateObject for view-owned objects; @ObservedObject for injected
  • iOS 17+: @State with @Observable; @Bindable for injected observables needing bindings
  • ForEach uses stable identity (never .indices for dynamic content)
  • Constant number of views per ForEach element
  • .animation(_:value:) always includes the value parameter
  • @FocusState properties are private
  • No redundant @FocusState writes inside tap gesture handlers on .focusable() views
  • iOS 26+ APIs gated with #available and fallback provided
  • import Charts present in files using chart types

References

  • references/latest-apis.md -- Read first for every task. Deprecated-to-modern API transitions (iOS 15+ through iOS 26+)
  • references/state-management.md -- Property wrappers, data flow, @Observable migration
  • references/view-structure.md -- View extraction, container patterns, @ViewBuilder
  • references/performance-patterns.md -- Hot-path optimization, update control, _logChanges()
  • references/list-patterns.md -- ForEach identity, Table (iOS 16+), inline filtering pitfalls
  • references/layout-best-practices.md -- Layout patterns, GeometryReader alternatives
  • references/accessibility-patterns.md -- VoiceOver, Dynamic Type, grouping, traits
  • references/animation-basics.md -- Implicit/explicit animations, timing, performance
  • references/animation-transitions.md -- View transitions, matchedGeometryEffect, Animatable
  • references/animation-advanced.md -- Phase/keyframe animations (iOS 17+), @Animatable macro (iOS 26+)
  • references/charts.md -- Swift Charts marks, axes, selection, styling, Chart3D (iOS 26+)
  • references/charts-accessibility.md -- Charts VoiceOver, Audio Graph, fallback strategies
  • references/sheet-navigation-patterns.md -- Sheets, NavigationSplitView, Inspector
  • references/scroll-patterns.md -- ScrollViewReader, programmatic scrolling
  • references/focus-patterns.md -- Focus state, focusable views, focused values, default focus, common pitfalls
  • references/image-optimization.md -- AsyncImage, downsampling, caching
  • references/liquid-glass.md -- iOS 26+ Liquid Glass effects and fallback patterns
  • references/macos-scenes.md -- Settings, MenuBarExtra, WindowGroup, multi-window
  • references/macos-window-styling.md -- Toolbar styles, window sizing, Commands
  • references/macos-views.md -- HSplitView, Table, PasteButton, AppKit interop
  • references/text-patterns.md -- Text initializer selection, verbatim vs localized
  • references/trace-analysis.md -- Parse Instruments .trace files via scripts/analyze_trace.py; interpret main-thread coverage, high-severity SwiftUI updates, hitch narratives, and map findings back to source files
  • references/trace-recording.md -- Record a new trace via scripts/record_trace.py: attach to a running app, launch one fresh, or capture a manually-stopped session; supports stop-file for agent-driven flows

© omarshahine, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 38 other files (scripts, references) in .claude/skills/swiftui-expert-skill of omarshahine/HomeClaw.

  • SKILL.md
  • references/accessibility-patterns.md
  • references/animation-advanced.md
  • references/animation-basics.md
  • references/animation-transitions.md
  • references/charts-accessibility.md
  • references/charts.md
  • references/focus-patterns.md
  • references/image-optimization.md
  • references/latest-apis.md
  • references/layout-best-practices.md
  • references/liquid-glass.md
  • references/list-patterns.md
  • references/macos-scenes.md
  • references/macos-views.md
  • references/macos-window-styling.md
  • references/performance-patterns.md
  • references/scroll-patterns.md
  • references/sheet-navigation-patterns.md
  • references/state-management.md
  • … and 19 more

Open the folder on GitHubat commit da69700

Used in 4 other repositories

We found 10 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in omarshahine/HomeClaw, which our catalogue first saw on October 8, 2026.

Compare with similar skills

Swiftui Expert Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swiftui Expert Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swiftui Expert Skill this skillomarshahine/HomeClaw1754 repos~2.8kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Swiftui Expert SkillEslzzyl/Pixiv-SwiftUI1111 repos~2.9kAutomated safety check: PassAGPL-3.0
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill204—~2.8kAutomated safety check: PassMIT
Swiftui Backportsshaps80/SwiftUIBackports1.1k—~604Automated safety check: PassMIT

Similar skills

  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Swiftui Expert Skill

    Eslzzyl/Pixiv-SwiftUI

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display…

    111 GitHub starsUsed in 1 repo~2.9k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • SwiftUI Design Skill

    Wholiver/swiftui-design-skill

    Guides the agent to design distinctive SwiftUI interfaces for iOS and macOS, with six anti-generic rules, a design direction workflow and a five-dimension review.

    204 GitHub stars~2.8k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Swiftui Backports

    shaps80/SwiftUIBackports

    Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target.

    1.1k GitHub stars~604 tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Install Mimi Remote

    gaixianggeng/mimi-remote

    安装、配置、配对、迁移、升级、诊断、回滚或卸载 Mimi Remote;在 macOS 上安装和维护 Mimi Remote Mac 菜单栏 App / DMG,或通过 Homebrew、Linux user-systemd 部署 agentd;从源码构建 iPhone/iPad App;配置 Codex 主通道和可选 Claude Code 实验 Runtime。用户提出“安装 Mimi…

    104 GitHub stars~2.8k tokensUpdated today
    MobileAuto-check passed

More from omarshahine/HomeClaw

All 14 skills in this repo
  • Spm Build Analysis

    omarshahine/HomeClaw

    Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds.

    175 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Xcode Build Benchmark

    omarshahine/HomeClaw

    Benchmark Xcode clean and incremental builds with repeatable inputs, timing summaries, and timestamped .build-benchmark/ artifacts.

    175 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Xcode Build Fixer

    omarshahine/HomeClaw

    Apply approved Xcode build optimization changes following best practices, then re-benchmark to verify improvement.

    175 GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Xcode Build Orchestrator

    omarshahine/HomeClaw

    Orchestrate Xcode build optimization by benchmarking first, running the specialist analysis skills, prioritizing findings, requesting explicit approval, delegating approved fixes to…

    175 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Xcode Compilation Analyzer

    omarshahine/HomeClaw

    Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan.

    175 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • iOS Ettrace Performance

    omarshahine/HomeClaw

    Capture and interpret ETTrace profiles for iOS simulator apps, including symbolicated launch and runtime flamegraphs.

    175 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed

Works with

Categories

Questions about Swiftui Expert Skill

What does Swiftui Expert Skill do?

A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…. Swiftui Expert Skill is an agent skill from omarshahine/HomeClaw.trace capture/analysis for hangs, hitches, CPU hotspots, or excessive view updates.

When should I use Swiftui Expert Skill?

Swiftui Expert Skill fits situations like: refactoring SwiftUI code for iOS; including state management; view composition; liquid Glass adoption.

How do I install Swiftui Expert Skill in Claude Code?

Run `npx skills add omarshahine/HomeClaw --skill swiftui-expert-skill -a claude-code`. Or copy the skill folder (.claude/skills/swiftui-expert-skill in omarshahine/HomeClaw) into .claude/skills/swiftui-expert-skill in your project. Claude Code loads it when a task matches its description.

How do I install Swiftui Expert Skill in Codex?

Run `npx skills add omarshahine/HomeClaw --skill swiftui-expert-skill -a codex`. Or copy the skill folder (.claude/skills/swiftui-expert-skill in omarshahine/HomeClaw) into .agents/skills/swiftui-expert-skill in your project. Codex loads it when a task matches its description.

Can I use Swiftui Expert Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add omarshahine/HomeClaw --skill swiftui-expert-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swiftui-expert-skill, .gemini/skills/swiftui-expert-skill, .github/skills/swiftui-expert-skill and .opencode/skills/swiftui-expert-skill in your project.

What does Swiftui Expert Skill need to run?

Going by SKILL.md and its folder, Swiftui Expert Skill needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Swiftui Expert Skill access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swiftui Expert Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Swiftui Expert Skill use?

Swiftui Expert Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swiftui Expert Skill use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 59k tokens, read only when the agent opens those files.

What are the alternatives to Swiftui Expert Skill?

Skills that share tags, products or a category with Swiftui Expert Skill: Hig Project Context (raintree-technology/hig-doctor, 143 stars), Swiftui Expert Skill (Eslzzyl/Pixiv-SwiftUI, 111 stars), Hig Components Content (raintree-technology/hig-doctor, 143 stars) and SwiftUI Design Skill (Wholiver/swiftui-design-skill, 204 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swiftui Expert Skill?

omarshahine (a GitHub user) maintains it in omarshahine/HomeClaw, which has 175 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.

Source: omarshahine/HomeClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.