Agent skill

Swiftui Expert Skill

by Eslzzyl in 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…

AGPL-3.0Auto-check passedMobile

Install Swiftui Expert Skill

skills CLI
$ npx skills add Eslzzyl/Pixiv-SwiftUI --skill swiftui-expert-skill -a claude-code

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

GitHub CLI
$ gh skill install Eslzzyl/Pixiv-SwiftUI 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/Eslzzyl/Pixiv-SwiftUI.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/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
111
Used in
1 other repo
Token cost
~2.9k tokens
SKILL.md length
1,158 words
Files
53 (incl. scripts, references, assets)
Skills in repo
3
Repo updated
First seen
Licence
AGPL-3.0

At a glance

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…

  • 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 and Correctness Checklist
  • Calls python3

What it does

Swiftui Expert Skill is an agent skill from Eslzzyl/Pixiv-SwiftUI. Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display scale, performance, lists, environment, localization, animation, Liquid Glass, and API migration. Also use for iPhone Duo, foldable, or large-display layouts (NavigationSplitView on large displays, iPhone tab sidebar, two-column reflow, foldable grids, ArrangementView, ReservedRegion), hinge effects, vertical bars, @State initialization or…

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

It sits in Mobile, covering iOS development. It works with SwiftUI, iOS and macOS. The repository describes itself as: 为现代 Apple 平台设计的第三方 Pixiv 客户端,支持 iOS/iPadOS/macOS. The licence is AGPL-3.0.

When your agent uses it

  • Refactoring SwiftUI code for iOS
  • Including state and @Observable data flow
  • View composition
  • Resizable layouts

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 1f4bc02. 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.9k tokens when it runs, and up to ~97k if it reads all its reference files. Until then it costs about 218 tokens; SKILL.md has 1,158 words of instructions outside code blocks.

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

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 Eslzzyl/Pixiv-SwiftUI at commit 1f4bc02, republished under its AGPL-3.0 licence (© Eslzzyl). 1,158 words, ~2,904 tokens.

Download SKILL.mdSave it as .claude/skills/swiftui-expert-skill/SKILL.md (or your agent's skills folder). This skill also uses 52 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 and `@Observable` data flow, view composition, resizable layouts, safe areas, display scale, performance, lists, environment, localization, animation, Liquid Glass, and API migration. Also use for iPhone Duo, foldable, or large-display layouts (`NavigationSplitView` on large displays, iPhone tab sidebar, two-column reflow, foldable grids, `ArrangementView`, `ReservedRegion`), hinge effects, vertical bars, `@State` initialization or synthesized-property diagnostics, `@ContentBuilder` ambiguity, `reorderable` drag/drop, custom `AsyncImage` `URLSession`, swipe actions outside List, item-bound `alert`/`confirmationDialog`, `ToolbarOverflowMenu`, `AnimatableValues`, Document APIs (`Document`/`DocumentReader`), and Instruments `.trace` capture or analysis.

SwiftUI Expert Skill

Operating Rules

  • Treat each View type as an invalidation boundary: give it only the data it reads and keep frequently changing dependencies close to the smallest affected subtree
  • Search references/latest-apis.md when writing, reviewing, or migrating API usage; look up only the APIs relevant to the task
  • Replace hard-deprecated APIs with modern equivalents. During feature work, flag soft-deprecated APIs and leave them in place (see references/soft-deprecation.md)
  • 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
  • For layout and rendering inputs, read the value nearest the SwiftUI view that consumes it; do not substitute process-global screen state

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); replace hard-deprecated APIs, and flag soft-deprecated APIs without rewriting them unless the user asked to migrate
  • Run the Topic Router below for each relevant topic
  • Validate #available gating and fallback paths for version-specific features
  • For broad codebase reviews, first identify smaller focus areas and present them one at a time; if the user requests a whole-codebase review, divide it into a TODO list
Improve existing SwiftUI code
  • Audit current implementation against the Topic Router topics
  • Replace hard-deprecated APIs with modern equivalents from references/latest-apis.md; flag soft-deprecated APIs and do not rewrite them during feature work
  • 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).
Show full SKILL.md (653 more words)Show less
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.
Topic Router

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

TopicReference
State managementreferences/state-management.md
Environment and @Entryreferences/environment-patterns.md
View compositionreferences/view-structure.md
View modifiers and identityreferences/modifier-patterns.md
Performancereferences/performance-patterns.md
Lists and ForEachreferences/list-patterns.md
Resizable layout, safe areas, two-column reflow, foldable grids, arrangements, and reserved regionsreferences/layout-best-practices.md
iPhone Duo, foldable, or large-display screens (read first to choose the technique)references/iphone-duo.md
Sheets, navigation, NavigationSplitView on large displays, and tab bar/sidebar (sidebarAdaptable)references/sheet-navigation-patterns.md
ScrollView, scroll position, and scroll geometryreferences/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 optimization and display scalereferences/image-optimization.md
Toolbarsreferences/toolbar-patterns.md
Document-based appsreferences/document-apps.md
WebKitreferences/webkit-integration.md
Styled text editingreferences/styled-text-editing.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
Localizationreferences/localization.md
Deprecated API lookupreferences/latest-apis.md
Handling soft-deprecated APIsreferences/soft-deprecation.md
Previewsreferences/previews.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
  • Changing parent-owned inputs are not stored as @State/@StateObject; intentional state seeds are documented as one-time
  • @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/\.offset; id outlives the view and isn't derived from mutable content)
  • Constant number of views per ForEach element; List rows are unary
  • No closures stored in custom @Environment/@FocusedValue keys
  • Custom @Entry default values are stable (no Model()/Date()/UUID() expressions)
  • SwiftUI display scale comes from @Environment(\.displayScale), not global screen state
  • Safe-area content does not double-apply GeometryProxy.safeAreaInsets
  • .animation(_:value:) always includes the value parameter
  • @FocusState properties are private
  • No redundant @FocusState writes inside tap gesture handlers on .focusable() views
  • Version-specific APIs are gated with #available and have sensible fallbacks
  • import Charts present in files using chart types
  • Previews use self-contained mock data; no dependency on live services or network

© Eslzzyl, AGPL-3.0. 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 52 other files (scripts, references, assets) in .agents/skills/swiftui-expert-skill of Eslzzyl/Pixiv-SwiftUI.

  • SKILL.md
  • agents/openai.yaml
  • assets/logo-small.png
  • assets/logo.png
  • assets/logo.svg
  • references/accessibility-patterns.md
  • references/animation-advanced.md
  • references/animation-basics.md
  • references/animation-transitions.md
  • references/charts-accessibility.md
  • references/charts.md
  • references/document-apps.md
  • references/environment-patterns.md
  • references/focus-patterns.md
  • references/image-optimization.md
  • references/iphone-duo.md
  • references/latest-apis.md
  • references/layout-best-practices.md
  • … and 35 more

Open the folder on GitHubat commit 1f4bc02

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Eslzzyl/Pixiv-SwiftUI, which our catalogue first saw on October 7, 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 skillEslzzyl/Pixiv-SwiftUI1111 repos~2.9kAutomated safety check: PassAGPL-3.0
Swiftui Expert Skillomarshahine/HomeClaw1754 repos~2.8kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill213—~2.8kAutomated safety check: PassMIT
Swiftui Backportsshaps80/SwiftUIBackports1.1k—~604Automated safety check: PassMIT

Similar skills

  • Swiftui Expert Skill

    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…

    175 GitHub starsUsed in 4 repos~2.8k tokens
    MobileAuto-check passed
  • 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
  • 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.

    213 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 Eslzzyl/Pixiv-SwiftUI

  • Changelog Generator

    Eslzzyl/Pixiv-SwiftUI

    Generate user-facing changelogs from git history between two versions.

    111 GitHub stars~940 tokensUpdated yesterday
    Auto-check passed
  • Xcstrings Manager

    Eslzzyl/Pixiv-SwiftUI

    Manage Xcode String Catalog (.xcstrings) localization files through a command-line interface.

    111 GitHub stars~482 tokensUpdated yesterday
    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 and @Observable data flow, view composition, resizable layouts, safe areas, display…. Swiftui Expert Skill is an agent skill from Eslzzyl/Pixiv-SwiftUI. Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display scale, performance, lists, environment, localization, animation, Liquid Glass, and API migration.

When should I use Swiftui Expert Skill?

Swiftui Expert Skill fits situations like: refactoring SwiftUI code for iOS; including state and @Observable data flow; view composition; resizable layouts.

How do I install Swiftui Expert Skill in Claude Code?

Run `npx skills add Eslzzyl/Pixiv-SwiftUI --skill swiftui-expert-skill -a claude-code`. Or copy the skill folder (.agents/skills/swiftui-expert-skill in Eslzzyl/Pixiv-SwiftUI) 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 Eslzzyl/Pixiv-SwiftUI --skill swiftui-expert-skill -a codex`. Or copy the skill folder (.agents/skills/swiftui-expert-skill in Eslzzyl/Pixiv-SwiftUI) 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 Eslzzyl/Pixiv-SwiftUI --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 AGPL-3.0 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.9k tokens (SKILL.md is roughly 12k 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 94k 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: Swiftui Expert Skill (omarshahine/HomeClaw, 175 stars), Hig Project Context (raintree-technology/hig-doctor, 143 stars), Hig Components Content (raintree-technology/hig-doctor, 143 stars) and SwiftUI Design Skill (Wholiver/swiftui-design-skill, 213 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?

Eslzzyl (a GitHub user) maintains it in Eslzzyl/Pixiv-SwiftUI, which has 111 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

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