checkmyvibe 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SKILL.md CHANGED
@@ -1,396 +1,405 @@
1
- ---
2
- name: checkmyvibe
3
- description: >
4
- Use this skill when the user asks to "check my vibe", run a production readiness check, review code quality, do a sanity check, check for exposed environment variables, or check if the app is ready to launch/ship, or runs a scoped check like `/checkmyvibe db`, `/checkmyvibe auth`, `/checkmyvibe secrets`, `/checkmyvibe payment`, `/checkmyvibe backend`, or `/checkmyvibe frontend`. Also trigger proactively when the agent is about to help deploy, publish, or push an application live, or when the codebase shows signs of AI-scaffolded patterns (Supabase/Firebase config, recently generated boilerplate, auth stubs, no existing verification) and the user has not had one done yet.
5
- ---
6
- # checkmyvibe — Production Readiness & Code Quality Check for Vibe-Coded Apps
7
-
8
- ## Why this skill exists
9
-
10
- AI coding tools optimize for "it works," not "it's production-ready." A feature can pass every
11
- manual test a non-technical founder runs — sign up, log in, place an order — and
12
- still leak every other user's data to a stranger who changes one number in a URL.
13
- This happens because AI-generated code frequently ships with scaffolding shortcuts
14
- that were meant to be temporary (a stub auth check, a permissive default database
15
- rule) and never get hardened before launch, precisely because the person building
16
- the app doesn't know those shortcuts exist or what to look for.
17
-
18
- Your job when this skill is active: think like an experienced software engineer doing a
19
- pre-launch quality review for a client who has never heard the words "IDOR" or "row-level
20
- security." Find the real, addressable configuration and logic issues. Explain them in plain
21
- language. Give exact fixes. Do not pad the report with theoretical concerns that don't apply
22
- to this specific codebase, and do not skip a check because the codebase "looks simple" —
23
- simple codebases are exactly where stubbed auth and hardcoded secrets hide, because nobody
24
- expected them to hold real user data yet.
25
-
26
- ## Scope and honesty (read this before writing any report)
27
-
28
- This is a first-pass review for known, documented scaffolding failure patterns. It is not a
29
- comprehensive external validation, and it does not cover infrastructure hosting, third-party package
30
- issues, or novel/business-logic-specific flaws outside the categories below. Never tell the user their app is completely "secure" or "safe" in an unqualified way.
31
- The correct language is "no issues found in this pass" or "ready to ship as far as
32
- these checks go" — always paired with the scope reminder in the Final Summary
33
- section. If the app appears to handle payments, health data, or other regulated
34
- data, say explicitly that a professional verification is strongly recommended regardless
35
- of what this pass finds.
36
-
37
- ## Scope selection
38
-
39
- checkmyvibe supports targeted/scoped scanning for rapid iteration during development, as well as full audits before release. When a specific scope or slash command is specified, execute only the mapped checks:
40
-
41
- | Scope / Command Keyword | Included Checks | Description / Focus Area |
42
- | :--- | :--- | :--- |
43
- | **`secrets`** | **Check 1a + Check 1b + Check 2** | Server-side and client-exposed credentials, API keys, tokens, and `.gitignore` file protection |
44
- | **`auth`** | **Check 3** | Missing, mock, stubbed, or bypassed authentication guards |
45
- | **`db`** | **Check 4** | Database & BaaS rules, Supabase RLS policies, Firebase/storage permissions |
46
- | **`backend`** | **Check 1a + Check 3 + Check 4 + Check 5 + Check 6 (server-side) + Check 7 (server-side)** | All server-side logic: hardcoded server credentials, auth guards, database configs, IDOR/BOLA, SQLi/input validation, mass assignment, and payment/webhook processing |
47
- | **`frontend`** | **Check 1b + Check 3 (client-side view) + Check 7 (client-side view)** | Client-side bundle leaks, UI-only auth hiding, and client-controlled payment/pricing logic |
48
- | **`payment`** | **Check 7** | Client-side payment amount tampering, price overrides, unverified webhooks, and checkout integrity |
49
- | *(no argument / `full`)* | **All Checks (1a–7)** | Full production readiness and code quality audit |
50
-
51
- > **Canonical definitions note:** The check definitions in this file are canonical. The scoped command files (`commands/checkmyvibe-*.md`) contain mirrored copies of their relevant checks so they can run standalone. When you change what a check does, update it here AND in every command file that mirrors it.
52
-
53
- ### Rules for Scoped Runs:
54
- - **Execute only the selected checks:** Do not run unselected check scripts or inspect code outside the chosen scope.
55
- - **Explicit scope transparency:** At the start and in the final summary of the report, clearly state which checks were run and which checks were skipped.
56
- - **No false safety claims:** A clean scoped scan does **not** mean the app is ready for production. State clearly: *"This was a [scope]-only check. Run a full `/checkmyvibe` audit across all categories prior to launch."*
57
-
58
- ## Before you start
59
-
60
- 1. **Analyze and understand the whole project first:** Walk the directory tree and analyze the repository configuration files before running any checks, generating findings, or providing instructions. Establish a solid high-level understanding of the architecture, components, and data flow.
61
- 2. Identify the stack: what backend/framework, what database or BaaS provider
62
- (Supabase, Firebase, custom Postgres, etc.), what auth approach is in use.
63
- This changes which checks apply and how to phrase findings.
64
- 3. Identify what data the app handles: user accounts, payments, health data,
65
- messages between users, files. This changes severity judgments — the same
66
- missing check is more severe on an app handling payment data than on a toy
67
- to-do list.
68
- 4. Run the checks below in order. Use the bundled scripts where noted. For
69
- everything else, read the actual code — don't rely on file names alone.
70
-
71
- ---
72
-
73
- ## Supported stacks to recognize
74
-
75
- Common stacks this skill should expect include: Next.js, Express, FastAPI, Supabase, Firebase, Prisma, Postgres, MongoDB, Clerk, NextAuth, Stripe, and common app patterns built around them.
76
-
77
- ## Evidence and confidence rules
78
-
79
- - Only flag something when there is evidence in the code.
80
- - Do not guess from filenames, comments, or variable names alone.
81
- - If something looks suspicious but is not fully proven, mark it with a confidence tag such as `High confidence`, `Medium confidence`, or `Needs manual review`.
82
- - Do not overflag. Prefer one precise finding over several weak or duplicate ones.
83
-
84
- ## Fix priority
85
-
86
- When multiple issues are found, sort them in this order:
87
- Critical user exposure > auth bypass > IDOR > payment logic > config issues > hygiene.
88
-
89
- ## What success looks like
90
-
91
- The report should help the coding agent make the repo safer in the next commit, not just describe problems.
92
-
93
- ## Check 1a: Server-side secrets and credentials
94
-
95
- **Run the script** `scripts/scan_secrets.py` (located relative to this `SKILL.md` file) against the project root. It flags known key
96
- prefixes (`sk_live`, `sk_test`, `AIza`, `AKIA`, `ghp_`, `xox[bp]`), high-entropy
97
- strings, and variable assignments where a name like `key`, `secret`, `token`, or
98
- `password` is set to a literal string instead of `process.env.X` or equivalent.
99
-
100
- **What counts as a finding:**
101
-
102
- - A real credential committed directly in server-side source, e.g.:
103
- `const stripeKey = "sk_live_51H8x..."` — **Critical**
104
- - A **live** Stripe secret key (`sk_live_...`) anywhere in source — **Critical**, charges real cards
105
- - A **test** Stripe secret key (`sk_test_...`) committed in source — **Should Fix**, not production-critical but test keys still must not be committed; rotate if the repo has ever been shared
106
- - A server-only credential referenced in frontend code, or a Next.js env var
107
- missing the required server-only scoping (using a secret key where only
108
- `NEXT_PUBLIC_`-prefixed vars should appear) — **Critical**, this is directly shippable to every visitor's browser
109
-
110
- **What is NOT a finding (avoid false positives):**
111
-
112
- - Public/anon/publishable keys that are designed to be exposed client-side
113
- (Stripe publishable keys starting `pk_`, Supabase anon keys) — these are safe
114
- by design as long as server-side authorization (RLS, API checks) is correctly
115
- configured. Note this distinction explicitly in the report so the user isn't
116
- confused about why one key is fine and another isn't.
117
- - Example/placeholder values clearly meant as documentation, e.g. `"your-api-key-here"`
118
- - Fake credentials inside unit tests, fixtures, or mock files (the scripts already skip these directories; if you find one manually, do not report it)
119
-
120
- ## Check 1b: Client-exposed secrets (frontend scope view)
121
-
122
- This is the client-facing slice of Check 1a, used by the `frontend` scope. Focus on:
123
-
124
- - Secrets reachable from the client bundle: any secret referenced in frontend
125
- code, anything passed through `NEXT_PUBLIC_*` / `VITE_*` / `REACT_APP_*` env
126
- vars that isn't genuinely public, and secrets inlined in client config files.
127
- - Service-role keys (Supabase `service_role`, Firebase admin SDK private keys,
128
- OpenAI/Stripe secret keys) appearing anywhere under `src/`, `app/`,
129
- `components/`, `public/`, or client entry points — **Critical**.
130
-
131
- The severity rules and false-positive guidance from Check 1a apply unchanged.
132
-
133
- ## Check 2: .gitignore hygiene
134
-
135
- **Run the script** `scripts/check_gitignore.py` (located relative to this `SKILL.md` file) against the project root. It checks whether `.env`, `.env.local`, and
136
- similar files exist in the project and whether `.gitignore` actually excludes
137
- them (not just whether a `.gitignore` file exists — many AI-generated `.gitignore`
138
- files exist but miss the actual secret file).
139
-
140
- **What counts as a finding:**
141
-
142
- - `.env` present in the working directory and not listed in `.gitignore` —
143
- Critical, regardless of current contents
144
- - `.env` already committed to git history (check with a quick `git log --all --full-history -- .env` if git is available) — Critical, and note in the
145
- fix that removing it from `.gitignore` going forward is not enough; the
146
- secrets in git history must be rotated, since they're recoverable even after
147
- deletion
148
-
149
- ## Check 3: Missing or fake authentication
150
-
151
- **Run the script** `scripts/check_auth_patterns.py` (located relative to this `SKILL.md` file) against the project root as a first pass. Then search auth-related code (login handlers, middleware, route guards, session
152
- checks) for these patterns:
153
-
154
- **What counts as a finding:**
155
-
156
- - A function that always returns true/success regardless of input, e.g.:
157
- ```js
158
- function isAuthenticated(req) {
159
- return true; // TODO: implement real auth
160
- }
161
- ```
162
-
163
- Critical — this is a placeholder someone forgot to replace.
164
- - Naming that signals a stub: `mockAuth`, `fakeLogin`, `tempAuth`, `bypassAuth`,
165
- `skipAuth`, `devAuth` still present in a codebase with no clear dev-only guard
166
- around it. If it IS properly guarded (e.g. `if (process.env.NODE_ENV === 'development')`), verify the guard is airtight and note it as Should Fix
167
- rather than Critical, since misconfigured environment variables in production
168
- are a common way these leak through anyway.
169
- - A protected route or API endpoint with no auth check at all — compare route
170
- definitions against which ones return or modify user-specific data.
171
- - Client-side-only auth checks — e.g. hiding a button in the UI if not logged in,
172
- but the underlying API endpoint doesn't independently verify the session.
173
- This is Critical: anyone can call the API directly, bypassing the UI entirely.
174
- - Auth checks present but commented out, with a bypass left active nearby.
175
-
176
- **Judgment note:** this check benefits most from your own reasoning rather than
177
- pure pattern matching, since real projects name things inconsistently. If
178
- something looks like it might be a stub but you're not certain, read the
179
- function body fully before deciding — don't flag based on the name alone, and
180
- don't clear something based on the name alone either.
181
-
182
- ## Check 4: Database and backend-as-a-service misconfiguration
183
-
184
- **Run the script** `scripts/check_db_config.py` (located relative to this `SKILL.md` file) against the project root as a first pass.
185
-
186
- If the project uses **Supabase**: check for row-level security (RLS) policies on
187
- every table that holds user-specific data. A table with RLS disabled, or enabled
188
- with a policy like `USING (true)` for `SELECT`/`UPDATE`/`DELETE`, means any
189
- authenticated (or even anonymous) user can read or modify every row.
190
-
191
- ```sql
192
- -- Finding example: this policy applies to ALL rows for ALL users
193
- CREATE POLICY "allow all" ON orders FOR SELECT USING (true);
194
-
195
- -- Correct pattern to recommend as the fix:
196
- CREATE POLICY "users see own orders" ON orders
197
- FOR SELECT USING (auth.uid() = user_id);
198
- ```
199
-
200
- If the project uses **Firebase**: check `firestore.rules` or `storage.rules` for
201
- default-allow states, e.g. `allow read, write: if true;` on collections holding
202
- user data, or rules left at the Firebase default test-mode state (which expires
203
- but is often copy-pasted into production-like configs).
204
-
205
- **Storage buckets**: check whether file storage (Supabase Storage, Firebase
206
- Storage, S3) is set to public when it holds user-uploaded content that should be
207
- private (profile documents, private images, receipts).
208
-
209
- ## Check 5: Broken object-level authorization (IDOR)
210
-
211
- This is the single most common serious flaw in vibe-coded apps and the one most
212
- worth spending real time on. The pattern: an endpoint takes an ID from the
213
- request and fetches/modifies a resource using that ID, without checking the
214
- resource actually belongs to the requesting user.
215
-
216
- ```js
217
- // Finding example — Critical
218
- app.get('/api/orders/:id', requireAuth, async (req, res) => {
219
- const order = await db.query('SELECT * FROM orders WHERE id = $1', [req.params.id]);
220
- res.json(order); // any logged-in user can read ANY order by guessing/incrementing the id
221
- });
222
-
223
- // Correct pattern to recommend as the fix
224
- app.get('/api/orders/:id', requireAuth, async (req, res) => {
225
- const order = await db.query(
226
- 'SELECT * FROM orders WHERE id = $1 AND user_id = $2',
227
- [req.params.id, req.user.id]
228
- );
229
- if (!order) return res.status(404).json({ error: 'Not found' });
230
- res.json(order);
231
- });
232
- ```
233
-
234
- Check every route that takes an ID as a URL param, query string, or body field
235
- and touches a database record. This applies to GET (data exposure), PUT/PATCH
236
- (unauthorized modification), and DELETE (unauthorized deletion) — all three are
237
- common and DELETE is often the most damaging.
238
-
239
- ## Check 6: Unvalidated inputs
240
-
241
- Spot-check forms and API endpoints for:
242
-
243
- - No type or length validation on inputs before they're stored or used
244
- - User input passed into a database query via string concatenation rather than
245
- parameterized queries/an ORM (SQL injection risk)
246
- - User input rendered into HTML without escaping (XSS risk), especially in
247
- frameworks that don't auto-escape by default
248
- - File uploads with no restriction on file type or size
249
- - **Mass assignment:** request bodies spread directly into ORM create/update calls,
250
- e.g. `await prisma.user.update({ where: { id }, data: req.body })` — lets a user
251
- set fields they should never control (`role`, `plan`, `isAdmin`, `emailVerified`).
252
- Flag when the body is not explicitly whitelisted to safe fields. — Critical if a
253
- privileged field can be set, otherwise Should Fix
254
- - **No rate limiting on auth endpoints:** login, signup, password reset, and OTP
255
- endpoints with no throttle/attempt limit allow credential stuffing and SMS-cost
256
- abuse — Worth Reviewing at minimum, Should Fix for payment-handling apps
257
-
258
- This check doesn't need to be exhaustive — flag the clearest, highest-impact
259
- examples rather than every single form field, and note in the summary that a
260
- full input-validation review is a good idea if the codebase is large.
261
-
262
- ## Check 7: Client-side payment or pricing logic
263
-
264
- Search checkout/payment flows for the price, discount, or total being read from
265
- data the client controls (a hidden form field, a request body value, a query
266
- param) rather than looked up server-side from a trusted source.
267
-
268
- ```js
269
- // Finding example — Critical
270
- app.post('/api/checkout', async (req, res) => {
271
- const { productId, price } = req.body; // price is trusted from the client!
272
- await chargeCard(req.user.paymentMethod, price);
273
- });
274
-
275
- // Correct pattern to recommend as the fix
276
- app.post('/api/checkout', async (req, res) => {
277
- const { productId } = req.body;
278
- const product = await db.query('SELECT price FROM products WHERE id = $1', [productId]);
279
- await chargeCard(req.user.paymentMethod, product.price); // price comes from the server
280
- });
281
- ```
282
-
283
- Also check **payment webhook signature verification** — this is the sibling flaw to
284
- client-side pricing and just as common:
285
-
286
- - A webhook endpoint (Stripe, Firebase, PayPal, Razorpay) that reads the event body
287
- and acts on it **without verifying the signature first**. Anyone who finds the URL
288
- can POST `{ "type": "payment_intent.succeeded", ... }` and get their order marked paid.
289
- - Correct pattern (Express + Stripe):
290
- ```js
291
- app.post('/api/webhooks/stripe',
292
- express.raw({ type: 'application/json' }), // raw body required for signature check
293
- (req, res) => {
294
- const event = stripe.webhooks.constructEvent(
295
- req.body, req.headers['stripe-signature'], process.env.STRIPE_WEBHOOK_SECRET
296
- );
297
- // only now is the event trustworthy
298
- });
299
- ```
300
- - Equivalent checks: Firebase Cloud Functions `onRequest` deployed with secret
301
- headers compared server-side, PayPal webhook `verify-webhook-signature` API,
302
- Razorpay `verifyPaymentSignature`. If a webhook route exists and no signature
303
- verification call exists anywhere in the flow — **Critical**.
304
- - Discount/coupon values accepted from the client rather than looked up from a
305
- trusted source server-side — same severity as price tampering.
306
-
307
- ---
308
-
309
- ## Severity rubric
310
-
311
- - **Critical** — exploitable right now by any user or visitor, exposes real user
312
- data, or allows bypassing authentication or payment. Ship-blocking.
313
- - **Should Fix** — a genuine weakness that requires more specific conditions to
314
- exploit (e.g. requires knowing another user's exact ID, or only affects an
315
- admin-only route with a smaller blast radius), or a control that exists but is
316
- incomplete/inconsistent.
317
- - **Worth Reviewing** — best-practice gap with low immediate exploitability
318
- given the current app, but worth fixing before the app scales or handles more
319
- sensitive data.
320
-
321
- When in doubt between two levels, consider: could a stranger with no special
322
- access do real harm to a real user right now? If yes, Critical.
323
-
324
- ## Report format
325
-
326
- For every finding, use exactly this structure:
327
-
328
- - Include a short `Confidence:` line when the evidence is not fully conclusive.
329
- - Include a `Generated fix:` line when a direct code snippet or precise implementation step would help the agent patch the issue immediately.
330
-
331
- **[SEVERITY] Short title**
332
-
333
- - **What's wrong:** plain-English description, no jargon. If a technical term is
334
- unavoidable (e.g. "IDOR"), define it in one clause the first time it's used.
335
- - **Why it matters:** a concrete, real-world consequence a non-technical person
336
- would understand — not "this violates the principle of least privilege" but
337
- "a stranger could see another user's home address and order history just by
338
- changing a number in the browser's address bar."
339
- - **The fix:** a specific code snippet or precise instruction, not a vague
340
- suggestion like "add proper validation."
341
- - **File(s):** exact path and line number(s).
342
-
343
- ## After the checks
344
-
345
- Once the checks are complete, create a readiness review report. **The report must be written in clear, plain English, completely free of dense technical jargon, so that it is easily understandable by non-technical stakeholders (such as founders, clients, or project managers).** The report must include:
346
-
347
- - what was found
348
- - what is fixed already
349
- - how each fix was applied
350
- - what still needs attention
351
- - the final readiness verdict
352
-
353
- **Post-fix verification:** if you applied fixes during this session, re-run the scripts for every category you touched and confirm the finding is actually gone before marking it fixed in the report. Report before/after per check (e.g. "scan_secrets.py: 3 findings → 0 findings"). A fix that hasn't been re-scanned must be listed as "applied, not yet verified", never as resolved.
354
-
355
- If no issues are found, still produce a short report that says no blocking issues were found in this pass, which categories were checked, and what the remaining scope limits are.
356
-
357
- ## Example report style
358
-
359
- Use clear, direct wording like:
360
-
361
- **[Critical] Missing object-level authorization**
362
-
363
- - **What's wrong:** Any logged-in user can read another user's order by changing the order ID.
364
- - **Why it matters:** A stranger could see someone else's orders and personal details.
365
- - **The fix:** Add a user ownership check in the query and return 404 when the record does not belong to the current user.
366
- - **File(s):** `src/routes/orders.ts:42-58`
367
-
368
- ## Final summary
369
-
370
- End every review with, in this order:
371
-
372
- 1. Stack and data-sensitivity context noted at the start (one line)
373
- 2. Total findings by severity, e.g. "2 Critical, 3 Should Fix, 1 Worth Reviewing"
374
- 3. A one-line verdict: "Not ready to ship — fix the Critical items first" or "No
375
- blocking issues found in this pass — review the Should Fix items when you can"
376
- 4. The scope reminder:
377
- - **For Full Audit:** "This review covers common configuration patterns seen in AI-generated code — exposed secrets, auth stubs, database rules, object-level authorization, input validation, and client-side payment logic. It is not a comprehensive third-party safety audit or pentest. If this app handles payment, health, or other regulated data, get a professional external review before launch regardless of these results."
378
- - **For Scoped Scan:** "This was a focused [SCOPE]-only check ([LIST OF RUN CHECKS]). Skipped checks: [LIST OF SKIPPED CHECKS]. A clean scoped check does not mean the application is production-ready. Always run a full `/checkmyvibe` audit prior to release, and obtain a professional external security review if handling sensitive or regulated data."
379
-
380
- ## Notes for the agent
381
-
382
- - Always produce a review report after the check; do not stop at raw findings.
383
- - Write the entire report in clear, accessible language. Frame findings around concrete, real-world user consequences rather than abstract technical concepts. A non-technical stakeholder must be able to read the report and immediately understand the real-world danger.
384
- - The review should clearly separate what was found, what was fixed, how it was fixed, and what remains.
385
- - Always run the available scripts (located in the `scripts/` directory relative to this `SKILL.md` file) before relying on reasoning alone for Checks 1-4 — they exist so those specific checks are reliable and repeatable rather than dependent on re-deriving the logic every time.
386
- - If a script is missing, fails to run, or the language/stack isn't supported by
387
- it, say so explicitly in the report ("automated secret scan could not run;
388
- manually reviewed instead") rather than silently skipping the check.
389
- - Do not invent findings to seem thorough. If a check finds nothing, report "No
390
- issues found" for that category explicitly — silence looks like the check
391
- wasn't performed at all.
392
- - Do not flag the same underlying issue multiple times under different check
393
- categories — pick the most relevant category and reference it once.
394
- - If the codebase is large, prioritize routes and files that touch
395
- authentication, payments, and any endpoint returning data tied to a specific
396
- user ID — these are where real damage concentrates.
1
+ ---
2
+ name: checkmyvibe
3
+ description: >
4
+ Use this skill when the user asks to "check my vibe", run a production readiness check, review code quality, do a sanity check, check for exposed environment variables, or check if the app is ready to launch/ship, or runs a scoped check like `/checkmyvibe db`, `/checkmyvibe auth`, `/checkmyvibe secrets`, `/checkmyvibe payment`, `/checkmyvibe backend`, or `/checkmyvibe frontend`. Also trigger proactively when the agent is about to help deploy, publish, or push an application live, or when the codebase shows signs of AI-scaffolded patterns (Supabase/Firebase/Neon/Prisma/Drizzle config, Dodo Payments/Lemon Squeezy/Stripe, recently generated boilerplate, auth stubs, no existing verification) and the user has not had one done yet.
5
+ ---
6
+ # checkmyvibe — Production Readiness & Code Quality Check for Vibe-Coded Apps
7
+
8
+ ## Why this skill exists
9
+
10
+ AI coding tools optimize for "it works," not "it's production-ready." A feature can pass every
11
+ manual test a non-technical founder runs — sign up, log in, place an order — and
12
+ still leak every other user's data to a stranger who changes one number in a URL.
13
+ This happens because AI-generated code frequently ships with scaffolding shortcuts
14
+ that were meant to be temporary (a stub auth check, a permissive default database
15
+ rule, client-controlled price calculations, unverified webhooks) and never get hardened before launch, precisely because the person building
16
+ the app doesn't know those shortcuts exist or what to look for.
17
+
18
+ Your job when this skill is active: think like an experienced software engineer doing a
19
+ pre-launch quality review for a client who has never heard the words "IDOR" or "row-level
20
+ security." Find the real, addressable configuration and logic issues. Explain them in plain
21
+ language. Give exact fixes. Do not pad the report with theoretical concerns that don't apply
22
+ to this specific codebase, and do not skip a check because the codebase "looks simple" —
23
+ simple codebases are exactly where stubbed auth and hardcoded secrets hide, because nobody
24
+ expected them to hold real user data yet.
25
+
26
+ ## Scope and honesty (read this before writing any report)
27
+
28
+ This is a first-pass review for known, documented scaffolding failure patterns. It is not a
29
+ comprehensive external validation, and it does not cover infrastructure hosting, third-party package
30
+ issues, or novel/business-logic-specific flaws outside the categories below. Never tell the user their app is completely "secure" or "safe" in an unqualified way.
31
+ The correct language is "no issues found in this pass" or "ready to ship as far as
32
+ these checks go" — always paired with the scope reminder in the Final Summary
33
+ section. If the app appears to handle payments, health data, or other regulated
34
+ data, say explicitly that a professional verification is strongly recommended regardless
35
+ of what this pass finds.
36
+
37
+ ## Scope selection
38
+
39
+ checkmyvibe supports targeted/scoped scanning for rapid iteration during development, as well as full audits before release. When a specific scope or slash command is specified, execute only the mapped checks:
40
+
41
+ | Scope / Command Keyword | Included Checks | Description / Focus Area |
42
+ | :--- | :--- | :--- |
43
+ | **`secrets`** | **Check 1a + Check 1b + Check 2** | Server-side and client-exposed credentials, AI API keys, tokens, `.gitignore`, and `.dockerignore` file protection |
44
+ | **`auth`** | **Check 3** | Missing, mock, stubbed, or bypassed authentication guards, mock user returns, Clerk matchers, Supabase session checks |
45
+ | **`db`** | **Check 4** | Database & BaaS rules: Supabase RLS, Firebase rules, Neon pooling/SSL, Prisma/Drizzle schema hygiene, public SQLite files, NoSQL injection |
46
+ | **`backend`** | **Check 1a + Check 3 + Check 4 + Check 5 + Check 6 (server-side) + Check 7 (server-side)** | All server-side logic: hardcoded server credentials, auth guards, database configs, IDOR/BOLA (including Server Actions & multi-tenant), SSRF/SQLi/input validation, mass assignment, and payment/webhook processing |
47
+ | **`frontend`** | **Check 1b + Check 3 (client-side view) + Check 6 (DOM XSS / AI markdown) + Check 7 (client-side view)** | Client-side bundle leaks, RSC prop leaks, DOM XSS in AI markdown rendering, UI-only auth hiding, and client-controlled payment/pricing logic |
48
+ | **`payment`** | **Check 7** | Client-side payment amount tampering, price overrides, unverified webhooks (Stripe, Dodo Payments, Lemon Squeezy, Polar, Paddle, Razorpay), webhook idempotency, and subscription lifecycle |
49
+ | *(no argument / `full`)* | **All Checks (1a–7)** | Full production readiness and code quality audit |
50
+
51
+ > **Canonical definitions note:** The check definitions in this file are canonical. The scoped command files (`commands/checkmyvibe-*.md`) contain mirrored copies of their relevant checks so they can run standalone. When you change what a check does, update it here AND in every command file that mirrors it.
52
+
53
+ ### Rules for Scoped Runs:
54
+ - **Execute only the selected checks:** Do not run unselected check scripts or inspect code outside the chosen scope.
55
+ - **Explicit scope transparency:** At the start and in the final summary of the report, clearly state which checks were run and which checks were skipped.
56
+ - **No false safety claims:** A clean scoped scan does **not** mean the app is ready for production. State clearly: *"This was a [scope]-only check. Run a full `/checkmyvibe` audit across all categories prior to launch."*
57
+
58
+ ## Before you start
59
+
60
+ 1. **Analyze and understand the whole project first:** Walk the directory tree and analyze the repository configuration files before running any checks, generating findings, or providing instructions. Establish a solid high-level understanding of the architecture, components, and data flow.
61
+ 2. Identify the stack: what backend/framework (Next.js, Express, FastAPI), what database or BaaS provider (Supabase, Firebase, Neon, AWS RDS, Prisma, Drizzle, MongoDB, local SQLite/Postgres), what auth approach (Clerk, NextAuth, Supabase Auth, Firebase, custom JWT), what payment provider (Stripe, Dodo Payments, Lemon Squeezy, Polar, Paddle, Razorpay). This changes which checks apply and how to phrase findings.
62
+ 3. Identify what data the app handles: user accounts, payments, health data, messages between users, files. This changes severity judgments — the same missing check is more severe on an app handling payment data than on a toy to-do list.
63
+ 4. Run the checks below in order. Use the bundled scripts where noted. For everything else, read the actual code — don't rely on file names alone.
64
+
65
+ ---
66
+
67
+ ## Supported stacks to recognize
68
+
69
+ Common stacks this skill expects include: Next.js (Pages and App Router), Express, FastAPI, Django, Supabase, Firebase, Neon, Prisma, Drizzle, Postgres, MySQL, SQLite, MongoDB/Mongoose, Redis/Upstash, Convex, Clerk, NextAuth/Auth.js, Stripe, Dodo Payments, Lemon Squeezy, Polar.sh, Paddle, Razorpay, Resend, OpenAI/Anthropic/Groq SDKs, and common patterns built around them.
70
+
71
+ ## Evidence and confidence rules
72
+
73
+ - Only flag something when there is evidence in the code.
74
+ - Do not guess from filenames, comments, or variable names alone.
75
+ - If something looks suspicious but is not fully proven, mark it with a confidence tag such as `High confidence`, `Medium confidence`, or `Needs manual review`.
76
+ - Do not overflag. Prefer one precise finding over several weak or duplicate ones.
77
+
78
+ ## Fix priority
79
+
80
+ When multiple issues are found, sort them in this order:
81
+ Critical user exposure > auth bypass > IDOR > payment logic > config issues > hygiene.
82
+
83
+ ## What success looks like
84
+
85
+ The report should help the coding agent make the repo safer in the next commit, not just describe problems.
86
+
87
+ ---
88
+
89
+ ## Check 1a: Server-side secrets and credentials
90
+
91
+ **Run the script** `scripts/scan_secrets.py` (located relative to this `SKILL.md` file) against the project root. It flags known API key prefixes, JWT tokens with service roles, database connection URIs, high-entropy strings, and variable assignments where a name like `key`, `secret`, `token`, or `password` is set to a literal string instead of `process.env.X` or equivalent.
92
+
93
+ **What counts as a finding:**
94
+
95
+ - **Modern AI & Cloud Provider Keys:**
96
+ - OpenAI Project Keys (`sk-proj-...`, `sk-None-...`) — **Critical**
97
+ - Anthropic Claude Keys (`sk-ant-api03-...`) — **Critical**
98
+ - Groq (`gsk_...`), Perplexity (`pplx-...`), HuggingFace (`hf_...`) — **Critical**
99
+ - Resend Email API Keys (`re_...`) — **Critical** (mass spam and phishing abuse)
100
+ - Supabase `service_role` JWT (containing `"role":"service_role"`) — **Critical** (bypasses all Row-Level Security)
101
+ - Hardcoded Database Connection URIs (`postgres://user:pass@host...`, `mongodb+srv://...`) — **Critical**
102
+ - A **live** Stripe secret key (`sk_live_...`) anywhere in source — **Critical**, charges real cards
103
+ - A **test** Stripe secret key (`sk_test_...`) committed in source — **Should Fix**, not production-critical but test keys still must not be committed; rotate if the repo has ever been shared
104
+ - A server-only credential referenced in frontend code, or a Next.js env var missing the required server-only scoping (using a secret key where only `NEXT_PUBLIC_`-prefixed vars should appear) — **Critical**, this is directly shippable to every visitor's browser
105
+
106
+ **What is NOT a finding (avoid false positives):**
107
+
108
+ - Public/anon/publishable keys that are designed to be exposed client-side (Stripe publishable keys starting `pk_`, Supabase anon keys, Firebase apiKey) — these are safe by design as long as server-side authorization is correctly configured. Note this distinction explicitly in the report.
109
+ - Example/placeholder values clearly meant as documentation, e.g. `"your-api-key-here"`
110
+ - Fake credentials inside unit tests, fixtures, or mock files (the scripts already skip these directories; if you find one manually, do not report it)
111
+
112
+ ## Check 1b: Client-exposed secrets (frontend scope view)
113
+
114
+ This is the client-facing slice of Check 1a, used by the `frontend` scope. Focus on:
115
+
116
+ - Secrets reachable from the client bundle: any secret referenced in frontend code, anything passed through `NEXT_PUBLIC_*` / `VITE_*` / `REACT_APP_*` / `EXPO_PUBLIC_*` env vars that isn't genuinely public, and secrets inlined in client config files.
117
+ - **React Server Component (RSC) Prop Leaks:** In Next.js App Router, check if a Server Component imports a private secret and passes it as a prop to a client component (`<ClientComponent apiKey={process.env.PRIVATE_KEY} />`). Next.js serializes all props into the client HTML payload — **Critical**.
118
+ - Service-role keys (Supabase `service_role`, Firebase admin SDK private keys, OpenAI/Anthropic/Stripe secret keys) appearing anywhere under `src/`, `app/`, `components/`, `public/`, or client entry points — **Critical**.
119
+
120
+ The severity rules and false-positive guidance from Check 1a apply unchanged.
121
+
122
+ ## Check 2: .gitignore and .dockerignore hygiene
123
+
124
+ **Run the script** `scripts/check_gitignore.py` (located relative to this `SKILL.md` file) against the project root.
125
+
126
+ **What counts as a finding:**
127
+
128
+ - `.env`, `.env.local`, `.env.production` present in the working directory and not listed in `.gitignore` — **Critical**, regardless of current contents
129
+ - **Docker Risk:** A `Dockerfile` or `docker-compose.yml` exists, but `.env` is omitted from `.dockerignore` — **Critical** (causes secret environment files to be baked into public image layers on Docker Hub/GHCR)
130
+ - **NPM Auth Tokens:** An `.npmrc` file containing `_authToken=` committed to git — **Critical**
131
+ - `.env` already committed to git history (check with `git log --all --full-history -- .env` if git is available) — **Critical**, and note in the fix that removing it from `.gitignore` going forward is not enough; the secrets in git history must be rotated, since they're recoverable even after deletion
132
+
133
+ ## Check 3: Missing or fake authentication
134
+
135
+ **Run the script** `scripts/check_auth_patterns.py` (located relative to this `SKILL.md` file) against the project root as a first pass. Then search auth-related code (login handlers, middleware, route guards, session checks) for these patterns:
136
+
137
+ **What counts as a finding:**
138
+
139
+ - **Always-true stubs:** `function isAuthenticated(req) { return true; }`, `const checkAdmin = () => true` — **Critical**
140
+ - **Hardcoded mock user objects returned:**
141
+ ```js
142
+ function getCurrentUser() {
143
+ return { id: "mock-id", role: "admin" }; // Placeholder forgot to replace!
144
+ }
145
+ ```
146
+ Or middleware unconditionally setting `req.user = { id: 123 }` and calling `next()` — **Critical**
147
+ - **Stub-named helpers still wired in:** `mockAuth`, `fakeLogin`, `tempAuth`, `bypassAuth`, `devAuth` still present in a codebase with no clear dev-only guard around it. If properly guarded (e.g. `if (process.env.NODE_ENV === 'development')`), verify the guard is airtight and note it as **Should Fix**.
148
+ - **Provider-specific security gaps:**
149
+ - **Clerk:** Check `middleware.ts` matcher regexes. If API routes or sensitive subpaths are excluded from the matcher, or if Clerk v5 `auth.protect()` is omitted from API routes — **Critical**.
150
+ - **NextAuth / Auth.js:** Missing `AUTH_SECRET` / `NEXTAUTH_SECRET` in production configuration; exposing sensitive user properties or database credentials inside client session callbacks — **Should Fix**.
151
+ - **Supabase Auth:** Using `supabase.auth.getSession()` on the server (Server Components, API routes, Server Actions) instead of `supabase.auth.getUser()`. `getSession()` reads local cookies without re-validating the token with the Supabase Auth server — **Critical**.
152
+ - **Firebase Auth:** Client `auth.currentUser` trusted on server routes without server-side `admin.auth().verifyIdToken()`.
153
+ - **Protected routes with no auth check at all:** Compare route definitions against which ones return or modify user-specific data.
154
+ - **Client-side-only auth checks:** Hiding a button in the UI if not logged in, but the underlying API endpoint doesn't independently verify the session — **Critical**.
155
+ - **Cookie & Token Storage Security:** Auth tokens stored in browser `localStorage` (vulnerable to XSS token theft) rather than `httpOnly`, `Secure`, `SameSite=Lax/Strict` cookies — **Should Fix**.
156
+ - **Password hashing in custom auth:** Storing passwords in plaintext, or using outdated hash algorithms (MD5, SHA-1, plain SHA-256 without salt/work factor) instead of bcrypt or argon2 — **Critical**.
157
+
158
+ ## Check 4: Database and backend-as-a-service misconfiguration
159
+
160
+ **Run the script** `scripts/check_db_config.py` (located relative to this `SKILL.md` file) against the project root as a first pass.
161
+
162
+ Distinguish between two architecture models:
163
+
164
+ ### Branch A: Client-Exposed BaaS (Supabase, Firebase, Convex)
165
+ In these stacks, the browser connects directly to the database using an anonymous public API key. Security MUST be enforced at the database row/collection level:
166
+
167
+ - **Supabase:** Check for row-level security (RLS) policies on every table holding user-specific data. A table with RLS disabled, or enabled with a policy like `USING (true)` for `SELECT`/`UPDATE`/`DELETE` — **Critical**.
168
+ ```sql
169
+ -- Correct pattern:
170
+ CREATE POLICY "users see own orders" ON orders
171
+ FOR SELECT USING (auth.uid() = user_id);
172
+ ```
173
+ - **Firebase:** Check `firestore.rules` or `storage.rules` for default-allow states (`allow read, write: if true;`) on user data collections — **Critical**. Test-mode expiration rules (`if request.time < timestamp...`) — **Should Fix**. Check `database.rules.json` for `".read": "true"` — **Critical**.
174
+ - **Convex:** Ensure functions returning private data are defined as `internalQuery` or validate `ctx.auth.getUserIdentity()`.
175
+
176
+ ### Branch B: Server-Backed Databases & ORMs (Neon, AWS RDS, Prisma, Drizzle, Local DBs, Mongo)
177
+ In these stacks, client browsers never talk to the database directly; all queries flow through a backend server (Express, FastAPI, Next.js server):
178
+
179
+ - **Do NOT flag missing RLS on server-only tables:** Standard SQL migrations generated by Prisma or Drizzle do not require Postgres RLS if queries are filtered in backend application code.
180
+ - **Neon & Serverless Pooling:** Verify that serverless functions connect via connection pooling (e.g. `@neondatabase/serverless` or PgBouncer pooled connection strings). Direct unpooled Postgres connections in serverless routes cause connection exhaustion and crashes → **Should Fix**.
181
+ - **SSL / Transport Security:** Database connection URIs or pool configs with `sslmode=disable` or `rejectUnauthorized: false` transmit credentials and data in cleartext → **Critical** in production.
182
+ - **SQLite / Embedded DBs:** SQLite databases (`*.db`, `*.sqlite`, `*.sqlite3`) placed in web-accessible public folders (`public/`, `static/`) or committed to git allow arbitrary database download by any visitor → **Critical**.
183
+ - **MongoDB / NoSQL Injection:** Passing unescaped `req.body` or `req.query` directly into Mongoose/MongoDB query filters (e.g., `User.findOne(req.body)`) allows query selector injection (`{ "$gt": "" }` bypassing passwords) → **Critical**.
184
+
185
+ **Storage buckets:** Check whether file storage (Supabase Storage, Firebase Storage, S3) is set to public when it holds private user content (identification documents, invoices, private receipts) — **Critical**.
186
+
187
+ ## Check 5: Broken object-level authorization (IDOR / BOLA)
188
+
189
+ This is the single most common serious flaw in vibe-coded apps. Check every route, Next.js Server Action, or RPC procedure that takes an ID and touches a database record:
190
+
191
+ ```js
192
+ // Finding example — Critical
193
+ app.get('/api/orders/:id', requireAuth, async (req, res) => {
194
+ const order = await db.query('SELECT * FROM orders WHERE id = $1', [req.params.id]);
195
+ res.json(order); // any logged-in user can read ANY order by guessing/incrementing the id
196
+ });
197
+
198
+ // Correct pattern to recommend as the fix
199
+ app.get('/api/orders/:id', requireAuth, async (req, res) => {
200
+ const order = await db.query(
201
+ 'SELECT * FROM orders WHERE id = $1 AND user_id = $2',
202
+ [req.params.id, req.user.id]
203
+ );
204
+ if (!order) return res.status(404).json({ error: 'Not found' });
205
+ res.json(order);
206
+ });
207
+ ```
208
+
209
+ ### Advanced IDOR Patterns:
210
+ - **Multi-Tenant / Organization IDOR:** In B2B or team apps, verifying `organization_id = req.params.orgId` is NOT enough. You must verify that the requesting `req.user.id` is an active member/admin of `orgId` before executing the query — **Critical**.
211
+ - **Next.js Server Actions:** Functions marked `'use server'` (`export async function deleteDocument(docId)`) are public RPC endpoints. If user authentication and document ownership are not verified inside the function body, anyone can invoke the action remotely — **Critical**.
212
+ - **tRPC / GraphQL Resolvers:** Check that resolvers pulling resources by ID verify authorization in context rather than returning records purely by input ID.
213
+ - Check GET (data exposure), PUT/PATCH (unauthorized modification), and DELETE (unauthorized deletion) across all endpoints.
214
+
215
+ ## Check 6: Unvalidated inputs & server input handling
216
+
217
+ Spot-check forms, API endpoints, and server functions for:
218
+
219
+ - **Server-Side Request Forgery (SSRF):** Endpoints that fetch user-supplied URLs (link scrapers, webhooks, image proxies via `axios.get(req.body.url)` or `fetch()`). If URLs are not validated against private IP ranges (`127.0.0.1`, `localhost`, `169.254.169.254` AWS metadata, internal RFC1918 subnets), attackers can exfiltrate cloud credentials or hit internal services — **Critical**.
220
+ - **DOM XSS in AI Markdown Rendering:** Rendering LLM responses or user input using `dangerouslySetInnerHTML`, `v-html`, or markdown renderers (`react-markdown`, `marked`) without sanitization plugins (`rehype-sanitize` or DOMPurify) — **Critical**.
221
+ - **SQL built by string concatenation** instead of parameterized queries or ORM methods — **Critical**.
222
+ - **NoSQL / MongoDB injection:** Passing request objects straight to DB queries — **Critical**.
223
+ - **Mass assignment:** Request bodies spread directly into ORM create/update calls (`prisma.user.update({ where: { id }, data: req.body })`) — lets a user set privileged fields (`role`, `plan`, `isAdmin`, `emailVerified`) — **Critical** if a privileged field can be set, otherwise **Should Fix**.
224
+ - **CORS Misconfiguration:** Wildcard CORS reflection with credentials (`cors({ origin: '*', credentials: true })`) — **Critical**.
225
+ - **No rate limiting on auth endpoints:** Login, signup, password reset, and OTP endpoints with no throttle/attempt limit — **Should Fix** for payment-handling apps, **Worth Reviewing** otherwise.
226
+ - **File uploads with no restriction on file type or size.**
227
+
228
+ ## Check 7: Client-side payment logic, webhooks, & subscription lifecycle
229
+
230
+ **Run the script** `scripts/check_payment_config.py` (located relative to this `SKILL.md` file) against the project root as a first pass.
231
+
232
+ ### Step 1: Client-Side Price Trust
233
+ Search checkout flows for the price, discount, or total being read from data the client controls (`req.body.price`, `req.body.amount`, hidden form field) rather than looked up server-side from a trusted database record:
234
+
235
+ ```js
236
+ // Finding example — Critical
237
+ app.post('/api/checkout', async (req, res) => {
238
+ const { productId, price } = req.body; // price is trusted from the client!
239
+ await chargeCard(req.user.paymentMethod, price);
240
+ });
241
+
242
+ // Correct fix pattern
243
+ app.post('/api/checkout', async (req, res) => {
244
+ const { productId } = req.body;
245
+ const product = await db.query('SELECT price FROM products WHERE id = $1', [productId]);
246
+ await chargeCard(req.user.paymentMethod, product.price);
247
+ });
248
+ ```
249
+
250
+ ### Step 2: Webhook Signature Verification across Gateways
251
+ Every webhook endpoint (**Stripe**, **Lemon Squeezy**, **Dodo Payments**, **Polar**, **Paddle**, **Razorpay**, **PayPal**) must verify the cryptographic signature before trusting the event payload:
252
+ - **Stripe:** `stripe.webhooks.constructEvent(rawBody, sigHeader, secret)` with raw body parsing.
253
+ - **Lemon Squeezy:** Verify `x-signature` header via HMAC SHA-256.
254
+ - **Dodo Payments:** Verify webhook signature header via Dodo SDK or HMAC.
255
+ - **Paddle:** `paddle.webhooks.unmarshal` or HMAC check.
256
+ - **Razorpay:** `validateWebhookSignature` or HMAC SHA-256 check.
257
+ - An unverified webhook route — **Critical** (anyone can POST fake successful payments).
258
+
259
+ ### Step 3: Webhook Idempotency
260
+ Payment gateways retry webhooks when endpoints time out. If the handler does not record and check processed event IDs (`event.id`) in the database, retries will grant duplicate credits or fulfill duplicate orders — **Should Fix**.
261
+
262
+ ### Step 4: Subscription Revocation Lifecycle
263
+ AI apps frequently listen for `checkout.session.completed` to grant access, but omit handling for `customer.subscription.deleted`, `customer.subscription.updated`, `subscription_cancelled`, or `invoice.payment_failed`. If omitted, users retain paid access indefinitely after canceling — **Critical**.
264
+
265
+ ### Step 5: Billing Portal IDOR
266
+ Creating customer billing portal sessions (`billingPortal.sessions.create`) with `customerId` taken from `req.body` rather than from the authenticated session user's database record allows callers to manage or cancel other customers' subscriptions — **Critical**.
267
+
268
+ ---
269
+
270
+ ## Severity rubric
271
+
272
+ - **Critical** — exploitable right now by any user or visitor, exposes real user data, or allows bypassing authentication or payment. Ship-blocking.
273
+ - **Should Fix** — a genuine weakness that requires more specific conditions to exploit (e.g. requires knowing another user's exact ID, or only affects an admin-only route with a smaller blast radius), or a control that exists but is incomplete/inconsistent.
274
+ - **Worth Reviewing** — best-practice gap with low immediate exploitability given the current app, but worth fixing before the app scales or handles more sensitive data.
275
+
276
+ When in doubt between two levels, consider: could a stranger with no special access do real harm to a real user right now? If yes, Critical.
277
+
278
+ ## Report format
279
+
280
+ For every finding, use exactly this structure:
281
+
282
+ - Include a short `Confidence:` line when the evidence is not fully conclusive.
283
+ - Include a `Generated fix:` line when a direct code snippet or precise implementation step would help the agent patch the issue immediately.
284
+
285
+ **[SEVERITY] Short title**
286
+
287
+ - **What's wrong:** plain-English description, no jargon. If a technical term is unavoidable (e.g. "IDOR"), define it in one clause the first time it's used.
288
+ - **Why it matters:** a concrete, real-world consequence a non-technical person would understand — not "this violates the principle of least privilege" but "a stranger could see another user's home address and order history just by changing a number in the browser's address bar."
289
+ - **The fix:** a specific code snippet or precise instruction, not a vague suggestion like "add proper validation."
290
+ - **File(s):** exact path and line number(s).
291
+
292
+ ## After the checks: Generate and save `checkmyvibe-report.md`
293
+
294
+ Once the checks are complete, you must **generate and save an exhaustive, detailed Markdown report file named `checkmyvibe-report.md` in the project root** (or target directory if specified). This ensures that founders, clients, project managers, and engineers have a persistent, readable, and actionable artifact to track, share, and reference.
295
+
296
+ The generated `checkmyvibe-report.md` must follow this structure:
297
+
298
+ ```markdown
299
+ # 🛡️ checkmyvibe Production Readiness & Code Quality Report
300
+
301
+ | Metadata | Details |
302
+ | :--- | :--- |
303
+ | **Date & Time** | [YYYY-MM-DD HH:MM UTC/Local] |
304
+ | **Target Directory** | `[target path or project root]` |
305
+ | **Scan Scope** | [Full Audit (Checks 1a–7) / Scoped: `secrets`, `auth`, `db`, `backend`, `frontend`, `payment`] |
306
+ | **Detected Stack** | [Framework, Database/ORM, Auth Provider, Payment Gateway] |
307
+ | **Readiness Verdict** | **[Ready to Ship / Needs Fixes Before Launch / No Blocking Issues]** |
308
+
309
+ ---
310
+
311
+ ## 📋 Executive Summary
312
+ [Plain-English overview of the application's readiness state. Summarize the key risks identified in business terms that non-technical stakeholders (founders, clients) can immediately understand without security jargon.]
313
+
314
+ - **Total Findings:** X Critical, Y Should Fix, Z Worth Reviewing
315
+ - **Fixes Applied This Session:** N issues resolved
316
+ - **Current Status:** [e.g. 1 Critical issue remaining]
317
+
318
+ ---
319
+
320
+ ## 🔍 Scope Transparency
321
+ - **Included Checks:** [List of checks evaluated in this run]
322
+ - **Skipped Checks:** [List of checks not evaluated, or "None (Full Audit)"]
323
+
324
+ ---
325
+
326
+ ## 🚨 Detailed Findings & Remediation
327
+
328
+ [Group findings by severity: Critical first, then Should Fix, then Worth Reviewing. If no issues were found in a category, state "No issues found".]
329
+
330
+ ### [CRITICAL / SHOULD FIX / WORTH REVIEWING] Short Descriptive Title
331
+ - **Status:** [Open / Fixed / Applied (Needs Verification)]
332
+ - **Confidence:** [High confidence / Medium confidence / Needs manual review]
333
+ - **File(s):** `path/to/file.ext:line-range`
334
+ - **What's wrong:** [Plain-English description, no jargon. Define any necessary technical terms.]
335
+ - **Why it matters:** [Concrete real-world business and security consequences — e.g. "A stranger could see another user's home address and order history just by changing a number in the browser's address bar."]
336
+ - **The fix:**
337
+ ```diff
338
+ - vulnerable_or_scaffolded_code()
339
+ + hardened_production_code()
340
+ ```
341
+ - **Remediation Details:** [Exact steps to apply or verify]
342
+
343
+ ---
344
+
345
+ ## 🔄 Post-Fix Verification (Before & After)
346
+ [If fixes were applied during this session, document deterministic script re-scan results before and after:
347
+ - `scan_secrets.py`: X findings → Y findings
348
+ - `check_gitignore.py`: FAIL → PASS
349
+ - `check_auth_patterns.py`: X findings → Y findings
350
+ - `check_db_config.py`: FAIL → PASS
351
+ - `check_payment_config.py`: FAIL → PASS]
352
+
353
+ ---
354
+
355
+ ## 📌 Action Items Checklist
356
+ - [ ] Fix Critical item 1...
357
+ - [ ] Address Should Fix item 2...
358
+ - [ ] Run full `/checkmyvibe` audit prior to deployment
359
+
360
+ ---
361
+
362
+ ## ⚖️ Scope & Honesty Disclaimer
363
+ [Standard scope reminder: checkmyvibe is a first-pass check for AI scaffolding flaws and not a full external third-party penetration test. If handling payments or regulated data, professional external verification is recommended.]
364
+ ```
365
+
366
+ **Post-fix verification rule:** if you applied fixes during this session, re-run the scripts for every category you touched and confirm the finding is actually gone before marking it fixed in the report. Report before/after per check (e.g. "scan_secrets.py: 3 findings → 0 findings"). A fix that hasn't been re-scanned must be listed as "applied, not yet verified", never as resolved.
367
+
368
+ If no issues are found, still generate `checkmyvibe-report.md` stating clearly that no blocking issues were found in this pass, which categories were checked, and what the remaining scope limits are.
369
+
370
+ ## Example report style
371
+
372
+ Use clear, direct wording like:
373
+
374
+ **[Critical] Missing object-level authorization**
375
+
376
+ - **What's wrong:** Any logged-in user can read another user's order by changing the order ID.
377
+ - **Why it matters:** A stranger could see someone else's orders and personal details.
378
+ - **The fix:** Add a user ownership check in the query and return 404 when the record does not belong to the current user.
379
+ - **File(s):** `src/routes/orders.ts:42-58`
380
+
381
+ ## Final summary (in Chat Response)
382
+
383
+ In addition to saving `checkmyvibe-report.md`, output the executive summary and verdict in your conversation response, ending with:
384
+
385
+ 1. Stack and data-sensitivity context noted at the start (one line)
386
+ 2. Total findings by severity, e.g. "2 Critical, 3 Should Fix, 1 Worth Reviewing"
387
+ 3. A one-line verdict: "Not ready to ship — fix the Critical items first" or "No blocking issues found in this pass — review the Should Fix items when you can"
388
+ 4. Confirmation notice that the detailed report has been saved to disk:
389
+ `📄 Detailed report saved to checkmyvibe-report.md`
390
+ 5. The scope reminder:
391
+ - **For Full Audit:** "This review covers common configuration patterns seen in AI-generated code — exposed secrets, auth stubs, database rules, object-level authorization, input validation, and client-side payment logic. It is not a comprehensive third-party safety audit or pentest. If this app handles payment, health, or other regulated data, get a professional external review before launch regardless of these results."
392
+ - **For Scoped Scan:** "This was a focused [SCOPE]-only check ([LIST OF RUN CHECKS]). Skipped checks: [LIST OF SKIPPED CHECKS]. A clean scoped check does not mean the application is production-ready. Always run a full `/checkmyvibe` audit prior to release, and obtain a professional external security review if handling sensitive or regulated data."
393
+
394
+ ## Notes for the agent
395
+
396
+ - **Always generate and write `checkmyvibe-report.md` to the target directory:** Never skip creating this file. It is the primary deliverable for user handoff.
397
+ - Always produce a review report after the check; do not stop at raw findings.
398
+ - Write the entire report in clear, accessible language. Frame findings around concrete, real-world user consequences rather than abstract technical concepts. A non-technical stakeholder must be able to read the report and immediately understand the real-world danger.
399
+ - The review should clearly separate what was found, what was fixed, how it was fixed, and what remains.
400
+ - Always run the available scripts (located in the `scripts/` directory relative to this `SKILL.md` file) before relying on reasoning alone for Checks 1-4 and Check 7 — they exist so those specific checks are reliable and repeatable rather than dependent on re-deriving the logic every time.
401
+ - Scripts are Python 3: `scan_secrets.py`, `check_gitignore.py`, `check_auth_patterns.py`, `check_db_config.py`, and `check_payment_config.py`. Run them as `python <script> <target>` first; if `python` is not found (common on Linux/macOS), retry with `python3`. Note in the report which interpreter was used.
402
+ - If a script is missing, fails to run, or the language/stack isn't supported by it, say so explicitly in the report ("automated secret scan could not run; manually reviewed instead") rather than silently skipping the check.
403
+ - Do not invent findings to seem thorough. If a check finds nothing, report "No issues found" for that category explicitly — silence looks like the check wasn't performed at all.
404
+ - Do not flag the same underlying issue multiple times under different check categories — pick the most relevant category and reference it once.
405
+ - If the codebase is large, prioritize routes and files that touch authentication, payments, and any endpoint returning data tied to a specific user ID — these are where real damage concentrates.