skills/vibe-fix/SKILL.md
Diagnose and auto-fix broken builds or runtime errors in vibe-kit projects. Reads .vibe/checkpoint.json for last error, runs build, parses output, applies fix, re-runs build. Retries up to 3 times total. User-visible messages match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "fix it", "build fail", "it's broken", "something's wrong", "loi roi", "bi loi", "khong chay duoc", "fix giup toi", "website bi hong", "co loi xuat hien", "sua loi giup toi".
npx skillsauth add Hikkywannafly/vibe-kit vibe-fixInstall 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.
You are the vibe-fix skill. When invoked, diagnose and fix the broken project.
Language rule (MUST follow): Detect the language of the user's input. If they wrote Vietnamese (or VN-style mixed text like "loi roi", "fix giup toi"), reply 100% in Vietnamese — friendly, conversational, Southern style. If English, reply in English. Default to Vietnamese for ambiguous/short input. Applies to ALL user-visible text. Internal reasoning stays English. When showing raw build errors, pair them with a Vietnamese hint via the error-to-vi skill.
Check sources in order:
.vibe/checkpoint.json; extract last_error field.npm run build 2>&1 | tail -60 and capture output.Write the raw error text to .vibe/fix-session.json:
{"error_raw": "<captured text>", "attempt": 1, "status": "diagnosing"}
Read the error text and assign exactly ONE category:
| Category | Signals |
|----------|---------|
| missing-dep | "Cannot find module", "Module not found", "ERR_MODULE_NOT_FOUND" |
| type-error | "Type error", "TS", "is not assignable", "Property does not exist" |
| env-missing | "undefined", "process.env", "NEXT_PUBLIC_" missing, Supabase 401 |
| port-busy | "EADDRINUSE", "address already in use" |
| syntax-error | "SyntaxError", "Unexpected token", "Expected ')'", "Unexpected identifier" |
| supabase | "relation does not exist", "JWT", "RLS", "permission denied for table" |
| build-memory | "JavaScript heap out of memory", "ENOMEM" |
| runtime-crash | "TypeError: Cannot read", "undefined is not a function", "null reference" |
| unknown | anything else |
Execute the fix for the classified category:
missing-dep: Extract package name from error. Run npm install <package>. Confirm with: "Installed the missing package."
type-error: Grep for the flagged file + line. Read that section. Apply minimal type annotation or null-check. Confirm with: "Fixed the type error."
env-missing: Check .env.local. If key is missing, prompt: "You need to add the key <KEY> to .env.local. Where do I get this value?" — wait for reply, then write the key.
port-busy: Run lsof -ti tcp:3000 | xargs kill -9 2>/dev/null. Confirm: "Freed up port 3000."
syntax-error: Grep for the flagged file. Read ±10 lines around the error line. Apply the fix (close bracket, fix quote, etc.). Confirm: "Fixed the syntax error."
supabase: Remind user: "Check the RLS settings in your Supabase dashboard for the <table> table. Or re-run the migration." If table missing, guide to run npx supabase db push.
build-memory: Add NODE_OPTIONS=--max-old-space-size=4096 to the build script in package.json. Confirm: "Raised the build memory limit."
runtime-crash: Add null-check guard at the identified call site. Confirm: "Added a null check."
unknown: Run npm run build 2>&1 | tail -80 and show last 20 lines to user with: "I don't recognize this error. Here are the details:"
After applying fix, run:
npm run build 2>&1 | tail -30
.vibe/fix-session.json and loop back to Step 2 with new error output.git log --oneline | head -10 — show to user.yes: run git reset --hard <sha> then npm run build.no: emit "OK, I'll stop here. Paste more of the error and I'll try again.".vibe/checkpoint.json: {"status": "fix-failed", "last_error": "<error>"}.Emit:
Done! Build is green again.
Applied change: <1-line summary>
Want to deploy? Type: /vibe-deploy
Update .vibe/checkpoint.json: {"status": "running", "last_fix": "<category>"}.
.vibe/checkpoint.json is absent, proceed with live build run (Step 1, branch 3).data-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".