Initialize Lovable project context. Scans repo, asks questions, generates CLAUDE.md with project-specific configuration.
Scans your Lovable project to understand its structure, asks targeted questions about backend setup and configuration, then generates a CLAUDE.md file with project-specific rules, secrets, and edge function documentation. Use this when starting work on any Lovable.dev project to properly configure Claude Code's context.
/plugin marketplace add 10K-Digital/lovable-claude-code/plugin install 10k-digital-lovable@10K-Digital/lovable-claude-codeSet up Claude Code to work with this Lovable.dev project.
Read the lovable skill for full context on integration patterns.
Scan the repository to understand structure:
supabase/ foldersupabase/functions/supabase/migrations/src/integrations/supabase/client.ts for configpackage.json for project name.env.example to identify secretsAsk questions ONE at a time using the ask_user tool:
Is your Lovable project using:
A) Lovable Cloud (backend managed by Lovable - no Supabase dashboard access)
B) Your own Supabase project (direct dashboard access)
Reply A or B:
What is your Lovable production URL?
(e.g., https://my-app.lovable.app or custom domain)
What is the GitHub repository URL?
What is your Supabase project reference ID?
(Supabase Dashboard → Project Settings → General)
I found references to these secrets in the code:
[list detected]
Any additional secrets? (names only, not values)
I found these Edge Functions:
[list]
Any special context I should know?
(e.g., "send-email uses Resend", "payments handles Stripe webhooks")
Want me to document main database tables? (yes/no)
Any project conventions or special instructions?
⚠️ YOLO MODE (BETA) - Browser Automation for Lovable
This feature can automatically submit Lovable prompts using browser automation.
Benefits:
✅ No manual copy-paste needed
✅ Automatic deployment verification
✅ Saves time on every deployment
Risks:
⚠️ Beta feature - may have bugs
⚠️ Requires Chrome extension (Claude in Chrome)
⚠️ Lovable UI changes may break automation
⚠️ Always has manual fallback if automation fails
Enable yolo mode? (yes/no)
Default: no
If user answers "yes", ask Question 10. If "no", skip to CLAUDE.md generation.
Enable automated testing after deployments?
Testing levels:
- Level 1: Basic verification (check logs via Lovable)
- Level 2: Console error checking (monitor production URL)
- Level 3: Functional testing (test endpoints/queries)
This adds 1-3 minutes per deployment but catches issues early.
Enable testing? (yes/no)
Default: yes
What is your Lovable project URL?
(e.g., https://lovable.dev/projects/abc123)
This is required for browser automation.
Generate CLAUDE.md in project root with gathered info.
Confirm setup with summary.
# CLAUDE.md - Lovable Project Context
## Project Overview
- **Name**: [from package.json]
- **Production URL**: [user input]
- **Lovable Project URL**: [if yolo mode enabled]
- **GitHub**: [user input]
- **Backend**: [Lovable Cloud / Own Supabase]
## Workflow Rules
### ✅ Safe to edit and push to `main`:
- All `src/` files
- Config files
- Edge Function code (deployment needs Lovable)
### ⚠️ Requires Lovable prompt after edit:
- Edge Functions → `"Deploy the [name] edge function"`
- Migrations → `"Apply pending migrations"`
### ❌ Must use Lovable:
- Create tables, RLS, storage buckets
- Add secrets (Cloud UI)
## Secrets
[list]
## Edge Functions
| Function | Purpose | Secrets |
|----------|---------|---------|
[table]
## Database Tables
[if provided]
## Project Conventions
[user input]
## Yolo Mode Configuration (Beta)
[ONLY include if user enabled yolo mode]
> ⚠️ Beta feature - uses browser automation to auto-submit Lovable prompts
- **Status**: [on/off based on Q9 answer]
- **Testing**: [on/off based on Q10 answer, default: on]
- **Debug Mode**: off
- **Last Updated**: [current timestamp]
- **Operations Covered**:
- Edge function deployment
- Migration application
**Configure:** Run `/lovable:yolo on/off [--testing|--no-testing] [--debug]`
**How it works:**
- When yolo mode is on, I'll automatically navigate to Lovable and submit prompts
- Testing verifies deployments (3 levels: basic, console errors, functional)
- Debug mode shows detailed browser automation logs
- Always has manual fallback if automation fails
## Quick Prompts
| Task | Prompt |
|------|--------|
| Deploy functions | "Deploy all edge functions" |
| Apply migrations | "Apply pending Supabase migrations" |
| Check logs | "Show logs for [name] edge function" |
---
*Generated by /lovable:init on [date]*