agentleFS
ribato22ribato22/vibecheck/skills/fix/SKILL.md

fix

Skill3 starsChanged 15 days agoMITView on GitHub

Fixes the problems found by a vibecheck audit, one at a time and safest-first. Moves leaked keys server-side and walks the user through rotating them, adds Supabase RLS policies, locks down Firebase rules, adds server-side auth and ownership checks, rate limits and payment-webhook verification, then re-checks and shows the before → after Launch Score. Use after /vibecheck:check, or when the user asks to fix vibecheck findings, fix the security issues in the report, or "make it safe to launch".

  • Reads credentials

82 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use feature, frontend-code-review and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bradtraversySkill

    feature

    Manage current feature workflow - start, review, explain or complete

    Also in 10 projects that use this

  • chendongqiSkill

    frontend-code-review

    Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.

    Also in 4 projects that use this

  • GoogleSkill

    pr-creator

    Also in 4 projects that use this

  • PJuniszewskiSkill

    cook

    Feature development with guardrails. Plan → Review → Code → Ship.

    Also in 3 projects that use this

  • vbrevikSkill

    work

    Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    test

    Also in 12 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 75 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read .vibecheck/report.md, and .vibecheck/deploy.md for VC-DEPLOY-* findings.

    line 13
  2. Very specific:

    No git: offer git init plus an initial commit.

    line 20
  3. Distinctive:

    Make the smallest change that removes the root cause: Follow the project's existing patterns, libraries and style.

    line 28
  4. Distinctive:

    run the project's type-check, lint and tests if they exist.

    line 31
  5. Distinctive:

    Never paste a secret into chat, the report or a commit message.

    line 42
  6. Distinctive:

    Stay inside the finding: Don't edit files the fix doesn't need (other features, docs, build, QA or packaging scripts) without asking first.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 75 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

vibecheck fix

Turn the audit into a safe app without breaking it. Small, verified, reversible steps.

0. Load the findings

  • Read .vibecheck/report.md, and .vibecheck/deploy.md for VC-DEPLOY-* findings. If neither exists, run the check skill in quick mode first (or deploy, if the user is fixing a deploy). Code changes since the report? Re-check each finding before touching it.
  • Scope from $ARGUMENTS: a finding ID (VC-DB-NO-RLS), a severity (critical, high), or all. Default: every critical, then every high.
  • Show the user the plan in plain words: which findings, what will change, what they'll need to do themselves (rotate keys, apply a migration, change a dashboard setting). Get a yes before editing.

1. Safety net first

  • In a git repo with uncommitted changes: suggest committing or stashing first, so every fix is its own clean diff. Ask; don't commit for them unasked.
  • No git: offer git init plus an initial commit. It's the undo button if a fix goes wrong. If they'd rather not, copy each file you'll change into .vibecheck/backup-<finding-id>/ before editing it, and tell them where the copies are.

2. Fix one finding at a time

For each finding, in severity order:

  1. Re-read the code around the finding. Understand the data flow before changing it.
  2. Say what you'll do in one or two plain sentences.
  3. Make the smallest change that removes the root cause. Follow the project's existing patterns, libraries and style. No drive-by refactors, renames or upgrades.
  4. Verify it:
    • re-run the scanner (node "${CLAUDE_SKILL_DIR}/../check/scripts/scan.mjs" --json, or the copy wherever the check skill lives) and confirm the lead is gone;
    • run the project's type-check, lint and tests if they exist. Ask first if they're slow or call external services;
    • trace the original attack again by reading the new code. Does it fail now?
  5. Record it in .vibecheck/report.md: ✅ FIXED: <what changed, files> or 👤 NEEDS YOU: <exact steps>.

New dependency needed (a rate limiter, zod, DOMPurify)? Name it and why, and ask before installing.

3. Never do this

  • Never "fix" by weakening: no using (true), no disabling RLS or rules, no removing a check that blocks the app, no catch-and-ignore, no deleting the feature, no moving a secret into a NEXT_PUBLIC_/VITE_ var to "make it work".
  • Never rotate keys, change dashboard settings or run SQL against production yourself. Write the migration and the steps; the user applies them.
  • Never rewrite git history or force-push without an explicit yes, and only after the leaked key is rotated (rotation is what actually protects them).
  • Never paste a secret into chat, the report or a commit message.
  • Stay inside the finding. Don't edit files the fix doesn't need (other features, docs, build, QA or packaging scripts) without asking first. If something else should change, say what and why, and wait for a yes.
  • Don't restart, stop or redeploy processes you didn't start. Running dev servers, workers and deployed apps keep the old code until they restart: tell the user what to restart, and that unsaved demo state may be lost.

4. Recipes

Details per stack are in the check skill's references/stacks/*.md. Read the matching file before fixing.

FindingFix
Leaked secret (VC-KEY-*, VC-ENV-PUBLIC-SECRET, VC-ENV-TRACKED, VC-ENV-HISTORY)1) User revokes and recreates the key at the provider (give the dashboard location). 2) Store it in .env without a public prefix plus the host's env settings. 3) Move the code that uses it to the server. 4) Make sure .gitignore has .env* / !.env.example; git rm --cached tracked env files. 5) Optional, with consent: purge history with git filter-repo --invert-paths --path <file>, then force-push.
No RLS / open policy (VC-DB-*)New migration in supabase/migrations/<timestamp>_vibecheck_rls.sql: enable RLS and add owner policies in the same file (RLS without policies makes the app look broken). Protect privileged columns. User applies it with supabase db push or the SQL Editor, then tests as a normal user.
Open Firebase rulesOwner-scoped rules (see firebase.md). User deploys with firebase deploy --only firestore:rules,storage and tests in the Rules Playground.
Missing auth / IDORVerify the session on the server at the top of the handler; scope queries with the user ID (where: { id, userId }); return 401 / 403 / 404.
No rate limit (VC-MONEY-NO-RATE-LIMIT)Serverless: @upstash/ratelimit. Long-running Node: express-rate-limit. Python: slowapi / flask-limiter. Key by user ID, falling back to IP. Plus max tokens and an input cap. Remind the user to set provider spend limits.
AI called from the browser (VC-AI-BROWSER)Server route with auth + rate limit + max tokens. The client calls the route. Remove dangerouslyAllowBrowser.
Unverified webhook / client price / success-URL grants (VC-PAY-*)constructEvent on the raw body (or the provider's equivalent); fulfil from the webhook; look prices up by ID on the server; make the handler idempotent.
SQL injection / mass assignmentParameterized queries; explicit field picking with zod.
XSSSanitize with DOMPurify, or render as text.
Deploy breakers (VC-DEPLOY-*)Match the import to the file's exact letter case (and git mv a case-only rename); npm install undeclared packages and commit the lockfile; replace hardcoded localhost with an env var; listen on process.env.PORT and bind 0.0.0.0 in production; add prisma generate to the build; move SQLite or disk writes to a hosted database or object storage; one lockfile; one Node version. Env vars missing on the host are a "needs you" item: give the names, never the values.
Launch basics (VC-LAUNCH-*)Generate a privacy policy and terms draft (mark them "review with a lawyer"), OG metadata, robots, sitemap, 404, favicon placeholder. Batch these in one step after the security fixes.

5. Finish

Re-run the check skill in quick mode (or full if the user wants) and show the change:

🛠️ vibecheck fix: 31 → 86/100 · 🔴 NO-GO → 🟢 GO
✅ Fixed (7): VC-KEY-OPENAI, VC-DB-NO-RLS (messages), VC-PAY-WEBHOOK-UNVERIFIED, …
👤 Needs you (3):
  1. Rotate the OpenAI key: platform.openai.com → API keys
  2. Apply supabase/migrations/20261028_vibecheck_rls.sql (supabase db push)
  3. Set a monthly spend limit at OpenAI and Vercel
Then restart your dev server and redeploy, so the fixed code and new env vars are what actually runs.

Remind them a GO is only GO after the "needs you" items are done and the app is redeployed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.