swiftui-examples

Query ranked SwiftUI usage examples from 1,857 shipping macOS apps before writing code.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill swiftui-examples-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-examples
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/swiftui-examples
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill swiftui-examples-yigitkonur

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? LLMs write SwiftUI from stale training memory, producing deprecated modifiers, hallucinated argument shapes, and iOS-isms that don't fit macOS apps. This Skill replaces memory with evidence by querying a corpus of 1,857 real open-source macOS apps parsed with SwiftSyntax, so every API call is grounded in how shipping apps actually write it. ## Core Features & Use Cases - API Lookup with Consensus Shapes: Run swiftui-ctx lookup <api> to see the argument shapes real apps use (with percentages), a quality-ranked recommended example, deprecation status, and a link to the official sosumi.ai docs. - Real Source Retrieval: Use swiftui-ctx file <id> --smart to fetch the actual compilable enclosing view from GitHub, pinned to a commit permalink, instead of emitting one-line fragments. - Recipes and Intent Search: Find multi-API production patterns (menubar-app, settings-screen, nsview-bridge) via recipe, or discover which APIs to use from a plain-language intent via search. - Use Case: Before writing a search field, run swiftui-ctx lookup searchable, read the consensus shape, then file --smart the recommended example to write the modifier exactly as high-quality Mac apps do. ## Quick Start Ask the agent to look up how production macOS apps use the SwiftUI searchable modifier and write the code based on the recommended real-world example.

Frequently Asked Questions about swiftui-examples

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check how real apps use a SwiftUI modifier?

Run swiftui-ctx lookup followed by the API name, such as swiftui-ctx lookup searchable. The result shows consensus argument shapes with percentages, a quality-ranked recommended example, and a GitHub permalink you can verify.

How do I know if a SwiftUI API is deprecated?

Run swiftui-ctx deprecated followed by the API name to see whether it is deprecated and what the modern replacement is. Running it without arguments lists every deprecated API still used in production apps.

Does swiftui-ctx work for iOS SwiftUI code?

The corpus is macOS-first, with about 83 percent of repos carrying a macOS signal, and queries filter to macOS by default. You can pass --platform any to include iOS and library examples, but macOS patterns are the primary coverage.

What should I do when swiftui-ctx lookup returns not found?

Exit code 3 means the API was not found in the catalog. Run swiftui-ctx search with a broader intent term to discover candidate APIs, and if nothing matches, consult the sosumi.ai documentation link rather than inventing an API.

Why does the skill require running file --smart after lookup?

A lookup result contains only a one-line source fragment, which is not compilable on its own. The file --smart command fetches the real enclosing view from the source repository, giving you working context before writing code.

What are the requirements to run swiftui-ctx?

You need macOS with a Swift 6 toolchain (Xcode) so the bundled wrapper can download or build the CLI on first run, plus network access for fetching live source files. The catalog itself ships with the plugin and needs no extra setup.