timmyy123/llm-hub/uikit-ui-common-setup

Claude Code and agent skill by timmyy123/llm-hub

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when writing or refactoring UIKit UI in this repo, especially Workflow/ViewController wiring, Controller/View components, SnapKit layout, Workspace/Dflat-driven UI state, Objective-C adapter responders, or app threading boundaries.

Install

npx vskill@latest install timmyy123/llm-hub/uikit-ui-common-setup

SKILL.md

UIKit UI Common Setup

First Pass

  • Read nearby app code before introducing a new shape.
  • Prefer existing Draw Things / Local Code UIKit patterns over new abstractions.
  • Use rg / rg --files to find matching Workflow, ViewController, and Controller examples.

Workflow And ViewController

  • UI screens are managed by Workflow objects.
  • A Workflow owns the concrete UIViewController.
  • Expose viewController when the workflow needs the concrete type, and viewControllable as the generic UIKit-facing UIViewController.
  • UIViewController subclasses are views plus UIKit event handling only.
  • Do not put business logic, persistence policy, generation logic, networking, model work, or off-main-thread work in a UIViewController.
  • UIViewController sends events out through delegates. The Workflow handles them and sets properties back on the view controller.

Controller And View

  • For shared business logic outside a workflow, use Controller & View.
  • A controller is a plain Swift class, not NSObject and not a UIKit subclass.
  • It owns one root UIView property, usually let view: UIView.
  • Controllers are usually owned by workflows. Letting a view controller own one is only for lightweight, mostly animation-focused cases.

Layout And View Setup

  • Use lazy vars for referenced views. Each lazy var configures that view and self-contained subviews.
  • Put hierarchy assembly and cross-view SnapKit constraints inline in viewDidLoad or the controller initializer.
  • In viewDidLoad or the controller initializer, do layout first, then action/delegate hookups.
  • Do not create one-off configureXXX / setupXXX methods for view setup, layout, or action wiring.
  • Domain helpers are fine when they express behavior or reusable construction, such as makeProjectMenu, updateSettingsSections, or didTapCollapseOrExpand.

One-Way Dataflow

  • Persisted UI state should flow from Dflat / Workspace / workspace.dictionary observations into UI properties.
  • Delegate callbacks should write source-of-truth state or call workflow/controller behavior, not directly mutate unrelated UI state.
  • Even didSet-driven UI updates should be reached through the owning Workflow or real Controller when the state is not purely local view presentation.
  • Keep view controllers as render targets: set properties on them; let them update UIKit controls.

Objective-C And UIKit Adapters

  • A UIViewController already inherits from NSObject; using it for UIKit lifecycle/delegates is fine.
  • Plain controllers must stay plain Swift classes.
  • When a plain controller needs Objective-C delegation, target/action, or UIKit delegate conformance, create a nested responder such as Controller.ObjCResponder: NSObject.
  • The responder forwards callbacks back to the controller; it does not own business logic.

Threads And Queues

  • Do not use async / await in app UI code.
  • UIViewController subclasses and views should only touch main-thread UIKit state.
  • Workflow and Controller objects are the right places for off-main-thread behavior.
  • Avoid creating private queues per workflow/controller. Reuse existing shared queues when behavior fits.
  • Prefer one or two shared queues for broad work classes, like Draw Things' edit queue handling generation, tokenization, and related work.
  • Create a new queue only when the behavior truly needs a separate serialization or QoS boundary. For rare fire-and-forget work, a global concurrent queue can be acceptable.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/timmyy123/llm-hub/uikit-ui-common-setup/badge)](https://verified-skill.com/skills/timmyy123/llm-hub/uikit-ui-common-setup)

Something wrong with this skill or its page? Tell us.