@appsforgood/next-supabase-kit 0.4.0 → 0.4.2

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/UPGRADE.md +22 -0
  4. package/USER_GUIDE.html +808 -0
  5. package/USER_GUIDE.md +12 -10
  6. package/agents/app-engineer/agent.md +4 -0
  7. package/agents/copy/agent.md +16 -3
  8. package/agents/design/agent.md +7 -1
  9. package/agents/optional/deploy/agent.md +6 -0
  10. package/agents/optional/docs/agent.md +4 -0
  11. package/agents/optional/lead-architect/agent.md +8 -0
  12. package/agents/optional/research/agent.md +4 -0
  13. package/agents/planner/agent.md +8 -0
  14. package/agents/qa/agent.md +2 -0
  15. package/agents/security/agent.md +2 -0
  16. package/catalog.json +1 -0
  17. package/dist/index.js +74 -11
  18. package/dist/index.js.map +1 -1
  19. package/examples/next-supabase-installed/.agent-kit/config.json +1 -0
  20. package/examples/next-supabase-installed/.agent-kit/manifest.json +54 -49
  21. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/copy.toml +1 -1
  22. package/examples/next-supabase-installed/.antigravity/runtime-skills/deslop/SKILL.md +62 -0
  23. package/examples/next-supabase-installed/.antigravity/runtime-skills/frontend-design/SKILL.md +90 -9
  24. package/examples/next-supabase-installed/.antigravity/runtime-skills/nextjs-app-router/SKILL.md +29 -9
  25. package/examples/next-supabase-installed/.antigravity/runtime-skills/owasp-security-review/SKILL.md +31 -9
  26. package/examples/next-supabase-installed/.antigravity/runtime-skills/planning/SKILL.md +11 -5
  27. package/examples/next-supabase-installed/.antigravity/runtime-skills/postgres-migrations/SKILL.md +25 -7
  28. package/examples/next-supabase-installed/.antigravity/runtime-skills/product-copy/SKILL.md +36 -4
  29. package/examples/next-supabase-installed/.antigravity/runtime-skills/supabase-auth-rls/SKILL.md +41 -9
  30. package/examples/next-supabase-installed/.antigravity/runtime-skills/testing-qa/SKILL.md +3 -3
  31. package/examples/next-supabase-installed/.claude/agents/app-engineer.md +4 -0
  32. package/examples/next-supabase-installed/.claude/agents/copy.md +16 -3
  33. package/examples/next-supabase-installed/.claude/agents/design.md +7 -1
  34. package/examples/next-supabase-installed/.claude/agents/planner.md +8 -0
  35. package/examples/next-supabase-installed/.claude/agents/qa.md +2 -0
  36. package/examples/next-supabase-installed/.claude/agents/security.md +2 -0
  37. package/examples/next-supabase-installed/.codex/agents/app-engineer.toml +4 -0
  38. package/examples/next-supabase-installed/.codex/agents/copy.toml +17 -4
  39. package/examples/next-supabase-installed/.codex/agents/design.toml +7 -1
  40. package/examples/next-supabase-installed/.codex/agents/planner.toml +8 -0
  41. package/examples/next-supabase-installed/.codex/agents/qa.toml +2 -0
  42. package/examples/next-supabase-installed/.codex/agents/security.toml +2 -0
  43. package/examples/next-supabase-installed/.cursor/agents/app-engineer.md +4 -0
  44. package/examples/next-supabase-installed/.cursor/agents/copy.md +16 -3
  45. package/examples/next-supabase-installed/.cursor/agents/design.md +7 -1
  46. package/examples/next-supabase-installed/.cursor/agents/planner.md +8 -0
  47. package/examples/next-supabase-installed/.cursor/agents/qa.md +2 -0
  48. package/examples/next-supabase-installed/.cursor/agents/security.md +2 -0
  49. package/examples/next-supabase-installed/.cursor/skills/deslop/SKILL.md +62 -0
  50. package/examples/next-supabase-installed/.cursor/skills/frontend-design/SKILL.md +90 -9
  51. package/examples/next-supabase-installed/.cursor/skills/nextjs-app-router/SKILL.md +29 -9
  52. package/examples/next-supabase-installed/.cursor/skills/owasp-security-review/SKILL.md +31 -9
  53. package/examples/next-supabase-installed/.cursor/skills/planning/SKILL.md +11 -5
  54. package/examples/next-supabase-installed/.cursor/skills/postgres-migrations/SKILL.md +25 -7
  55. package/examples/next-supabase-installed/.cursor/skills/product-copy/SKILL.md +36 -4
  56. package/examples/next-supabase-installed/.cursor/skills/supabase-auth-rls/SKILL.md +41 -9
  57. package/examples/next-supabase-installed/.cursor/skills/testing-qa/SKILL.md +3 -3
  58. package/examples/next-supabase-installed/AGENTS.md +1 -1
  59. package/examples/next-supabase-installed/USER_GUIDE.html +808 -0
  60. package/examples/next-supabase-installed/USER_GUIDE.md +12 -10
  61. package/examples/next-supabase-installed/skills/deslop/SKILL.md +62 -0
  62. package/examples/next-supabase-installed/skills/frontend-design/SKILL.md +90 -9
  63. package/examples/next-supabase-installed/skills/nextjs-app-router/SKILL.md +29 -9
  64. package/examples/next-supabase-installed/skills/owasp-security-review/SKILL.md +31 -9
  65. package/examples/next-supabase-installed/skills/planning/SKILL.md +11 -5
  66. package/examples/next-supabase-installed/skills/postgres-migrations/SKILL.md +25 -7
  67. package/examples/next-supabase-installed/skills/product-copy/SKILL.md +36 -4
  68. package/examples/next-supabase-installed/skills/supabase-auth-rls/SKILL.md +41 -9
  69. package/examples/next-supabase-installed/skills/testing-qa/SKILL.md +3 -3
  70. package/examples/next-supabase-installed/tree.txt +3 -0
  71. package/package.json +6 -4
  72. package/research/agent-skill-gap-report.md +11 -2
  73. package/skills/deslop/SKILL.md +62 -0
  74. package/skills/frontend-design/SKILL.md +90 -9
  75. package/skills/nextjs-app-router/SKILL.md +29 -9
  76. package/skills/owasp-security-review/SKILL.md +31 -9
  77. package/skills/planning/SKILL.md +11 -5
  78. package/skills/postgres-migrations/SKILL.md +25 -7
  79. package/skills/product-copy/SKILL.md +36 -4
  80. package/skills/supabase-auth-rls/SKILL.md +41 -9
  81. package/skills/testing-qa/SKILL.md +3 -3
  82. package/templates/next-supabase/AGENTS.md +1 -1
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: deslop
3
+ description: Use as the last copy pass. Strip AI-writing tells and leftover visual slop. Copy must run this after product-copy, not instead of it.
4
+ ---
5
+
6
+ # Deslop
7
+
8
+ Last pass. `product-copy` writes the words. This skill removes the machine accent.
9
+
10
+ Scan 2026-09-06: `conorbronsdon/avoid-ai-writing`, `funboy322/avoid-ai-design`, `educlopez/ui-craft`, `superdesigndev/superdesign-skill`. Patterns only. Do not copy their catalogs.
11
+
12
+ ## Use when
13
+
14
+ Copy is about to say “done,” or anyone asked to de-slop, humanize, or “make this less AI.” Always run after `product-copy` on public or conversion copy.
15
+
16
+ ## Order
17
+
18
+ 1. Finish `product-copy` (audience, headline, CTA, claims).
19
+ 2. Open the rendered surface if one exists.
20
+ 3. Run this skill. Fix words first. If the screenshot still reads as default AI UI, hand back to Design with the P0 list. Do not skip this step.
21
+
22
+ ## Writing tells — cut or rewrite
23
+
24
+ | Tell | Fix |
25
+ | --- | --- |
26
+ | Chatbot openers (“Certainly!”, “Great question!”) | Delete. Start with the point. |
27
+ | Inflators (seamless, robust, leverage, unlock, supercharge, 10x, paradigm) | Name the thing. “use,” “ships,” “blocks.” |
28
+ | Copula dodge (“serves as,” “boasting,” “featuring”) | “is” / “has.” |
29
+ | “It’s not X, it’s Y” | One positive sentence. |
30
+ | Moreover / Furthermore / In today’s X / In conclusion | Cut or join with “and.” |
31
+ | Vague experts / studies show | Cite or delete. |
32
+ | Title Case Headings on every line | Sentence case. |
33
+ | Em dash stacks, emoji headers, sparkle bullets | Periods. Real nouns. |
34
+ | “Get started” / “Learn more” with no object | Say the next action. |
35
+ | Placeholder leftovers (`[Your Name]`, `TODO copy`) | Fill or delete. |
36
+
37
+ Second pass: re-read the rewrite. If the same tell remains, rewrite the paragraph, do not synonym-swap.
38
+
39
+ ## Visual P0s — fail if still on screen
40
+
41
+ These are the 2026 convergence cluster. One is a smell. Two or more is a reject.
42
+
43
+ - Purple-to-blue (or indigo) gradient hero, or gradient-clipped headline type
44
+ - Inter / Roboto / default shadcn zinc as the whole identity
45
+ - Centered slogan + two pills + three equal icon cards
46
+ - `rounded-2xl` + `shadow-lg` + blur on every surface
47
+ - Cream paper `#F4F1EA` + terracotta accent (the 2026 “editorial default”)
48
+ - Acid green or neon vermilion on near-black used as decoration, not meaning
49
+ - Lucide Sparkles / Zap as the product metaphor
50
+ - Fake dashboard metrics or DiceBear avatars
51
+
52
+ Copy does not restyle the page. It lists the P0s from the screenshot and sends them to Design.
53
+
54
+ ## Must keep
55
+
56
+ Facts, commands, file paths, the fail-closed screenshot sentence, and any claim that has proof. Deslop is subtraction, not a new brand voice.
57
+
58
+ ## Done when
59
+
60
+ - A second read finds no writing tells above.
61
+ - If a screen exists, the screenshot was read and remaining visual P0s are named or gone.
62
+ - Copy’s verdict is not “done” until this pass ran.
@@ -1,26 +1,107 @@
1
1
  ---
2
2
  name: frontend-design
3
- description: Use when building or reviewing user-facing UI. Prefer task-first screens. Reject generic AI-looking gradients, card soup, and fake metrics.
3
+ description: Use when building or reviewing user-facing UI. Commit one simple palette and type pairing. Reject default AI layouts, timid color spreads, and decoration that is not the task.
4
4
  ---
5
5
 
6
6
  # Frontend Design
7
7
 
8
+ Build or review a screen as if a stranger must name the product from the first viewport. Simple and specific beats decorated.
9
+
10
+ Scan 2026-09-06 (structure only, no bodies copied): Anthropic `frontend-design` (updated 2026-06), addyosmani `frontend-ui-engineering`, `educlopez/ui-craft`, `funboy322/avoid-ai-design`, `superdesigndev/superdesign-skill`.
11
+
8
12
  ## Use when
9
13
 
10
- Screens, components, layout, visual design, or anti-generic UI review.
14
+ Any user-facing layout, component, HTML page, or “it looks generic.” Required for `USER_GUIDE.html` and for app screens.
15
+
16
+ ## Ground in the subject
17
+
18
+ Name the product, the user, and this screen’s job before CSS. Tokens come from the domain (materials, time of day, one real object) — not from a theme pack. A toy store and a ledger cannot share a palette.
19
+
20
+ **This kit’s HTML** (`USER_GUIDE.html`): charcoal assignment desk.
21
+
22
+ | Token | Value |
23
+ | --- | --- |
24
+ | Paper | `#10100e` |
25
+ | Ink | `#eceae4` |
26
+ | Frame | `#070706` |
27
+ | Line | `#2a2823` |
28
+ | Safelight | `#ff5a2a` (required / fail only) |
29
+ | Pass | `#5ea37a` |
30
+ | Type | `"Helvetica Neue", Helvetica, Arial, ui-sans-serif` |
31
+ | Mono | `ui-monospace, Menlo, Consolas` |
32
+ | Radius | `2px` |
33
+ | Shadow | none |
34
+
35
+ **Downstream Next.js apps:** do not paste the kit desk onto a product. Extract or invent **4–6 hex tokens** from *this* product’s job. Write them before CSS. Inside an existing design system, stay surgical — swap tells, do not invent a second brand.
36
+
37
+ ## Color — simple schemes that hold up
38
+
39
+ One field, one ink, one accent, one line. That is enough.
40
+
41
+ 1. **Dominant field** (~80%): the page. Flat. Not a gradient, not a mesh.
42
+ 2. **Ink** (~15%): body text. Contrast ≥ 4.5:1 (3:1 for large type).
43
+ 3. **Accent** (~5%): one action or one required state. Recolor-as-decoration fails.
44
+ 4. **Line / well**: borders and code wells, one step off the field.
45
+
46
+ Recipes (pick one that fits the product, then stop):
47
+
48
+ | Scheme | Field | Ink | Accent | Use when |
49
+ | --- | --- | --- | --- | --- |
50
+ | Charcoal desk | `#10100e` | `#eceae4` | `#ff5a2a` | Tools, manuals, this kit |
51
+ | Paper + ink | `#f4f4f1` | `#171717` | `#0b57d0` | Documents, settings, calm apps |
52
+ | Night + signal | `#0e1116` | `#e6edf3` | `#3fb950` | Ops, status, pass/fail |
53
+ | Warm shop | `#1c1916` | `#f3ece3` | `#e8a317` | Craft, commerce with real goods |
54
+
55
+ Do not:
56
+
57
+ - Spread six mid-chroma colors evenly.
58
+ - Use purple→blue, default `blue-600`, or untouched shadcn `zinc` as the identity.
59
+ - Use cream `#F4F1EA` + terracotta (the 2026 editorial default) unless the brief asks.
60
+ - Use acid green or neon vermilion on near-black as decoration.
61
+ - Treat Space Grotesk + slate, or any “tasteful” swap you used last week, as a new idea.
62
+
63
+ Prefer CSS variables. Self-contained kit HTML: no Google Fonts, no CDN CSS.
64
+
65
+ ## Type
66
+
67
+ One family, or two that are obviously different (display vs mono). Inter + system sans is not a pairing. Roboto, Space Grotesk, and “the last distinctive font you used” are second-order defaults.
68
+
69
+ - Line length < 80 characters.
70
+ - Tight display tracking on large sans. Do not italicize or recolor one word of a headline.
71
+ - No tracked-out ALL-CAPS eyebrows, middle-dot meta (`A · B · C`), or `WORD — fragment` labels unless the content needs them.
72
+ - Numbered tickets only when the content is a real sequence.
73
+
74
+ ## Layout
75
+
76
+ - First viewport = the characteristic thing: command, table, form, named owner. Not a slogan over atmosphere.
77
+ - Mobile (~390): the primary CTA still fits above the fold.
78
+ - Hierarchy from size, weight, and space — not from cards.
79
+ - Landing and marketing pages take a full direction. App chrome (settings, tables) stays quiet and dense.
80
+ - Reject: centered hero + two pills + three icon cards; glass navbar; four-column empty footer; fake metrics; broadsheet hairlines + dense newsprint columns (that look is itself a 2026 default).
81
+
82
+ ## Motion
83
+
84
+ None, or one moment that answers a click. Fade-and-slide on every section is generated. Respect `prefers-reduced-motion`.
85
+
86
+ ## Process
87
+
88
+ 1. Name the product, the user, and the job of this screen.
89
+ 2. Write the 4–6 tokens and one-sentence layout idea.
90
+ 3. Check the plan is not a 2026 default (cream editorial, neon-on-black decoration, SaaS card kit, newsprint desk, last week’s “tasteful” swap). If it is, change one axis: field, accent, or structure.
91
+ 4. Build. Spend boldness once. Remove one accessory.
92
+ 5. Screenshot desktop (~1280) and mobile (~390). Fix from pixels. Ask: would a stranger believe a person chose this?
11
93
 
12
94
  ## Checks
13
95
 
14
- - First screen shows the real product, task, or workflow.
15
- - Hierarchy, density, and primary action are obvious.
16
- - Loading, empty, error, disabled, success, and mobile states exist where relevant.
17
- - Contrast, focus, labels, and tap targets meet WCAG 2.1 AA.
18
- - Reject purple-blue gradient heroes, vague SaaS copy, fake dashboards, glass-card soup, and glow rails.
96
+ - A stranger can name the product from the first screen.
97
+ - Loading, empty, error, disabled, success exist where the flow has them.
98
+ - Focus visible, tap targets usable.
99
+ - Copy on the screen is real. If words are public-facing, Copy runs `deslop` last.
19
100
 
20
101
  ## Tools
21
102
 
22
- Critique from `browser` + `screenshot` + `image-review` first. Do not approve UI from TSX alone.
103
+ `browser` + `screenshot` + `image-review` first. Do not approve UI from TSX or HTML alone.
23
104
 
24
105
  ## Done when
25
106
 
26
- Desktop and mobile screenshots were read. Blocker detector findings are fixed.
107
+ Desktop and mobile images were read. Token list is in the change or in `DESIGN.md`. No P0 slop from `deslop` remains unless Design names it as an accepted exception.
@@ -1,23 +1,43 @@
1
1
  ---
2
2
  name: nextjs-app-router
3
- description: Use for Next.js App Router, Server Components, Client Components, Route Handlers, Server Actions, caching, forms, and metadata.
3
+ description: Use for Next.js App Router Server vs Client, Server Actions, Route Handlers, async params/cookies, caching, and proxy.ts. Smoke the changed route in the browser.
4
4
  ---
5
5
 
6
6
  # Next.js App Router
7
7
 
8
+ Scan 2026-09-09 (structure only, no bodies copied): Next.js App Router docs, Next.js 16 async request APIs and `proxy.ts` rename. This pack’s auth is **Supabase**, not a marketplace auth vendor.
9
+
8
10
  ## Use when
9
11
 
10
- Routes, layouts, Server Components, Client Components, Server Actions, Route Handlers, data loading, caching, or revalidation.
12
+ `app/` routes, layouts, Server Components, Client Components, Server Actions, Route Handlers, `params` / `searchParams`, `cookies()` / `headers()`, caching, or request interception (`proxy.ts` / legacy `middleware.ts`).
13
+
14
+ ## Do
15
+
16
+ 1. Read the existing `app/` tree and match its conventions (`src/app` vs `app`).
17
+ 2. Keep the work on the **server** unless the browser must hold state, events, or Web APIs.
18
+ 3. Put mutations in Server Actions (forms) or Route Handlers (HTTP). Validate every input.
19
+ 4. After a user-visible change, open the running route before handing to QA.
11
20
 
12
21
  ## Checks
13
22
 
14
- - Server Components are the default. Client Components are only for browser-only behavior.
15
- - Secrets never enter client bundles.
16
- - User-specific data is not stored in shared caches.
17
- - Route params, query params, forms, and API bodies are validated.
18
- - Loading, error, empty, and success states exist.
19
- - Authorization is enforced on the server and in RLS, not only in the UI.
23
+ - Server Components are the default. `"use client"` is only for browser-only behavior (event handlers, local state, browser APIs).
24
+ - Secrets, service-role keys, and privileged fetches never enter a Client Component or a client bundle.
25
+ - `cookies()`, `headers()`, `params`, and `searchParams` are **awaited** (Next.js 15+/16).
26
+ - Navigation uses `next/navigation`, not `next/router`. Metadata uses `metadata` / `generateMetadata`, not `next/head`.
27
+ - Pages Router APIs (`getServerSideProps`, `getStaticProps`, `pages/api`) stay out of new work.
28
+ - Next.js 16 request interception lives in `proxy.ts` (`proxy()`). If the repo still has `middleware.ts`, migrate or document why it stays.
29
+ - User-specific data is not stored in a shared/public cache. Tag invalidation uses the current two-argument `revalidateTag` API when tags are used.
30
+ - Route params, query strings, form fields, and JSON bodies are validated with a schema. Do not trust the URL or the client.
31
+ - `loading.tsx`, `error.tsx`, empty, and success exist for the changed route when the user can wait or fail.
32
+ - Authorization is enforced on the server **and** in RLS (`supabase-auth-rls`). Hiding a button is not access control.
33
+
34
+ ## Reject
35
+
36
+ - “It’s a Client Component so we can use hooks” when the data could load on the server.
37
+ - Importing `@supabase/supabase-js` with the service-role key in a file that has `"use client"`.
38
+ - Switching this pack to Clerk / Auth0 / NextAuth as the default. Auth here is Supabase.
39
+ - Shipping a route from the diff without opening it.
20
40
 
21
41
  ## Done when
22
42
 
23
- The server/client boundary is explicit and the changed route can be opened in the browser.
43
+ The server/client boundary is explicit, failure paths are named, and the changed route was opened in the running app. User-visible work then goes to QA with `browser-qa`.
@@ -1,23 +1,45 @@
1
1
  ---
2
2
  name: owasp-security-review
3
- description: Use when reviewing auth, APIs, Server Actions, uploads, webhooks, dependencies, secrets, or data mutations.
3
+ description: Use when reviewing auth, Server Actions, Route Handlers, uploads, webhooks, SSRF, secrets, or data mutations in a Next.js + Supabase app.
4
4
  ---
5
5
 
6
6
  # OWASP Security Review
7
7
 
8
+ Scan 2026-09-09: OWASP Top 10 mapped onto this pack (App Router + Supabase). Pair with `supabase-auth-rls`. Do not treat a UI walkthrough as access control.
9
+
8
10
  ## Use when
9
11
 
10
- Auth, APIs, Server Actions, external fetches, uploads, webhooks, dependencies, or mutations.
12
+ Auth, RLS, Server Actions, Route Handlers, uploads, webhooks, server-side `fetch`, new dependencies, or any mutation.
11
13
 
12
14
  ## Checks
13
15
 
14
- - Broken access control and IDOR are tested.
15
- - Inputs are validated with safe schemas.
16
- - Outputs are encoded; secrets are not logged or bundled.
17
- - SSRF risk is addressed for server-side fetches.
18
- - Dependencies are reviewed for known critical CVEs.
19
- - Errors are explicit without leaking internals.
16
+ Map each change to a concrete control. Skip rows that do not apply; do not skip access control when data is involved.
17
+
18
+ | Risk | In this pack |
19
+ | --- | --- |
20
+ | Broken access control / IDOR | RLS + server checks. Object IDs in params/body cannot reach another user’s row. |
21
+ | Cryptographic failures | No secrets in git, logs, or client bundles. Service role is server-only. |
22
+ | Injection | Schema-validate inputs. Parameterized queries / Supabase client. No string-built SQL. |
23
+ | Insecure design | Abuse case named (anon, other user, stolen cookie, replayed action). |
24
+ | Misconfiguration | CORS, env, debug flags, Storage public/private. |
25
+ | Vulnerable components | New deps reviewed; no known critical CVE waved through. |
26
+ | Auth failures | Login, logout, refresh, denied. `getUser()` on the server. |
27
+ | Integrity | Lockfile + CI. No postinstall scripts from untrusted packages. |
28
+ | Logging | Privileged actions log without tokens, cookies, or PII dumps. |
29
+ | SSRF | Server `fetch` / webhook URLs are allowlisted or parsed; no user-controlled hostname to cloud metadata. |
30
+
31
+ ## Server Actions And Route Handlers
32
+
33
+ - Every mutation validates origin/input. Do not trust hidden form fields for `user_id` or `role`.
34
+ - CSRF: cookie-session apps use SameSite and origin checks on state-changing POST.
35
+ - File uploads: type, size, and Storage policy. Do not serve user files from a privileged bucket via a guessable path.
36
+
37
+ ## Reject
38
+
39
+ - “RLS is enabled” without a policy that names the owner or tenant.
40
+ - Findings with no severity, no affected behavior, and no fix.
41
+ - Closing a user-visible auth bug from the SQL file alone (needs `browser-qa` for login/denied).
20
42
 
21
43
  ## Done when
22
44
 
23
- Each finding has severity, affected behavior, and a concrete fix. User-visible auth failures were seen in the browser.
45
+ Each finding has severity, affected behavior, and a concrete fix. Access control is in Postgres or the server, not only the UI. User-visible auth failures were seen in the browser.
@@ -11,15 +11,21 @@ Planning, roadmaps, “what should we do,” or any request that needs an owner.
11
11
 
12
12
  ## Steps
13
13
 
14
- 1. Read enough of the repo to name affected routes and data.
14
+ 1. Read enough of the repo to name affected routes, tables, and auth boundaries.
15
15
  2. Pick one owner: `app-engineer`, `security`, `design`, `qa`, or `copy`.
16
- 3. Add Security for auth/data/secrets, Design for UI, QA for behavior/UI, Copy for public words.
17
- 4. If the change is user-visible, list the desktop and mobile screenshots QA must capture.
16
+ 3. Name the skill that owner must run first:
17
+ - App engineer: `nextjs-app-router` and, if data/auth, `supabase-auth-rls` / `postgres-migrations`
18
+ - Security: `owasp-security-review` + `supabase-auth-rls`
19
+ - Design: `frontend-design`
20
+ - QA: `browser-qa` (screens) and `testing-qa` (commands)
21
+ - Copy: `product-copy` then `deslop` last
22
+ 4. Add extra reviewers: Security for auth/data/secrets, Design for UI, QA for behavior/UI, Copy for public words.
23
+ 5. If the change is user-visible, list the desktop and mobile screenshots QA must capture.
18
24
 
19
25
  ## Done when
20
26
 
21
- Owner, extra reviewers, preserved behavior, and required screenshots are explicit. No product code was written.
27
+ Owner, extra reviewers, required skills, preserved behavior, and required screenshots are explicit. No product code was written.
22
28
 
23
29
  ## Reject
24
30
 
25
- Implementing in the planning pass. Asking one chat to play every role.
31
+ Implementing in the planning pass. Asking one chat to play every role. Skipping `supabase-auth-rls` because “it’s just a table.”
@@ -1,21 +1,39 @@
1
1
  ---
2
2
  name: postgres-migrations
3
- description: Use for schema changes, migrations, constraints, indexes, and rollback risk.
3
+ description: Use for schema, constraints, indexes, RLS in the same change, generated types, and rollback risk.
4
4
  ---
5
5
 
6
6
  # Postgres Migrations
7
7
 
8
+ Scan 2026-09-09 (structure only, no bodies copied): Supabase migration + RLS docs. Pair every user-data table with `supabase-auth-rls`.
9
+
8
10
  ## Use when
9
11
 
10
- Creating or changing tables, constraints, indexes, functions, triggers, or seed data.
12
+ Creating or changing tables, columns, constraints, indexes, functions, triggers, views, or seed data.
13
+
14
+ ## Do
15
+
16
+ 1. Name the migration, the tables, and whether existing rows must keep working.
17
+ 2. Prefer additive changes. Destructive steps need an explicit rollback (or an expand/contract plan).
18
+ 3. If the table holds user or tenant data, **RLS lands in this change**, not a later ticket.
19
+ 4. Refresh generated DB types after the schema change.
11
20
 
12
21
  ## Checks
13
22
 
14
- - Migrations are additive or have an explicit rollback path.
15
- - Constraints protect integrity; indexes match real query paths.
16
- - RLS is planned in the same change when the table holds user or tenant data.
17
- - Generated types are refreshed after schema changes.
23
+ - Constraints protect integrity (PK, FK, unique, `NOT NULL` where the product requires it).
24
+ - Indexes match real `WHERE` / join paths, not speculative columns.
25
+ - `ENABLE ROW LEVEL SECURITY` + policies ship with the table when it is user-owned, tenant-owned, or privileged.
26
+ - `GRANT` is not a substitute for RLS. Revoking grants from `anon` / `authenticated` without policies is still incomplete if the service role is exposed.
27
+ - Functions that run as definer are listed and justified. Prefer invoker + RLS.
28
+ - Seed data does not insert other users’ rows as the current user.
29
+ - Migration order is safe on a non-empty database (backfill before `NOT NULL`, rename in steps).
30
+
31
+ ## Reject
32
+
33
+ - “We’ll add RLS after launch.”
34
+ - Dropping a column or table in the same release that still reads it, with no expand/contract.
35
+ - Editing production by hand instead of a numbered migration.
18
36
 
19
37
  ## Done when
20
38
 
21
- Migration order and rollback risk are named. User data is not left unprotected.
39
+ Migration order and rollback risk are named. User data is not left unprotected. Types used by the app match the new schema.
@@ -7,16 +7,48 @@ description: Use for headlines, CTAs, empty states, and conversion copy. Review
7
7
 
8
8
  ## Use when
9
9
 
10
- Landing pages, CTAs, positioning, onboarding, empty states, or pricing copy.
10
+ Landing pages, CTAs, positioning, onboarding, empty states, pricing copy, or the public user guide (`USER_GUIDE.html`).
11
+
12
+ ## Audience
13
+
14
+ Engineers and coding agents on a Next.js + Supabase repo who already have Cursor, Claude, Codex, Copilot, or Antigravity. They do not need a manifesto. They need to know **who to @**, **what to paste**, and **what “done” looks like**.
15
+
16
+ ## Positioning (this product)
17
+
18
+ Name the specialist. Prove the screen. Six agents, twelve skills, five IDEs. QA is two screenshots, not a file diff.
19
+
20
+ Do not describe this as an “agent operating system,” a copilot marketplace, or “AI-powered delivery.”
21
+
22
+ ## Voice
23
+
24
+ Direct, specific, slightly dry. Prefer verbs: ask, paste, open, capture, reject.
25
+
26
+ Use: specialist, owner, screenshot, desktop, mobile, fail-closed, paste, Planner, browser-qa.
27
+ Avoid: supercharge, seamless, unlock, copilot for X, 10x, enterprise-grade, magic, revolutionize.
28
+
29
+ ## Headline test
30
+
31
+ If the headline could sell GitHub Copilot, Cursor, or any agent marketplace, rewrite it.
32
+
33
+ Good: `Ask one specialist. Then open the running UI.`
34
+ Bad: `Supercharge your AI workflow with agents and skills.`
35
+
36
+ ## CTA test
37
+
38
+ A CTA is a command or a pasteable prompt, not “Get started.”
39
+
40
+ Good: `Paste this to Planner` followed by the plan prompt.
41
+ Good: `npx --yes @appsforgood/next-supabase-kit init --activate all`
42
+ Bad: `Start building today`.
11
43
 
12
44
  ## Checks
13
45
 
14
46
  - Audience, pain, and outcome are specific to this product.
15
- - Claims are backed or marked as assumptions.
47
+ - Claims are backed or marked as assumptions. Do not invent user counts or “best-in-class.”
16
48
  - Headlines could not fit any competitor.
17
49
  - CTAs say what happens next.
18
- - Review the words on a screenshot for truncation and hierarchy.
50
+ - Review the words on a screenshot for truncation, wrapping, and hierarchy. Copy that only exists in markdown is not approved for a public HTML page.
19
51
 
20
52
  ## Done when
21
53
 
22
- Copy is specific and the rendered screenshot shows the key line and CTA clearly.
54
+ Copy is specific and the rendered screenshot shows the key line and CTA clearly on desktop and mobile. Copy then runs `deslop` as the last pass — this skill is not the end of the run.
@@ -1,23 +1,55 @@
1
1
  ---
2
2
  name: supabase-auth-rls
3
- description: Use for Supabase Auth, SSR clients, middleware, sessions, Row Level Security, Storage policies, and service-role usage.
3
+ description: Use for Supabase Auth, SSR clients, session refresh, RLS, Storage policies, and keeping the service role server-only. UI checks are not authorization.
4
4
  ---
5
5
 
6
6
  # Supabase Auth And RLS
7
7
 
8
+ Scan 2026-09-09 (structure only, no bodies copied): Supabase SSR Auth, RLS, and Storage policy docs. Do not replace this pack with a non-Supabase auth vendor.
9
+
8
10
  ## Use when
9
11
 
10
- Supabase Auth, SSR clients, middleware, sessions, tables, policies, Storage, or service-role operations.
12
+ Supabase Auth, cookie/SSR clients, `proxy.ts` / middleware session refresh, RLS, Storage, service-role usage, or any table that stores user or tenant data.
13
+
14
+ ## Do
15
+
16
+ 1. Name the table or bucket and who may read or write a row.
17
+ 2. Use the **anon/user SSR client** in user requests. Use the **service role** only in a server-only module that never imports into Client Components.
18
+ 3. Enable RLS and write policies in the **same change** as the table (`postgres-migrations`).
19
+ 4. Prove a negative: another user (or anon) cannot read or write the row.
20
+
21
+ ## Clients
22
+
23
+ | Client | Where | Key |
24
+ | --- | --- | --- |
25
+ | Browser / `'use client'` | Components that must talk to Supabase in the browser | `NEXT_PUBLIC_SUPABASE_ANON_KEY` only |
26
+ | SSR / Server Components / Actions / Route Handlers | Cookie session, `createServerClient` | Anon key + cookies |
27
+ | Service role | Server-only jobs, webhooks, migrations | `SUPABASE_SERVICE_ROLE_KEY` — never `NEXT_PUBLIC_` |
28
+
29
+ Auth decisions use `getUser()` (or equivalent server verification), not a client-trusted `getSession()` JWT.
30
+
31
+ If the app intercepts requests, refresh the session there (`proxy.ts` or existing `middleware.ts`) so Server Components see a current user.
32
+
33
+ ## RLS And Storage
34
+
35
+ - `ENABLE ROW LEVEL SECURITY` on every user-owned, tenant-owned, or privileged table.
36
+ - Policies name ownership (`auth.uid()`) and tenant boundaries. An “authenticated” role is not ownership.
37
+ - Storage buckets have explicit policies. A private bucket with a public URL is a finding.
38
+ - Privileged bypass (service role, `security definer`) is listed, server-only, and as narrow as the job.
11
39
 
12
40
  ## Checks
13
41
 
14
- - RLS is enabled on user-owned and tenant-owned tables.
15
- - Policies enforce ownership and tenant boundaries.
16
- - Service-role keys stay server-only.
17
- - Auth middleware refreshes sessions safely.
18
- - Storage buckets have explicit policies.
19
- - IDOR is considered and tested at the policy boundary.
42
+ - IDOR is tested at the **policy** (and server) boundary: object IDs in the URL or body cannot reach another user’s row.
43
+ - Login, logout, expired session, and denied are exercised when those states exist. User-visible ones need `browser-qa`.
44
+ - `.env.example` documents public anon URL/key placeholders only. Service role stays unnamed in client files.
45
+
46
+ ## Reject
47
+
48
+ - “The button is hidden, so they cannot hit the API.”
49
+ - RLS deferred to a follow-up PR while the table is already queryable.
50
+ - Service role in `NEXT_PUBLIC_*`, in a Client Component, or in a file imported by one.
51
+ - Trusting `user_id` from the request body instead of `auth.uid()`.
20
52
 
21
53
  ## Done when
22
54
 
23
- A table that stores user data cannot be read or written across users without a failing policy. UI checks are not treated as authorization.
55
+ A second user (or anon) cannot read or write the protected row. UI checks are not treated as authorization. Hand user-visible auth states to QA with `browser-qa`.
@@ -14,14 +14,14 @@ Adding or reviewing tests, smoke checks, or regression coverage.
14
14
  - Core logic has unit tests.
15
15
  - Preserved behavior has regression tests.
16
16
  - Critical flows have Playwright or equivalent smoke tests.
17
- - Auth and mutation paths are prioritized.
17
+ - Auth, RLS, and mutation paths are prioritized (other-user / anon cannot pass).
18
18
  - Network failure, empty, and error behavior is covered.
19
19
  - Gaps are named when infrastructure is missing.
20
20
 
21
21
  ## Visual proof
22
22
 
23
- User-visible screens also require `browser-qa`. This skill does not replace screenshots.
23
+ User-visible screens also require `browser-qa`. This skill does not replace screenshots. Passing `toBeVisible` is not image review.
24
24
 
25
25
  ## Done when
26
26
 
27
- Commands run, results, and residual gaps are listed.
27
+ Commands run, results, and residual gaps are listed. RLS/auth tests fail closed when another user can read the row.
@@ -27,4 +27,4 @@ Planner names the owner. Security joins auth/data/secret work. Design joins user
27
27
 
28
28
  ## Skills
29
29
 
30
- Default skills live in `.cursor/skills/*/SKILL.md` (and the matching Claude/Codex/Antigravity copies). QA of a screen always uses `browser-qa`, not `testing-qa` alone.
30
+ Default skills live in `.cursor/skills/*/SKILL.md` (and the matching Claude/Codex/Antigravity copies). QA of a screen always uses `browser-qa`, not `testing-qa` alone. Copy finishes public words with `deslop`. Planner uses `planning` and names owners; it does not run the other agents. Each agent file points at `catalog.json` for the full skill list.