跳到正文
cccskills
免费在 GitHub 公开

spark-component-view

Create or update an view files for UIKit and SwiftUI in the View folder in Sources of a spark-ios-component-XXX.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(5)

  • SKILL.md2.1 KB
  • template/SwiftUI/SparkXXX.swift8.4 KB
  • template/SwiftUI/SparkXXX+InitLabelExtension.swift6.0 KB
  • template/SwiftUI/SparkXXX+InitTextExtension.swift5.5 KB
  • template/UIKit/SparkUIXXX.swift12.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Add Repository Skill

Overview & Prerequisites

This skill guides you to implement/update an SwiftUI and UIKit view in spark component.

Component Selection

Parameter Handling:

  • If the skill is invoked with a parameter (e.g., /spark-component-view button):

    • Use the parameter as the component name
    • Verify the folder exists in Modules/Components/{component-name}/
    • If found, use that component and skip the selection step
  • If no parameter is provided:

    • List all folders in the Modules/Components/ directory
    • Use AskUserQuestion to let the user select ONE component from the list
    • Format: Display folder names as options (e.g., "button", "card", "checkbox")

Once the component is selected, all operations must be performed in Modules/Components/{component-name}/ folder.

Use the files in the template folder as reference to manage the swiftUI and UIKit views.

Rules

UIKit

  • Respect the order of conception with mark (Components, Public Properties, ...) as the file in template.
  • Respect the same naming as the file in template.
  • Can inherits UIView or UIControl. If it is no precise in prompt, use the UIView.

SwiftUI

  • Respect the order of conception with mark (Components, Public Properties, ...) as the file in template.
  • Respect the same naming as the file in template.
  • Add dynamic type (on the component declaration) only if it is asked. Manage all the possible inits : Put them in the other file if there is many public init (more than 4)

Workflow

  • Read the templates
  • Add/Update the code.

Code Conventions

  • File headers follow pattern: Created by {firstname.lastname} on DD/MM/YYYY
  • Copyright line includes current year
  • No empty lines contain whitespace or tabs
  • All class members accessed with self.
  • Protocol marked with // sourcery: AutoMockable
  • Proper MARK comments in place

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Update the CHANGELOG.md with the description of the changes between the last released version and the new one

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

Launch some action before create push in git

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

Create or update a accessibility identifier file in the AccessibilityIdentifier folder in Sources of a spark-ios-component-XXX and add or update unit tests.

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

Create or update a constants file in the Constants folder in Sources of a spark-ios-component-XXX and add or update unit tests.

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

Create or update the DocC documentation in Sources of a spark-ios-component-XXX.

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

Create or update an enum file in the Enum folder in Sources of a spark-ios-component-XXX and add or update unit tests.

中文简介正在准备中。当前显示原文说明。

leboncoin/spark-ios222026年10月8日 更新

查看 leboncoin 的全部技能

报告此技能的问题