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:
empty
2025-12-16 10:32:25 +08:00
parent 5aba93e967
commit c37445b90f
2 changed files with 32 additions and 108 deletions

View File

@@ -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 //
```
## 核心 APILivePhotoCore
```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
View 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