build-feature
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBuild Feature with ShipSwift
使用ShipSwift构建功能
Build production-ready iOS features by combining ShipSwift recipes -- copy-paste-ready SwiftUI implementations covering animations, charts, UI components, and full-stack modules.
通过组合ShipSwift模板构建可用于生产环境的iOS功能——这些模板是可直接复制粘贴的SwiftUI实现,涵盖动画、图表、UI组件和全栈模块。
Prerequisites Check
前置检查
Before starting, verify the ShipSwift recipe server is available by calling .
listRecipesIf the recipe tools are not available, help the user set up:
-
Install Skills:bash
npx skills add signerlabs/shipswift-skills -
Connect the recipe server — the AI tool needs MCP access to fetch recipes:
- Claude Code:
claude mcp add --transport http shipswift https://api.shipswift.app/mcp - Cursor — add to :
.cursor/mcp.json{"mcpServers":{"shipswift":{"type":"streamableHttp","url":"https://api.shipswift.app/mcp"}}} - VS Code Copilot — add to :
.vscode/mcp.json{"servers":{"shipswift":{"type":"http","url":"https://api.shipswift.app/mcp"}}} - Other tools: See shipswift.app for setup guides
- Claude Code:
-
Restart the AI tool, then try again.
开始之前,请调用验证ShipSwift模板服务器是否可用。
listRecipes如果模板工具不可用,请帮助用户完成设置:
-
安装Skills:bash
npx skills add signerlabs/shipswift-skills -
连接模板服务器 —— AI工具需要MCP权限来获取模板:
- Claude Code:
claude mcp add --transport http shipswift https://api.shipswift.app/mcp - Cursor —— 添加到:
.cursor/mcp.json{"mcpServers":{"shipswift":{"type":"streamableHttp","url":"https://api.shipswift.app/mcp"}}} - VS Code Copilot —— 添加到:
.vscode/mcp.json{"servers":{"shipswift":{"type":"http","url":"https://api.shipswift.app/mcp"}}} - 其他工具:请查看shipswift.app获取设置指南
- Claude Code:
-
重启AI工具,然后重试。
Workflow
工作流程
-
Analyze the request: Break down the user's feature request into discrete components (UI, data, navigation, backend integration).
-
Search for recipes: Usewith relevant keywords to find matching ShipSwift recipes. Try multiple search terms if the first query returns few results.
searchRecipes -
Fetch full implementations: Usefor each relevant recipe to get the complete source code, architecture explanation, and integration checklist.
getRecipe -
Present an integration plan: Before writing code, show the user:
- Which recipes will be used
- How they connect together
- What customizations are needed for their specific use case
-
Generate code: Adapt the recipe patterns to the user's project structure. Combine multiple recipes when the feature spans several areas (e.g., a chart view with shimmer loading animation).
-
Provide integration checklist: List any required dependencies, Info.plist entries, or environment setup from the recipe documentation.
-
分析请求:将用户的功能请求拆解为独立组件(UI、数据、导航、后端集成)。
-
搜索模板:使用和相关关键词查找匹配的ShipSwift模板。如果首次查询结果较少,尝试多个搜索词。
searchRecipes -
获取完整实现:对每个相关模板使用,获取完整源代码、架构说明和集成清单。
getRecipe -
提供集成方案:在编写代码之前,向用户展示:
- 将使用哪些模板
- 这些模板如何关联
- 针对用户的特定用例需要哪些自定义修改
-
生成代码:调整模板模式以适配用户的项目结构。当功能涉及多个领域时(例如,带有微光加载动画的图表视图),组合多个模板。
-
提供集成清单:列出模板文档中提到的所有必需依赖项、Info.plist条目或环境设置。
Guidelines
指南
- Always search recipes before writing code from scratch -- ShipSwift likely has a ready-made solution.
- Combine multiple recipes when the feature spans several areas.
- Use -prefixed naming conventions for ShipSwift components (e.g.,
SW,SWShimmer).SWDonutChart - View modifier methods use lowercase prefix (e.g.,
.sw,.swShimmer())..swGlowScan() - Keep Views lightweight; extract complex logic into ViewModels.
- Support Dark Mode and Dynamic Type by default.
- Prefer SwiftUI-native APIs over UIKit wrappers.
- 编写代码前务必先搜索模板——ShipSwift很可能已有现成解决方案。
- 当功能涉及多个领域时,组合多个模板。
- 对ShipSwift组件使用前缀的命名约定(例如
SW、SWShimmer)。SWDonutChart - 视图修饰符方法使用小写前缀(例如
.sw、.swShimmer())。.swGlowScan() - 保持视图轻量化;将复杂逻辑提取到ViewModel中。
- 默认支持深色模式和动态字体。
- 优先使用SwiftUI原生API而非UIKit包装器。
Pro Recipes
专业版模板
Some recipes require ShipSwift Pro. When a recipe returns a purchase prompt instead of full code:
- Show the user the recipe preview (title, description, and architecture overview).
- Let them know: "This is a Pro recipe. Get lifetime access to all Pro recipes at shipswift.app/pricing ($89, one-time payment)."
- If they already have a Pro key, guide them to set the environment variable:
SHIPSWIFT_API_KEYThen restart their AI tool for the key to take effect.bash# Add to ~/.zshrc or ~/.bashrc export SHIPSWIFT_API_KEY=sk_live_xxxxx
部分模板需要ShipSwift Pro权限。当模板返回购买提示而非完整代码时:
- 向用户展示模板预览(标题、描述和架构概述)。
- 告知用户:“这是专业版模板。只需一次性支付89美元,即可在shipswift.app/pricing获取所有专业版模板的终身使用权。”
- 如果用户已有专业版密钥,指导他们设置环境变量:
SHIPSWIFT_API_KEY然后重启AI工具使密钥生效。bash# 添加到~/.zshrc或~/.bashrc export SHIPSWIFT_API_KEY=sk_live_xxxxx