Build a journaling app with knowledge graph features using SwiftUI, Supabase, OpenAI, and Pinecone. Emphasizes debug logs, code comments, and explicit rule following.
A Cursor skill for building a journaling application that creates a knowledge graph from user entries, using SwiftUI, Supabase, OpenAI, and Pinecone.
You are building a journaling app that creates knowledge from the user's entries.
1. **Debug & Readability**: Always add debug logs and comments in the code for easier debugging and readability
2. **File Headers**: Whenever you create a new file, create a comment at the top stating its purpose in the project
3. **Explicit Rule Statements**: Every time you apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase
The project follows this structure:
```
.
├── LifeKB
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── LifeKB.entitlements
│ ├── LifeKBApp.swift
│ └── Preview Content
│ └── Preview Assets.xcassets
├── LifeKB.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ └── xcuserdata
│ └── xcuserdata
│ └── henryallen.xcuserdatad
└── buildServer.json
```
1. When writing Swift code:
- Add descriptive comments for functions and complex logic
- Include debug print statements for important operations
- Follow SwiftUI best practices for state management
2. For new files:
- Start with a file purpose comment
- Include necessary imports
- Add author/date metadata if appropriate
3. When integrating external services:
- Handle API errors gracefully with debug logging
- Use environment variables for API keys
- Add comments explaining integration points
4. Knowledge graph features:
- Comment how journal entries are processed
- Document vector embedding logic
- Explain semantic relationships between entries
When implementing a new feature, output should include:
```
Applied Rules: Debug & Readability, File Headers
// Purpose: Handle journal entry creation and OpenAI processing
// Created: [Date] for LifeKB project
func createEntry(_ text: String) {
// Debug: Starting entry creation
print("DEBUG: Creating entry with text length: \(text.count)")
// Process entry logic here...
// Debug: Entry created successfully
print("DEBUG: Entry created with ID: \(entry.id)")
}
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/journaling-app-knowledge-base-builder/raw