/lovable:test-syncfrom lovable
Detects code changes since last sync, identifies coverage gaps, and interactively creates test plans and unit tests. Supports --apply and --dry-run flags.
Ships in lovable. Installing the plugin adds it to Claude Code.
Find features added or changed since the last test sync that lack coverage, and update test plans (and unit tests) accordingly.
/lovable:test-sync # Interactive: show gaps, ask before creating
/lovable:test-sync --apply # Create suggested plans without asking per-plan
/lovable:test-sync --dry-run # Report coverage gaps only, change nothing
Read the testing skill (skills/testing/SKILL.md) and references/test-plan-format.md (formats) + references/test-wizard.md (how to derive plans from code).
Check workspace exists - else point to /lovable:test-init.
Detect changes since baseline:
git diff --name-only [last_synced_commit] HEAD
(testing.last_synced_commit from .lovable-agent/config.json. If missing/invalid, fall back to comparing the full scan against existing plans' covers: lists.)
Classify the changed files into features:
Compute coverage gaps:
covers: includes its filesstatus: deprecated*.test.* files (if the project has a test framework)Report:
🔄 Test Sync - changes since [commit] ([date], [N] commits)
New features without test plans:
1. Password reset flow (src/pages/ResetPassword.tsx) → suggest TP-008
2. Export to CSV (src/components/ExportButton.tsx, export-csv function) → suggest TP-009
Stale plans (covered code changed):
- TP-003 Create a project - form gained a "category" field → update steps
Orphaned: none
Unit test gaps: src/lib/csv.ts has no tests
Create/update these? (all / pick numbers / skip)
With --dry-run: stop here.
Apply (interactive confirmation unless --apply):
test-plan-format.md (read the actual code for real steps; assign next IDs from plan_counter)covers:, updated: date)status: deprecated.lovable-agent/config.json: testing.last_synced_commit = current HEAD, testing.last_synced_at, and testing.plan_counterLast Test Sync in CLAUDE.md's Preview Testing sectionOffer a run: "Run the new/updated plans now? → /lovable:test-run --changed"
Proactively suggest /lovable:test-sync when:
test_after_implementation: offlast_synced_commit is many commits behind HEADWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub 10k-digital/lovable-agent-skills --plugin lovable14 commands in this plugin
/apply-migrationApply Database MigrationCheck for pending database migrations and provide Lovable prompts to apply them./connect-mcpConnect Lovable MCPConnect Lovable MCP to Claude for faster, more reliable yolo mode deployments without browser automation./deploy-edgeDeploy Edge FunctionsCheck for Edge Function changes and provide Lovable deployment prompts.Other plugins' commands for the same job