refactor: 用 CLAUDE.md 替代 skill 文件
skill 机制适用于跨项目复用的专家知识, 对于单一职责项目,始终生效的 CLAUDE.md 更合适。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,108 +0,0 @@
|
||||
---
|
||||
name: live-photo-studio
|
||||
description: Live Photo Studio 开发指南。将视频转换为 Live Photo 并设置为动态壁纸。SwiftUI + Core ML + Soft UI。
|
||||
---
|
||||
|
||||
# Live Photo Studio
|
||||
|
||||
## 项目信息
|
||||
|
||||
| 属性 | 值 |
|
||||
|-----|-----|
|
||||
| **Bundle ID** | `xyz.let5see.livephotomaker` |
|
||||
| **App Store 名称** | Live Photo Studio |
|
||||
| **最低支持** | iOS/iPadOS 18.0 |
|
||||
| **技术栈** | SwiftUI + Swift Concurrency + Core ML |
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
to-live-photo/
|
||||
├── Sources/LivePhotoCore/ # 核心库(Swift Package)
|
||||
│ ├── LivePhotoCore.swift # WorkItem, ExportParams, Builder
|
||||
│ ├── AIEnhancer/ # AI 超分辨率
|
||||
│ └── Resources/ # Core ML 模型
|
||||
├── to-live-photo/to-live-photo/ # 主应用
|
||||
│ ├── Views/ # HomeView → EditorView → ProcessingView → ResultView → WallpaperGuideView
|
||||
│ ├── AppState.swift # 全局状态
|
||||
│ ├── DesignSystem.swift # Soft UI 设计系统
|
||||
│ └── Analytics.swift # 埋点
|
||||
└── docs/ # APP_STORE_METADATA.md, TEST_MATRIX.md
|
||||
```
|
||||
|
||||
## 设计令牌(DesignSystem.swift)
|
||||
|
||||
```swift
|
||||
// 间距
|
||||
DesignTokens.Spacing.sm // 8pt
|
||||
DesignTokens.Spacing.md // 12pt
|
||||
DesignTokens.Spacing.lg // 16pt
|
||||
DesignTokens.Spacing.xl // 20pt
|
||||
|
||||
// 圆角
|
||||
DesignTokens.Radius.md // 12pt
|
||||
DesignTokens.Radius.lg // 16pt
|
||||
DesignTokens.Radius.xl // 24pt
|
||||
|
||||
// 颜色(自动适配深色模式)
|
||||
Color.softBackground // 主背景
|
||||
Color.softCard // 卡片
|
||||
Color.textPrimary // 主文字
|
||||
Color.textSecondary // 次文字
|
||||
Color.accentPurple // 强调色 #6366F1
|
||||
Color.gradientPrimary // 主渐变
|
||||
```
|
||||
|
||||
## 核心 API(LivePhotoCore)
|
||||
|
||||
```swift
|
||||
// 配置
|
||||
struct ExportParams {
|
||||
var duration: Double = 0.917 // 标准时长
|
||||
var keyFrameTime: Double = 0.5 // 封面帧位置
|
||||
var aspectRatio: AspectRatio // 宽高比
|
||||
var hdrPolicy: HDRPolicy = .toneMapToSDR
|
||||
var codecPolicy: CodecPolicy = .fallbackH264
|
||||
var aiEnhanceConfig: AIEnhanceConfig?
|
||||
}
|
||||
|
||||
// 生成阶段
|
||||
enum LivePhotoBuildStage {
|
||||
case normalize, aiEnhance, extractKeyFrame
|
||||
case writePhotoMetadata, writeVideoMetadata
|
||||
case saveToAlbum, validate
|
||||
}
|
||||
```
|
||||
|
||||
## 错误码
|
||||
|
||||
| 错误码 | 含义 | 建议 |
|
||||
|-------|------|------|
|
||||
| LPB-001 | 导入失败 | 检查格式 |
|
||||
| LPB-101 | 标准化失败 | 开启兼容模式 |
|
||||
| LPB-401 | 保存失败 | 检查权限 |
|
||||
| LPB-501 | AI 增强失败 | 静默降级 |
|
||||
|
||||
## 开发检查清单
|
||||
|
||||
**新增 View:**
|
||||
- [ ] 状态机(loading/error/content)
|
||||
- [ ] 触控目标 ≥ 44pt
|
||||
- [ ] accessibilityLabel
|
||||
- [ ] iPad 适配
|
||||
- [ ] 深色模式
|
||||
|
||||
**发布前:**
|
||||
- [ ] 图标无 alpha 通道
|
||||
- [ ] 版本号更新
|
||||
- [ ] 截图尺寸正确
|
||||
|
||||
## 常用命令
|
||||
|
||||
```bash
|
||||
# 构建
|
||||
xcodebuild -scheme to-live-photo -destination 'platform=iOS Simulator,name=iPhone 16 Pro' build
|
||||
|
||||
# Archive
|
||||
xcodebuild -scheme to-live-photo -configuration Release -destination 'generic/platform=iOS' -archivePath build/to-live-photo.xcarchive archive
|
||||
```
|
||||
32
CLAUDE.md
Normal file
32
CLAUDE.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Live Photo Studio
|
||||
|
||||
**Bundle ID**: `xyz.let5see.livephotomaker`
|
||||
**最低支持**: iOS/iPadOS 18.0
|
||||
**技术栈**: SwiftUI + Swift Concurrency + Core ML
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
Sources/LivePhotoCore/ # 核心库 (Swift Package)
|
||||
to-live-photo/to-live-photo/
|
||||
├── Views/ # Home → Editor → Processing → Result
|
||||
├── AppState.swift # 全局状态
|
||||
└── DesignSystem.swift # Soft UI 设计令牌
|
||||
```
|
||||
|
||||
## 构建命令
|
||||
|
||||
```bash
|
||||
# 模拟器构建
|
||||
xcodebuild -scheme to-live-photo -destination 'platform=iOS Simulator,name=iPhone 16 Pro' build
|
||||
|
||||
# Archive
|
||||
xcodebuild -scheme to-live-photo -configuration Release -destination 'generic/platform=iOS' -archivePath build/to-live-photo.xcarchive archive
|
||||
```
|
||||
|
||||
## 规则
|
||||
|
||||
- 提交信息使用中文
|
||||
- 设计遵循 `DesignSystem.swift` 中的令牌
|
||||
- 触控目标 ≥ 44pt
|
||||
- 新增 View 必须适配深色模式和 iPad
|
||||
Reference in New Issue
Block a user