可爱的
- 作者仓库星标 11
- 作者仓库 lovable-claude-code
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @10K-Digital · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Lovable Integration Skill
This skill enables Claude Code to work effectively with Lovable.dev projects while respecting Lovable's deployment requirements.
## When to Use This Skill
Activate when:
- User mentions "Lovable" or "lovable.dev"
- Project has `supabase/` directory with Edge Functions
- User asks to deploy edge functions
- User creates database migrations
- User asks about Lovable Cloud or backend deployment
- Project appears to be a Lovable project (React + Supabase structure)
## Core Concept
Lovable uses **two-way GitHub sync** on the `main` branch only:
- Frontend code syncs automatically
- Backend operations (Edge Functions, migrations, RLS) require Lovable prompts
## What Syncs Automatically (GitHub → Lovable)
✅ Edit freely and push to `main`:
- `src/` - All React components, pages, hooks, utils
- `public/` - Static assets
- Config files - vite.config.ts, tailwind.config.js, tsconfig.json
- `package.json` - Dependencies
- `supabase/functions/*/index.ts` - Edge Function **code** (not deployment)
- `supabase/migrations/*.sql` - Migration **files** (not application)
## What Requires Lovable Deployment
⚠️ After editing, provide Lovable prompt:
| Change Type | Lovable Prompt |
|-------------|----------------|
| Edge Function code | `"Deploy the [name] edge function"` |
| All Edge Functions | `"Deploy all edge functions"` |
| New migration file | `"Apply pending Supabase migrations"` |
| New table needed | `"Create a [name] table with columns: [list]"` |
| RLS policy | `"Enable RLS on [table] allowing [who] to [what]"` |
| Storage bucket | `"Create a [public/private] bucket called [name]"` |
| Secret/env var | Manual: Cloud → Secrets → Add |
## Response Format
When backend deployment is needed, always output:
```
📋 **LOVABLE PROMPT:**
> "[exact prompt to copy-paste]"
```
For destructive operations, add:
```
⚠️ **Warning**: [explanation of risk]
```
## File Structure Reference
```
project/
├── src/ # ✅ Safe - auto-syncs
│ ├── components/
│ ├── pages/
│ ├── hooks/
│ ├── lib/
│ └── integrations/supabase/
│ ├── client.ts # ⚠️ Has Supabase URLs
│ └── types.ts
├── supabase/
│ ├── functions/ # ✅ Edit code, ⚠️ needs deploy
│ │ └── [function-name]/
│ │ └── index.ts
│ ├── migrations/ # ✅ Create files, ⚠️ needs apply
│ │ └── YYYYMMDDHHMMSS_*.sql
│ └── config.toml # ⚠️ Lovable Cloud manages
├── .env # Local only - Lovable ignores
└── CLAUDE.md # Project context
```
## Backend Types
### Lovable Cloud
- Backend managed entirely by Lovable
- No Supabase dashboard access
- All operations via Lovable prompts
- Secrets in Cloud → Secrets UI
### Own Supabase
- Direct Supabase dashboard access
- Can use Supabase CLI: `supabase functions deploy`
- More flexibility but manual setup
## Quick Prompts Reference
### Edge Functions
```
"Deploy all edge functions"
"Deploy the send-email edge function"
"Create an edge function called [name] that [description]"
"Show logs for [name] edge function"
"The [name] edge function returns [error]. Fix it"
```
### Database
```
"Create a [name] table with columns: id (uuid), name (text), created_at (timestamp)"
"Add a [column] column of type [type] to [table]"
"Add foreign key from [table1].[col] to [table2].id"
"Apply pending Supabase migrations"
```
### RLS Policies
```
"Enable RLS on [table]"
"Add RLS policy on [table] allowing authenticated users to read all rows"
"Add RLS policy on [table] allowing users to only access their own rows"
```
### Storage
```
"Create a public storage bucket called [name]"
"Create a private storage bucket called [name]"
"Allow authenticated users to upload to [bucket]"
```
### Auth
```
"Enable Google authentication"
"Enable GitHub authentication"
"When user signs up, create row in profiles table"
```
## Branch Rules
- **Only `main` syncs** with Lovable
- Feature branches don't deploy until merged
- Lovable syncs within 1-2 minutes of push
## Yolo Mode - Automated Deployments (Beta)
When `yolo_mode: on` in CLAUDE.md, deployments are automated via browser automation:
### How It Works
Instead of showing manual prompts, the **yolo skill** (`/skills/yolo/SKILL.md`) takes over:
1. Automatically navigates to Lovable.dev
2. Submits deployment prompts
3. Monitors for success/failure
4. Runs verification tests (if enabled)
5. Reports deployment summary
### When Yolo Mode Activates
- During `/lovable:deploy-edge` command
- During `/lovable:apply-migration` command
- When `yolo_mode: on` in CLAUDE.md
### Configure Yolo Mode
```
/lovable:yolo on # Enable with testing
/lovable:yolo on --no-testing # Enable without testing
/lovable:yolo on --debug # Enable with verbose logs
/lovable:yolo off # Disable
```
### Beta Status
⚠️ Yolo mode is in beta:
- Requires Claude in Chrome extension
- May have bugs or UI compatibility issues
- Always has manual fallback
- See `/skills/yolo/SKILL.md` for details
## Debugging Checklist
1. **Frontend not updating?**
- On `main` branch?
- Changes pushed?
- Wait 1-2 min
2. **Edge Function not working?**
- Deployed via Lovable (or yolo mode)?
- Secrets set in Cloud UI?
- Check logs in Lovable
3. **Database query failing?**
- Migration applied (via Lovable or yolo mode)?
- RLS policies correct?
- Table exists?
4. **Yolo mode not working?**
- Check `yolo_mode: on` in CLAUDE.md
- Chrome extension installed?
- Logged into Lovable?
- See yolo skill for troubleshooting
章节与文件索引
按说明文件中的顺序排列。
何时使用此技能
核心理念
自动同步的内容 (GitHub → Lovable)
什么需要可爱的部署
响应格式
文件/命令 -> supabase/ · main · src/ · public/ · package.json · supabase/functions/*/index.ts · supabase/migrations/*.sql · "Deploy the [name] edge function"
内容校验值 -> dff146068eb2
当前原文的自动摘译,尚未人工审校。
何时使用此技能
激活时间: 用户提及“Lovable”或“lovable.dev” 项目具有包含边缘功能的
supabase/目录 用户要求部署边缘功能 用户创建数据库迁移核心理念
Lovable 仅在
main分支上使用双向 GitHub 同步: 前端代码自动同步 后端操作(边缘功能、迁移、RLS)需要 Lovable 提示自动同步的内容 (GitHub → Lovable)
✅ 自由编辑并推送到
main:src/- 所有 React 组件、页面、钩子、utilspublic/- 静态资源 配置文件 - vite.config.ts、tailwind.config.js、tsconfig.jsonpackage.json- 依赖项什么需要可爱的部署
⚠️编辑完成后,提供可爱提示:更改类型·可爱提示边缘功能代码·
"Deploy the [name] edge function"所有边缘功能·"Deploy all edge functions"新迁移文件·"Apply pending Supabase migrations"响应格式
需要后端部署时,始终输出: 对于破坏性操作,添加: