一键导入
lvt-add-related-resources
Intelligently suggest and add related resources based on domain and existing schema - uses context to recommend complementary resources
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Intelligently suggest and add related resources based on domain and existing schema - uses context to recommend complementary resources
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when deploying LiveTemplate applications to production - covers Docker containerization, Fly.io deployment, Kubernetes setup, database persistence, and production best practices
Transform app to production-ready - adds authentication, deployment config, environment setup, and best practices
Use when deploying LiveTemplate applications to production - covers Docker containerization, Fly.io deployment, Kubernetes setup, database persistence, and production best practices
Rapid end-to-end workflow - creates app, adds resources, sets up development environment in one flow
Generate test apps, capture screenshots, analyze UI for issues, and recursively fix problems in kit templates
Use when adding database migrations to LiveTemplate apps - guides both auto-generated migrations (from lvt gen resource) and custom migrations (indexes, constraints, data transformations)
| name | lvt-add-related-resources |
| description | Intelligently suggest and add related resources based on domain and existing schema - uses context to recommend complementary resources |
| keywords | ["lvt","livetemplate","lt"] |
| category | workflows |
| version | 1.0.0 |
Analyzes existing app and intelligently suggests related resources to add. Detects domain patterns and recommends complementary resources with proper relationships.
This skill typically runs in existing LiveTemplate projects (.lvtrc exists).
✅ Context Established By:
.lvtrc exists (most common scenario)lvt-assistant agentKeyword matching (case-insensitive): lvt, livetemplate, lt
With Context: ✅ "suggest related resources" ✅ "what should I add next?" ✅ "add common blog resources"
Without Context (needs keywords): ✅ "suggest resources for my lvt app" ✅ "what should I add to my livetemplate blog?" ❌ "suggest related resources" (no context, no keywords)
When to use:
Examples:
Use lvt:resource-inspect skill:
lvt resource list
Detect domain from existing resources:
Based on domain analysis, suggest complementary resources:
If has: posts Suggest:
comments (post_id:references:posts:CASCADE, content, author, created_at)categories (name, slug, description)post_categories (post_id:references:posts, category_id:references:categories) [junction]tags (name, slug)post_tags (post_id:references:posts, tag_id:references:tags) [junction]If has: products Suggest:
orders (user_email, total:float, status, created_at)order_items (order_id:references:orders, product_id:references:products, quantity:int, price:float)cart_items (session_id, product_id:references:products, quantity:int)customers (email, name, address, phone)reviews (product_id:references:products, user_email, rating:int, content)If has: projects Suggest:
tasks (project_id:references:projects, title, description, status, due_date)team_members (project_id:references:projects, user_email, role)milestones (project_id:references:projects, title, due_date, completed:bool)comments (task_id:references:tasks, user_email, content)If has: tasks Suggest:
projects (name, description, status, owner_email)labels (name, color)task_labels (task_id:references:tasks, label_id:references:labels) [junction]time_entries (task_id:references:tasks, user_email, hours:float, date:time)If has: events Suggest:
registrations (event_id:references:events, user_email, status, registered_at)venues (name, address, capacity:int)speakers (name, bio, email)event_speakers (event_id:references:events, speaker_id:references:speakers) [junction]If has: users Suggest:
posts (user_id:references:users, content, created_at)comments (post_id:references:posts, user_id:references:users, content)likes (post_id:references:posts, user_id:references:users)follows (follower_id:references:users, following_id:references:users)IMPORTANT: Use the AskUserQuestion tool to let user select which resources to add.
Present suggestions as checkboxes (multiSelect: true):
## Example: Blog Domain
Question: "Which related resources would you like to add to your blog?"
Options:
1. comments
Description: "Allow readers to discuss posts (post_id, content, author)"
2. categories
Description: "Organize posts by topic (name, slug, description)"
3. tags
Description: "Add flexible labeling with many-to-many (name, slug + junction table)"
4. None
Description: "I'll add resources manually later"
Use AskUserQuestion tool:
AskUserQuestion({
questions: [{
question: "Which related resources would you like to add?",
header: "Add Resources",
multiSelect: true,
options: [
{label: "comments", description: "Allow readers to discuss posts (post_id, content, author)"},
{label: "categories", description: "Organize posts by topic (name, slug, description)"},
{label: "tags", description: "Flexible labeling with many-to-many relationship"}
]
}]
})
Benefits of AskUserQuestion:
For each selected resource, use lvt:add-resource skill:
# User selected: comments, categories
# Add comments
lvt gen resource comments post_id:references:posts:CASCADE content author created_at
# Add categories
lvt gen resource categories name slug description
# Apply migrations
lvt migration up
cd database && sqlc generate && cd ../..
go mod tidy
After adding resources, suggest how to use them:
For comments:
Comments added! You can now:
1. Display comments under each post
2. Add comment form to post detail page
3. Moderate comments (add approved:bool field)
To customize:
- Edit app/comments/comments.go
- Modify app/comments/comments.tmpl
For categories:
Categories added! Next steps:
1. Create post_categories junction table for many-to-many
2. Add category filter to posts list
3. Show category on post cards
Junction table command:
lvt gen schema post_categories post_id:references:posts category_id:references:categories
Basic blog:
Advanced blog:
Full-featured blog:
Basic store:
Advanced store:
Full-featured store:
Basic SaaS:
Advanced SaaS:
Basic CMS:
Advanced CMS:
# Parent → Child
posts → comments
products → reviews
projects → tasks
# posts ↔ tags
lvt gen schema post_tags post_id:references:posts tag_id:references:tags
# users ↔ roles
lvt gen schema user_roles user_id:references:users role_id:references:roles
# products ↔ categories
lvt gen schema product_categories product_id:references:products category_id:references:categories
# Users following users
lvt gen schema follows follower_id:references:users following_id:references:users
# Categories with parent categories
lvt gen resource categories name parent_id:references:categories
User: "I have posts, what should I add next?"
Response:
Analyzing your blog app... I see you have posts.
Essential additions:
1. comments - Let readers engage with posts
2. categories - Organize posts by topic
Would make your blog better:
3. tags - Flexible post labeling
4. authors - If you have multiple writers
5. media - Image/file uploads
Should I add comments and categories? (Most blogs need these)
User: "Suggest resources for my shop"
Response:
I see you have products. For a complete shop, you need:
Core (required for orders):
1. orders - Track customer purchases
2. order_items - Line items for each order
Customer management:
3. customers - Store customer info
4. cart_items - Shopping cart functionality
Quality features:
5. reviews - Product reviews and ratings
6. inventory - Stock tracking
Shall I add the core resources (orders + order_items)?
Suggestions are good when: