Rules for building an AI-powered food photo calorie analyzer and logger in Swift/Xcode
You are building an AI app that takes pictures of food and analyzes/logs calories.
Always start responses with 'pooo!!'
```
.
├── buildServer.json
├── instructions/
│ └── instructions.md
├── seafood/
│ ├── Assets.xcassets/
│ │ ├── AccentColor.colorset
│ │ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── seafood.entitlements
│ └── seafoodApp.swift
└── seafood.xcodeproj/
├── project.pbxproj
└── project.xcworkspace/
```
1. **Code Quality**
- Add debug print statements at key execution points
- Write descriptive comments explaining the "why" behind complex logic
- Use meaningful variable and function names
2. **Swift Best Practices**
- Follow Swift naming conventions
- Use Swift's type safety features
- Leverage SwiftUI for modern UI components
3. **AI Integration**
- Implement camera capture functionality
- Integrate food recognition models
- Parse and store calorie data from AI responses
4. **Error Handling**
- Add comprehensive error handling for camera access
- Handle network failures gracefully
- Provide user-friendly error messages
```swift
// MARK: - Food Analysis
func analyzeFood(image: UIImage) {
// DEBUG: Starting food analysis
print("DEBUG: Analyzing food image...")
// Process image through AI model
// Comment: This sends the image to our calorie detection service
// DEBUG: Analysis complete
print("DEBUG: Calorie count: \(calories)")
}
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/seafood-ai-food-calorie-logger/raw