一键导入
creating-screen
Scaffolds a complete feature module with Screen, View, ViewModel, Coordinator, and Dependencies. Use when creating a new screen or feature.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffolds a complete feature module with Screen, View, ViewModel, Coordinator, and Dependencies. Use when creating a new screen or feature.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Standard editorial template for any standalone HTML output (reports, RCAs, dashboards, diagrams, slides, recaps). Use EVERY time you generate an HTML file so output follows one consistent house style instead of ad-hoc theming.
Findings-first review agent for code changes. Use when the user asks to review a branch, PR, diff, commit range, or recent changes and wants prioritized, actionable issues instead of implementation work.
Scan and clean stale Claude Code sessions from the shared store at ~/.local/share/claude/projects (used by all .claude / .claude-accountN dirs via symlink). Removes session JSONLs older than N days, orphan subagent dirs, and reports reclaimable space.
Triage ShopHelp XCTest/Swift Testing failures before proposing fixes.
Manage Jira issues through jhelp shell functions (jv, jm, jd, jc, jforward, etc.). Use when the user wants to view, transition, assign, comment on, edit, search, or create Jira work items; when they provide a bare issue number, Jira issue key, or Jira URL; or when the task involves the current git branch ticket.
Create git commits. Use when user says "commit", "commit this", "commit changes", "split commit", "split commit change", "split the changes".
| name | creating-screen |
| description | Scaffolds a complete feature module with Screen, View, ViewModel, Coordinator, and Dependencies. Use when creating a new screen or feature. |
Scaffolds a complete feature module following MVVM-C + Clean Architecture.
All files go in {App}/Presentation/{Feature}/:
| File | Purpose |
|---|---|
{Feature}Screen.swift | SwiftUI View entry point with @StateObject ViewModel |
{Feature}View.swift | UI layout (optional, for complex UIs) |
{Feature}ViewModel.swift | @MainActor final class ObservableObject |
{Feature}Dependencies.swift | Struct with injected use cases/services |
{Feature}Coordinator.swift | Resolves DI, creates ViewModel, manages navigation |
//
// {Feature}Screen.swift
// {App}
//
// Created by Man Tran on DD/MM/YY.
//
import SwiftUI
struct {Feature}Screen: View {
@StateObject private var viewModel: {Feature}ViewModel
init(viewModel: {Feature}ViewModel) {
_viewModel = StateObject(wrappedValue: viewModel)
}
var body: some View {
content
.task {
await viewModel.onAppear()
}
}
@ViewBuilder
private var content: some View {
switch viewModel.state {
case .loading:
ProgressView()
case .loaded(let data):
{Feature}ContentView(data: data)
case .empty:
EmptyStateView()
case .error:
ErrorView(message: viewModel.errorMessage)
}
}
}
//
// {Feature}ViewModel.swift
// {App}
//
// Created by Man Tran on DD/MM/YY.
//
import Foundation
@MainActor
final class {Feature}ViewModel: ObservableObject {
@Published var state: {Feature}State = .loading
@Published var isLoading = false
@Published var errorMessage: String?
private let dependencies: {Feature}Dependencies
init(dependencies: {Feature}Dependencies) {
self.dependencies = dependencies
}
func onAppear() async {
await loadData()
}
func loadData() async {
isLoading = true
do {
let result = try await dependencies.someUseCase.execute()
state = .loaded(result)
} catch {
state = .error
errorMessage = error.localizedDescription
}
isLoading = false
}
}
enum {Feature}State {
case loading
case loaded(DomainModel)
case empty
case error
}
//
// {Feature}Dependencies.swift
// {App}
//
// Created by Man Tran on DD/MM/YY.
//
struct {Feature}Dependencies {
let someUseCase: SomeUseCaseProtocol
}
//
// {Feature}Coordinator.swift
// {App}
//
// Created by Man Tran on DD/MM/YY.
//
import SHArchitecture
final class {Feature}Coordinator: Coordinator {
@MainActor
init(route: Router, dependency: Dependency, coordinator: Coordinator? = nil) {
let useCase = dependency.resolve(SomeUseCaseProtocol.self)!
let dependencies = {Feature}Dependencies(someUseCase: useCase)
let viewModel = {Feature}ViewModel(dependencies: dependencies)
// Setup navigation
}
}
{Feature}ViewModel+Tracking.swift if analytics needed.@StateObject for ViewModel@MainActor final class ObservableObjectSee existing screens in {App}/Presentation/ for patterns.
See docs/PATTERNS.md for Screen/Coordinator pattern.
See docs/ARCHITECTURE.md for layer structure.