skills/debug/SKILL.md
Systematic error analysis for vibe-kit projects. Reads stack traces, greps relevant source files, identifies root cause, and proposes a targeted fix. Activated by vibe-fix. Uses sequential-thinking for multi-cause errors.
npx skillsauth add Hikkywannafly/vibe-kit debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Diagnose build, runtime, and Supabase errors in vibe-kit projects using a
structured read-grep-hypothesize-fix loop. Called by vibe-fix; not invoked
directly by users.
# Last build error
npm run build 2>&1 | tail -50
# Last dev server error
# Read from terminal output provided by user or vibe-fix
Extract from error output:
app/shop/page.tsx:34# Read specific lines around the error
# Use Read tool with offset=(line-10) and limit=30
# Find all usages of the failing function/import
grep -rn "functionName\|ImportName" --include="*.tsx" --include="*.ts" app/ lib/ components/
# Find where a type is defined
grep -rn "interface TypeName\|type TypeName" --include="*.ts" .
Apply sequential-thinking for errors with multiple possible causes:
Thought 1/3: Error message says X. Most likely cause: Y.
Thought 2/3: Checked file at line N. Confirmed: [null access / wrong type / missing import].
Thought 3/3 [FINAL]: Root cause is Z. Fix: [specific change].
State fix clearly before applying:
Nguyen nhan: [root cause in 1 sentence]
Sua: [what to change, where]
Apply the minimal change — do not refactor surrounding code.
npm run build
# or for runtime errors:
npm run dev
If build passes: report success to vibe-fix.
If build still fails: repeat from Step 1 with new error output (max 3 iterations).
| Category | First grep target |
|----------|------------------|
| Import error | grep -rn "from.*<module>" to find all import sites |
| Type error | Read the file at the reported line; check type annotations |
| Supabase error | Check .env.local keys; check table/column name spelling |
| undefined access | Look for missing ?. optional chaining or null checks |
| Async error | Check for missing await before async calls |
| CSS/Tailwind | Check class name spelling; verify tailwind.config.ts content paths |
After 3 failed fix attempts:
approval-plan to ask user for more contextdata-ai
Generate Vietnamese marketing copy, UI strings, CTAs, error messages, and email templates for vibe-kit projects. Tone: friendly, conversational, Southern Vietnamese style. Activated for any user-visible text generation.
development
One-shot orchestrator. Turns the prose after /vibe into a shipped product by clarifying intent, rendering a plan, gating on approval, then spawning planner+researcher+fullstack-dev+tester+reviewer agents in sequence. User-visible strings match the user's input language (Vietnamese by default for VN users). Two modes: SAFE (default — clarify + show plan + wait for approval, max 1 round-trip) and YOLO (skip clarify+approval, run full auto with smart defaults — for demos and power users). YOLO triggers: prose contains `yolo`, `nhanh nha`, `lam luon`, `khoi hoi`, `auto`, or args start with `yolo`. Trigger phrases (EN + VN): "build me a site", "make me a landing page", "create a shop", "I need an app", "vibe lam website", "tao cho toi mot", "xay dung shop online", "lam landing page", "can mot app".
tools
On-demand security audit for vibe-kit projects. Stack-aware checks for Next.js App Router + Supabase + Polar: secrets leak, RLS gaps, service-role key in client bundle, missing webhook signature verification, unprotected API routes, weak headers, dependency vulns. Outputs a Vietnamese P0/P1/P2 report with file:line + fix hints. User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "check security", "audit it", "security scan", "is this safe to launch", "kiem tra bao mat", "quet bao mat", "audit du an", "co an toan khong", "scan bao mat truoc khi deploy".
tools
Wire Supabase JS client into a React Native (Expo) vibe-kit project: session persistence via AsyncStorage, magic-link OAuth callback via expo-linking deep links, Realtime subscriptions on RN, and shared TypeScript types with the Next.js webapp twin (vibe-kit's typical web<->mobile pair pattern). This is the mobile counterpart of `auth-magic-link` (web). User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "supabase react native", "supabase mobile", "auth mobile expo", "magic link mobile", "tich hop supabase vao app", "supabase deep link".