Agent Skillssignerlabs/ShipSwift › add-component

add-component

GitHub

指导从 ShipSwift 库中查找并集成 SwiftUI 组件(如图表、动画、弹窗等)到项目中,包括识别组件、读取源码、适配命名与平台及验证依赖。

skills/add-component/SKILL.md signerlabs/ShipSwift

Trigger Scenarios

用户请求添加 UI 组件或视图 用户需要特定功能如图表、动画或弹窗

Install

npx skills add signerlabs/ShipSwift --skill add-component -g -y
More Options

Use without installing

npx skills use signerlabs/ShipSwift@add-component

指定 Agent (Claude Code)

npx skills add signerlabs/ShipSwift --skill add-component -a claude-code -g -y

安装 repo 全部 skill

npx skills add signerlabs/ShipSwift --all -g -y

预览 repo 内 skill

npx skills add signerlabs/ShipSwift --list

SKILL.md

Frontmatter
{
    "name": "add-component",
    "description": "Add a SwiftUI component from ShipSwift. Use when the user says \"add component\", \"add a view\", \"add X view\", \"I need a chart\", \"add animation\", or wants a specific UI element."
}

Add Component from ShipSwift

Add production-ready SwiftUI components to your project from ShipSwift's local source library.

Workflow

  1. Identify the component: Read skills/catalog.md to find the right component. Common mappings:

    • "shimmer" / "loading skeleton" → SWAnimation/SWShimmer.swift
    • "donut chart" / "pie chart" → SWChart/SWDonutChart.swift
    • "alert" / "popup" → SWComponent/Feedback/SWAlert.swift
    • "auth" / "login" → SWModule/SWAuth/ (all files)
    • "camera" → SWModule/SWCamera/ (all files)
  2. Read the source file: Read the Swift file from ShipSwift/SWPackage/<path>. The file contains the complete implementation.

  3. Integrate into the project:

    • Copy the file(s) into the user's project
    • Also copy SWUtil/ if not already present
    • Adapt naming, colors, and data models to match the project
    • For +iOS/+macOS files, set the platform filter in Xcode Build Phases
  4. Verify: Walk through any dependencies or setup steps needed.

Guidelines

  • Types use SW prefix (SWDonutChart, SWTypewriter).
  • View modifiers use .sw prefix (.swShimmer(), .swGlowScan()).
  • Chart components use a generic CategoryType pattern with String convenience initializer.
  • Internal helper types should be private with SW prefix.
  • Components in SWAnimation/, SWChart/, and SWComponent/ are each self-contained (single file + SWUtil).
  • Modules in SWModule/ are multi-file — copy the entire folder.

Version History

  • d5a17ba Current 2026-07-25 10:52

Same Skill Collection

skills/build-feature/SKILL.md
skills/explore-recipes/SKILL.md

Metadata

Files
0
Version
f71ada2
Hash
d82b8c2c
Indexed
2026-07-25 10:52

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 03:31
浙ICP备14020137号-1 $방문자$