一键导入
lvt-suggest
Suggest improvements and next steps based on app analysis - recommends features, optimizations, security enhancements
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Suggest improvements and next steps based on app analysis - recommends features, optimizations, security enhancements
用 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-suggest |
| description | Suggest improvements and next steps based on app analysis - recommends features, optimizations, security enhancements |
| category | maintenance |
| version | 1.0.0 |
| keywords | ["lvt","livetemplate","lt"] |
Analyzes app structure and suggests actionable improvements. Provides prioritized recommendations for features, performance, security, and user experience.
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: ✅ Generic prompts related to this skill's purpose
Without Context (needs keywords): ✅ Must mention "lvt", "livetemplate", or "lt" ❌ Generic requests without keywords
When to use:
Examples:
Use lvt:resource-inspect to understand the app:
lvt resource list
lvt resource describe <table>
Gather context:
Generate recommendations in these categories:
Authentication:
⚠️ No authentication system detected
→ Add user authentication to protect resources
→ Command: lvt gen auth
→ Impact: Security, user management, sessions
Essential Relationships:
⚠️ posts table exists but no comments
→ Add comments to enable reader engagement
→ Command: lvt gen resource comments post_id:references:posts:CASCADE content author
→ Impact: User engagement, community building
Missing Indexes:
⚠️ No index on posts(created_at)
→ Add index for date-based queries
→ Command: lvt migration create add_posts_created_at_index
→ SQL: CREATE INDEX idx_posts_created_at ON posts(created_at);
→ Impact: Faster list/pagination queries
Query Optimization:
⚠️ N+1 query potential in posts → comments
→ Consider eager loading or denormalization
→ Impact: Reduced database roundtrips
CSRF Protection:
⚠️ Forms lack CSRF protection
→ Add CSRF tokens to all forms
→ Already built-in with auth system
→ Impact: Prevent cross-site request forgery
Input Validation:
⚠️ No field length limits
→ Add validation to prevent abuse
→ Add constraints in migrations
→ Impact: Data integrity, DoS prevention
Pagination:
💡 Large lists without pagination
→ Add infinite scroll or page-based navigation
→ Already supported by LiveTemplate
→ Impact: Better performance, usability
Search:
💡 No search functionality
→ Add search to help users find content
→ SQL: WHERE title LIKE ? OR content LIKE ?
→ Impact: Improved user experience
Sorting/Filtering:
💡 No sort or filter controls
→ Add UI controls for sorting/filtering
→ Impact: Better content discovery
Soft Deletes:
💡 Hard deletes with CASCADE
→ Consider soft deletes for audit trail
→ Add deleted_at:time field
→ Impact: Data recovery, audit compliance
Timestamps:
💡 Missing updated_at fields
→ Add updated_at for change tracking
→ Impact: Better data lifecycle management
Priority matrix:
P0 (Critical - Do now):
P1 (Important - Do soon):
P2 (Nice to have - Do later):
Format suggestions as actionable steps:
## Recommendations for [App Name]
### Critical (Do Now)
1. **Add Authentication System**
- Why: Protect user data and enable personalization
- How: `lvt gen auth`
- Time: 10 minutes
- Impact: ⭐⭐⭐⭐⭐
2. **Add Missing Foreign Keys**
- Why: Data integrity and relationships
- How: `lvt gen resource comments post_id:references:posts content`
- Time: 5 minutes
- Impact: ⭐⭐⭐⭐
### Important (Do Soon)
3. **Add Indexes for Performance**
- Why: Faster queries on large datasets
- How: Migration to add indexes
- Time: 5 minutes
- Impact: ⭐⭐⭐⭐
4. **Add Search Functionality**
- Why: Better content discovery
- How: Add search form + WHERE clause
- Time: 15 minutes
- Impact: ⭐⭐⭐
### Nice to Have (Do Later)
5. **Add Categories/Tags**
- Why: Better content organization
- How: `lvt gen resource categories name slug`
- Time: 20 minutes
- Impact: ⭐⭐⭐
6. **Add Soft Deletes**
- Why: Data recovery and audit trail
- How: Add deleted_at field + filter queries
- Time: 30 minutes
- Impact: ⭐⭐
If has: posts Suggest:
If has: products Suggest:
If has: users (via auth) Suggest:
If has: projects, tasks Suggest:
Detection: Parent resource without children Example: posts without comments Suggestion:
Add comments to enable reader engagement
→ lvt gen resource comments post_id:references:posts:CASCADE content author created_at
→ Impact: Community building, feedback loop
Detection: Large datasets without search Example: 100+ products without search Suggestion:
Add search functionality to help users find products
→ Add search input to list template
→ Add WHERE clause: WHERE name LIKE ? OR description LIKE ?
→ Impact: Better user experience, faster discovery
Detection: User-specific resources without auth Example: tasks, posts with "user_email" but no auth system Suggestion:
Add authentication to protect user data
→ lvt gen auth
→ Use auth.RequireAuth middleware on routes
→ Impact: Security, user management
Detection: Tables > 1000 rows without indexes on common queries Example: posts sorted by created_at without index Suggestion:
Add index on created_at for faster sorting
→ lvt migration create add_posts_created_at_index
→ CREATE INDEX idx_posts_created_at ON posts(created_at);
→ Impact: 10-100x faster queries
Detection: App ready to deploy but missing prod features Example: No health checks, no monitoring Suggestion:
Add production readiness features
→ Health check endpoint
→ Structured logging
→ Error monitoring (Sentry)
→ Database backups (Litestream)
→ Impact: Reliability, observability
# Suggestions for [App Name]
## Overview
Your app is a [domain] with [X] resources. Here are prioritized recommendations:
## 🔴 Critical (Do Now)
### 1. [Suggestion Title]
**Why:** [Business/technical reason]
**How:**
```bash
[Exact commands to run]
Time: [Estimate] Impact: [What changes]
...
...
## Example Suggestions
### Example 1: Simple Blog
**Analysis:**
- Has: posts (title, content, created_at)
- Missing: comments, categories, auth
**Suggestions:**
Add Comments
Add Categories
### Example 2: E-commerce App
**Analysis:**
- Has: products (name, price, quantity)
- Missing: orders, cart, reviews, categories
**Suggestions:**
Add Order Management
Add Authentication
Add Product Reviews
Add Shopping Cart
## Success Criteria
Good suggestions should:
1. ✅ Be specific and actionable
2. ✅ Include exact commands
3. ✅ Explain business value
4. ✅ Estimate time and impact
5. ✅ Be prioritized by urgency
6. ✅ Be domain-appropriate
7. ✅ Be achievable quickly
## Common Suggestion Categories
**Features:**
- Authentication/authorization
- Search and filtering
- Pagination/infinite scroll
- Comments/reviews
- Categories/tags
- File uploads
- Email notifications
**Performance:**
- Database indexes
- Query optimization
- Caching strategies
- Asset optimization
- Connection pooling
**Security:**
- CSRF protection
- Input validation
- Rate limiting
- SQL injection prevention
- XSS prevention
**Data Management:**
- Soft deletes
- Audit trails
- Data exports
- Backups
- Migrations
**Production:**
- Health checks
- Monitoring
- Error tracking
- Logging
- Deployment config
## Notes
- Suggestions should be contextual (based on actual analysis)
- Always explain "why" not just "what"
- Provide specific commands, not generic advice
- Estimate time realistically (err on high side)
- Focus on high-impact, low-effort wins first
- Re-run suggestions after implementing to find new opportunities
- Combine with lvt:add-related-resources for resource suggestions
- Combine with lvt:production-ready for deployment suggestions