IS

ilianovi3/swift-skills

Browser automation

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars Качество 65 Тренд 20MIT

Agent skills for native Swift: React/Tailwind → SwiftUI 1:1 (react-to-swift) and measured client optimization (optimize-swift)

Обзор

Agent skills (Claude Code and compatible agents) for native Swift work: porting a web UI to SwiftUI pixel for pixel, and optimizing the client until it scrolls like a first-party app. They grew out of porting a Next.js prototype to a macOS app; every rule is backed by a measurement or a pixel comparison. They complement, and do not repeat, general skills such as swiftui-performance, swift-performance-optimization, swiftui-pro and swiftui-uikit-interop. macOS with Xcode (xcrun xctrace, swiftc), Python 3, Pillow for pixdiff.py (pip install pillow), Playwright for reference screenshots (npx playwright). Recordings and window snapshots briefly take over the screen; the agent should warn the user first. Each skill ships three test prompts. In the first run (Claude Opus, with and without the skill, assertions checked against the answers) the skills raised the assertion pass rate from 79 % to 100 % (optimize-swift) and from 72 % to 100 % (react-to-swift), at +12–18 % tokens.

README

Показан фрагмент оригинального README. Открыть оригинал.

Swift skills

Agent skills (Claude Code and compatible agents) for native Swift work: porting a web UI to SwiftUI pixel for pixel, and optimizing the client until it scrolls like a first-party app. They grew out of porting a Next.js prototype to a macOS app; every rule is backed by a measurement or a pixel comparison.

Skill What it does
react-to-swift Rewrite a React / Next.js / Tailwind component or screen in SwiftUI so it matches the web 1:1 while being built the native way: structure chosen for performance, CSS translated value for value, browser-accurate typography, verification by pixel diff.
optimize-swift Optimize a client, a screen or a component as far as it goes: measure with the user’s real input, use “share of frames at 120 Hz while moving” as the metric, a catalogue of root causes with their trace signatures, and native fixes that keep the look unchanged.

They complement, and do not repeat, general skills such as swiftui-performance, swift-performance-optimization, swiftui-pro and swiftui-uikit-interop.

Install

git clone https://github.com/ilianovi3/swift-skills ~/dev/swift-skills
ln -s ~/dev/swift-skills/react-to-swift ~/.claude/skills/react-to-swift
ln -s ~/dev/swift-skills/optimize-swift ~/.claude/skills/optimize-swift

Then run /reload-skills in Claude Code.

Layout

react-to-swift/
  SKILL.md                     workflow and the rules that matter most
  references/css-to-swiftui.md CSS and Tailwind → SwiftUI, value for value
  references/typography.md     fonts, variable axes, CSS line height, tracking, smoothing, wrapping
  references/parity-check.md   screenshots without windows on screen, diffing and measuring offsets
  scripts/window_shot.sh       capture the app's window (+ window_id.swift)
  scripts/pixdiff.py           difference of two screenshots, ink bounds for measuring shifts
  evals/evals.json             test prompts with assertions
optimize-swift/
  SKILL.md                     principles, workflow, root-cause table
  references/root-causes.md    causes, how to confirm them, fixes, traps
  references/patterns.md       ready code patterns (HostedStack, per-item hover flags, one-Text paragraphs, …)
  references/measure.md        recording real scroll, reading traces, Safari baseline, blind A/B
  scripts/analyze_trace.py     xctrace summary: frames, 120 Hz while moving, main thread by signature
  scripts/trace_callers.py     who triggers a signature and what it spends time on
  scripts/record_manual.sh     20 s recording of the user scrolling, with an on-screen countdown
  scripts/record_reference.sh  reference recording of Safari or another system app
  scripts/cue.swift            countdown panel in the corner of the screen
  evals/evals.json             test prompts with assertions

Requirements

Открыть полный README на GitHub

Рекомендуемые инструменты

Попробуйте другой запрос или уберите фильтр.

Установка

npx skillfish add ilianovi3/swift-skills
Новичок в MCP? Начните с руководства на mcpskill.org →