[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-supabase":3,"mdc-f26ute-key":41,"related-repo-openai-supabase":1542,"related-org-openai-supabase":1664},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":30,"repoUrl":31,"updatedAt":32,"license":33,"forks":34,"topics":35,"repo":36,"sourceUrl":39,"mdContent":40},"supabase","build applications with Supabase","Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase\u002Fssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,18,21,24,27],{"name":13,"slug":14,"type":15},"Auth","auth","tag",{"name":17,"slug":4,"type":15},"Supabase",{"name":19,"slug":20,"type":15},"Database","database",{"name":22,"slug":23,"type":15},"PostgreSQL","postgresql",{"name":25,"slug":26,"type":15},"Storage","storage",{"name":28,"slug":29,"type":15},"Edge Functions","edge-functions",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-30T05:50:51.423076",null,465,[],{"repoUrl":31,"stars":30,"forks":34,"topics":37,"description":38},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fsupabase\u002Fskills\u002Fsupabase","---\nname: supabase\ndescription: \"Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase\u002Fssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).\"\nmetadata:\n  author: supabase\n  version: \"0.1.2\"\n---\n\n# Supabase\n\n## Core Principles\n\n**1. Supabase changes frequently — verify against changelog and current docs before implementing.**\nDo not rely on training data for Supabase features. Function signatures, config.toml settings, and API conventions change between versions.\n\nFirst, fetch `https:\u002F\u002Fsupabase.com\u002Fchangelog.md` (a lightweight summary index — not a heavy pull), scan for `breaking-change` tags relevant to your task, and follow the linked page for any that apply. Then look up the relevant topic using the documentation access methods below.\n\n**2. Verify your work.**\nAfter implementing any fix, run a test query to confirm the change works. A fix without verification is incomplete.\n\n**3. Recover from errors, don't loop.**\nIf an approach fails after 2-3 attempts, stop and reconsider. Try a different method, check documentation, inspect the error more carefully, and review relevant logs when available. Supabase issues are not always solved by retrying the same command, and the answer is not always in the logs, but logs are often worth checking before proceeding.\n\n**4. Exposing tables to the Data API:** Depending on the user's [Data API settings](https:\u002F\u002Fsupabase.com\u002Fdashboard\u002Fproject\u002F\u003Cref>\u002Fintegrations\u002Fdata_api\u002Fsettings), newly created tables may not be automatically exposed via the Data (REST) API. If this is the case, `anon` and `authenticated` roles will need to be explicitly granted access.\n\n> Note that this is separate from RLS, which controls which _rows_ are visible once a table is accessible, not whether the table is accessible at all.\n\nWhen a user reports a SQL-created table is unexpectedly inaccessible, check their Data API settings and whether the roles have been granted access via explicit `GRANT` SQL. When granting public (`anon`\u002F`authenticated`) access, always enable RLS too. See [Exposing a Table to the Data API](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fapi\u002Fsecuring-your-api.md) for the full setup workflow.\n\n**5. RLS in exposed schemas.**\nEnable RLS on every table in any exposed schema, which includes `public` by default. This is critical in Supabase because tables in exposed schemas can be reachable through the Data API when the `anon`\u002F`authenticated` roles have access (see [Exposing a Table to the Data API](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fapi\u002Fsecuring-your-api.md)). For private schemas, prefer RLS as defense in depth. After enabling RLS, create policies that match the actual access model rather than defaulting every table to the same `auth.uid()` pattern.\n\n**6. Security checklist.**\nWhen working on any Supabase task that touches auth, RLS, views, storage, or user data, run through this checklist. These are Supabase-specific security traps that silently create vulnerabilities:\n\n- **Auth and session security**\n  - **Never use `user_metadata` claims in JWT-based authorization decisions.** In Supabase, `raw_user_meta_data` is user-editable and can appear in `auth.jwt()`, so it is unsafe for RLS policies or any other authorization logic. Store authorization data in `raw_app_meta_data` \u002F `app_metadata` instead.\n  - **Deleting a user does not invalidate existing access tokens.** Sign out or revoke sessions first, keep JWT expiry short for sensitive apps, and for strict guarantees validate `session_id` against `auth.sessions` on sensitive operations.\n  - **If you use `app_metadata` or `auth.jwt()` for authorization, remember JWT claims are not always fresh until the user's token is refreshed.**\n\n- **API key and client exposure**\n  - **Never expose the `service_role` or secret key in public clients.** Prefer publishable keys for frontend code. Legacy `anon` keys are only for compatibility. In Next.js, any `NEXT_PUBLIC_` env var is sent to the browser.\n\n- **RLS, views, and privileged database code**\n  - **Views bypass RLS by default.** In Postgres 15 and above, use `CREATE VIEW ... WITH (security_invoker = true)`. In older versions of Postgres, protect your views by revoking access from the `anon` and `authenticated` roles, or by putting them in an unexposed schema.\n  - **UPDATE requires a SELECT policy.** In Postgres RLS, an UPDATE needs to first SELECT the row. Without a SELECT policy, updates silently return 0 rows — no error, just no change.\n  - **`auth.role()` is deprecated — use the `TO` clause instead.** Supabase has deprecated `auth.role()` in favour of specifying the target role directly on the policy with `TO authenticated` or `TO anon`. Beyond deprecation, `auth.role() = 'authenticated'` breaks silently when anonymous sign-ins are enabled, because anonymous users carry the `authenticated` Postgres role and pass the check regardless of whether the user is genuinely signed in.\n    ```sql\n    -- Deprecated (do not use)\n    create policy \"example\" on table_name for select\n    using ( auth.role() = 'authenticated' );\n    ```\n  - **`TO authenticated` alone is authentication without authorization (BOLA \u002F IDOR).** Using `TO authenticated` only checks the role — it does not restrict which rows a user can access. The correct pattern combines `TO authenticated` with an ownership predicate in `USING`:\n    ```sql\n    create policy \"example\" on table_name for select\n    to authenticated\n    using ( (select auth.uid()) = user_id );\n    ```\n  - **UPDATE policies require both `USING` and `WITH CHECK`.** Without `WITH CHECK`, a user can reassign a row's `user_id` to another user:\n    ```sql\n    create policy \"example\" on table_name for update\n    to authenticated\n    using ( (select auth.uid()) = user_id )\n    with check ( (select auth.uid()) = user_id );\n    ```\n  - **`SECURITY DEFINER` functions bypass RLS.** A `SECURITY DEFINER` function runs with its creator's privileges — typically a role with `bypassrls` (e.g., `postgres`). Never add `SECURITY DEFINER` to resolve a permission error; it silently removes access control without fixing the underlying cause. Prefer `SECURITY INVOKER`.\n  - **`SECURITY DEFINER` functions in `public` are callable by all roles.** Postgres grants `EXECUTE` to `PUBLIC` by default for every new function, so any `SECURITY DEFINER` function in `public` is a public API endpoint callable by `anon` and `authenticated` (which inherit from `PUBLIC`) without any additional grant. When `SECURITY DEFINER` is genuinely needed (e.g., bypassing RLS on an internal lookup table), keep the function in a non-exposed schema, always include an `auth.uid()` check in the function body, and run `supabase db advisors` after making changes.\n\n- **Storage access control**\n  - **Storage upsert requires INSERT + SELECT + UPDATE.** Granting only INSERT allows new uploads but file replacement (upsert) silently fails. You need all three.\n\n- **Dependency and supply-chain security**\n  - **Always pin package versions and commit lockfiles** when installing Supabase packages (`supabase-js`, `@supabase\u002Fssr`, `supabase-py`, etc.). See the [npm security guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fsecurity\u002Fnpm-security.md) for the full checklist.\n\nFor any security concern not covered above, fetch the Supabase product security index: `https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fsecurity\u002Fproduct-security.md`\n\n## Supabase CLI\n\nAlways discover commands via `--help` — never guess. The CLI structure changes between versions.\n\n```bash\nsupabase --help                    # All top-level commands\nsupabase \u003Cgroup> --help            # Subcommands (e.g., supabase db --help)\nsupabase \u003Cgroup> \u003Ccommand> --help  # Flags for a specific command\n```\n\n**Supabase CLI Known gotchas:**\n\n- `supabase db query` requires **CLI v2.79.0+** → use MCP `execute_sql` or `psql` as fallback\n- `supabase db advisors` requires **CLI v2.81.3+** → use MCP `get_advisors` as fallback\n- When you need a new migration SQL file, **always** create it with `supabase migration new \u003Cname>` first. Never invent a migration filename or rely on memory for the expected format.\n\n**Version check and upgrade:** Run `supabase --version` to check. For CLI changelogs and version-specific features, consult the [CLI documentation](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Freference\u002Fcli\u002Fintroduction) or [GitHub releases](https:\u002F\u002Fgithub.com\u002Fsupabase\u002Fcli\u002Freleases).\n\n## Supabase MCP Server\n\nFor setup instructions, server URL, and configuration, see the [MCP setup guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fgetting-started\u002Fmcp).\n\n**Troubleshooting connection issues** — follow these steps in order:\n\n1. **Check if the server is reachable:**\n   `curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" https:\u002F\u002Fmcp.supabase.com\u002Fmcp`\n   A `401` is expected (no token) and means the server is up. Timeout or \"connection refused\" means it may be down.\n\n2. **Check `.mcp.json` configuration:**\n   Verify the project root has a valid `.mcp.json` with the correct server URL. If missing, create one pointing to `https:\u002F\u002Fmcp.supabase.com\u002Fmcp`.\n\n3. **Authenticate the MCP server:**\n   If the server is reachable and `.mcp.json` is correct but tools aren't visible, the user needs to authenticate. The Supabase MCP server uses OAuth 2.1 — tell the user to trigger the auth flow in their agent, complete it in the browser, and reload the session.\n\n## Supabase Documentation\n\nBefore implementing any Supabase feature, find the relevant documentation. Use these methods in priority order:\n\n1. **MCP `search_docs` tool** (preferred — returns relevant snippets directly)\n2. **Fetch docs pages as markdown** — any docs page can be fetched by appending `.md` to the URL path.\n3. **Web search** for Supabase-specific topics when you don't know which page to look at.\n\n## Making and Committing Schema Changes\n\n**To make schema changes, use `execute_sql` (MCP) or `supabase db query` (CLI).** These run SQL directly on the database without creating migration history entries, so you can iterate freely and generate a clean migration when ready.\n\nDo NOT use `apply_migration` to change a local database schema — it writes a migration history entry on every call, which means you can't iterate, and `supabase db diff` \u002F `supabase db pull` will produce empty or conflicting diffs. If you use it, you'll be stuck with whatever SQL you passed on the first try.\n\n**When ready to commit** your changes to a migration file:\n\n1. **Run advisors** → `supabase db advisors` (CLI v2.81.3+) or MCP `get_advisors`. Fix any issues.\n2. **Review the Security Checklist above** if your changes involve views, functions, triggers, or storage.\n3. **Generate the migration** → `supabase db pull \u003Cdescriptive-name> --local --yes`\n4. **Verify** → `supabase migration list --local`\n\n## Reference Guides\n\n- **Skill Feedback** → [references\u002Fskill-feedback.md](references\u002Fskill-feedback.md)\n  **MUST read when** the user reports that this skill gave incorrect guidance or is missing information.\n",{"data":42,"body":45},{"name":4,"description":6,"metadata":43},{"author":4,"version":44},"0.1.2",{"type":46,"children":47},"root",[48,55,62,74,96,106,116,153,170,206,252,262,939,950,956,969,1085,1093,1171,1205,1211,1224,1234,1311,1317,1322,1371,1377,1401,1429,1439,1506,1512,1536],{"type":49,"tag":50,"props":51,"children":52},"element","h1",{"id":4},[53],{"type":54,"value":17},"text",{"type":49,"tag":56,"props":57,"children":59},"h2",{"id":58},"core-principles",[60],{"type":54,"value":61},"Core Principles",{"type":49,"tag":63,"props":64,"children":65},"p",{},[66,72],{"type":49,"tag":67,"props":68,"children":69},"strong",{},[70],{"type":54,"value":71},"1. Supabase changes frequently — verify against changelog and current docs before implementing.",{"type":54,"value":73},"\nDo not rely on training data for Supabase features. Function signatures, config.toml settings, and API conventions change between versions.",{"type":49,"tag":63,"props":75,"children":76},{},[77,79,86,88,94],{"type":54,"value":78},"First, fetch ",{"type":49,"tag":80,"props":81,"children":83},"code",{"className":82},[],[84],{"type":54,"value":85},"https:\u002F\u002Fsupabase.com\u002Fchangelog.md",{"type":54,"value":87}," (a lightweight summary index — not a heavy pull), scan for ",{"type":49,"tag":80,"props":89,"children":91},{"className":90},[],[92],{"type":54,"value":93},"breaking-change",{"type":54,"value":95}," tags relevant to your task, and follow the linked page for any that apply. Then look up the relevant topic using the documentation access methods below.",{"type":49,"tag":63,"props":97,"children":98},{},[99,104],{"type":49,"tag":67,"props":100,"children":101},{},[102],{"type":54,"value":103},"2. Verify your work.",{"type":54,"value":105},"\nAfter implementing any fix, run a test query to confirm the change works. A fix without verification is incomplete.",{"type":49,"tag":63,"props":107,"children":108},{},[109,114],{"type":49,"tag":67,"props":110,"children":111},{},[112],{"type":54,"value":113},"3. Recover from errors, don't loop.",{"type":54,"value":115},"\nIf an approach fails after 2-3 attempts, stop and reconsider. Try a different method, check documentation, inspect the error more carefully, and review relevant logs when available. Supabase issues are not always solved by retrying the same command, and the answer is not always in the logs, but logs are often worth checking before proceeding.",{"type":49,"tag":63,"props":117,"children":118},{},[119,124,126,135,137,143,145,151],{"type":49,"tag":67,"props":120,"children":121},{},[122],{"type":54,"value":123},"4. Exposing tables to the Data API:",{"type":54,"value":125}," Depending on the user's ",{"type":49,"tag":127,"props":128,"children":132},"a",{"href":129,"rel":130},"https:\u002F\u002Fsupabase.com\u002Fdashboard\u002Fproject\u002F%3Cref%3E\u002Fintegrations\u002Fdata_api\u002Fsettings",[131],"nofollow",[133],{"type":54,"value":134},"Data API settings",{"type":54,"value":136},", newly created tables may not be automatically exposed via the Data (REST) API. If this is the case, ",{"type":49,"tag":80,"props":138,"children":140},{"className":139},[],[141],{"type":54,"value":142},"anon",{"type":54,"value":144}," and ",{"type":49,"tag":80,"props":146,"children":148},{"className":147},[],[149],{"type":54,"value":150},"authenticated",{"type":54,"value":152}," roles will need to be explicitly granted access.",{"type":49,"tag":154,"props":155,"children":156},"blockquote",{},[157],{"type":49,"tag":63,"props":158,"children":159},{},[160,162,168],{"type":54,"value":161},"Note that this is separate from RLS, which controls which ",{"type":49,"tag":163,"props":164,"children":165},"em",{},[166],{"type":54,"value":167},"rows",{"type":54,"value":169}," are visible once a table is accessible, not whether the table is accessible at all.",{"type":49,"tag":63,"props":171,"children":172},{},[173,175,181,183,188,190,195,197,204],{"type":54,"value":174},"When a user reports a SQL-created table is unexpectedly inaccessible, check their Data API settings and whether the roles have been granted access via explicit ",{"type":49,"tag":80,"props":176,"children":178},{"className":177},[],[179],{"type":54,"value":180},"GRANT",{"type":54,"value":182}," SQL. When granting public (",{"type":49,"tag":80,"props":184,"children":186},{"className":185},[],[187],{"type":54,"value":142},{"type":54,"value":189},"\u002F",{"type":49,"tag":80,"props":191,"children":193},{"className":192},[],[194],{"type":54,"value":150},{"type":54,"value":196},") access, always enable RLS too. See ",{"type":49,"tag":127,"props":198,"children":201},{"href":199,"rel":200},"https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fapi\u002Fsecuring-your-api.md",[131],[202],{"type":54,"value":203},"Exposing a Table to the Data API",{"type":54,"value":205}," for the full setup workflow.",{"type":49,"tag":63,"props":207,"children":208},{},[209,214,216,222,224,229,230,235,237,242,244,250],{"type":49,"tag":67,"props":210,"children":211},{},[212],{"type":54,"value":213},"5. RLS in exposed schemas.",{"type":54,"value":215},"\nEnable RLS on every table in any exposed schema, which includes ",{"type":49,"tag":80,"props":217,"children":219},{"className":218},[],[220],{"type":54,"value":221},"public",{"type":54,"value":223}," by default. This is critical in Supabase because tables in exposed schemas can be reachable through the Data API when the ",{"type":49,"tag":80,"props":225,"children":227},{"className":226},[],[228],{"type":54,"value":142},{"type":54,"value":189},{"type":49,"tag":80,"props":231,"children":233},{"className":232},[],[234],{"type":54,"value":150},{"type":54,"value":236}," roles have access (see ",{"type":49,"tag":127,"props":238,"children":240},{"href":199,"rel":239},[131],[241],{"type":54,"value":203},{"type":54,"value":243},"). For private schemas, prefer RLS as defense in depth. After enabling RLS, create policies that match the actual access model rather than defaulting every table to the same ",{"type":49,"tag":80,"props":245,"children":247},{"className":246},[],[248],{"type":54,"value":249},"auth.uid()",{"type":54,"value":251}," pattern.",{"type":49,"tag":63,"props":253,"children":254},{},[255,260],{"type":49,"tag":67,"props":256,"children":257},{},[258],{"type":54,"value":259},"6. Security checklist.",{"type":54,"value":261},"\nWhen working on any Supabase task that touches auth, RLS, views, storage, or user data, run through this checklist. These are Supabase-specific security traps that silently create vulnerabilities:",{"type":49,"tag":263,"props":264,"children":265},"ul",{},[266,376,420,865,886],{"type":49,"tag":267,"props":268,"children":269},"li",{},[270,275],{"type":49,"tag":67,"props":271,"children":272},{},[273],{"type":54,"value":274},"Auth and session security",{"type":49,"tag":263,"props":276,"children":277},{},[278,328,354],{"type":49,"tag":267,"props":279,"children":280},{},[281,294,296,302,304,310,312,318,320,326],{"type":49,"tag":67,"props":282,"children":283},{},[284,286,292],{"type":54,"value":285},"Never use ",{"type":49,"tag":80,"props":287,"children":289},{"className":288},[],[290],{"type":54,"value":291},"user_metadata",{"type":54,"value":293}," claims in JWT-based authorization decisions.",{"type":54,"value":295}," In Supabase, ",{"type":49,"tag":80,"props":297,"children":299},{"className":298},[],[300],{"type":54,"value":301},"raw_user_meta_data",{"type":54,"value":303}," is user-editable and can appear in ",{"type":49,"tag":80,"props":305,"children":307},{"className":306},[],[308],{"type":54,"value":309},"auth.jwt()",{"type":54,"value":311},", so it is unsafe for RLS policies or any other authorization logic. Store authorization data in ",{"type":49,"tag":80,"props":313,"children":315},{"className":314},[],[316],{"type":54,"value":317},"raw_app_meta_data",{"type":54,"value":319}," \u002F ",{"type":49,"tag":80,"props":321,"children":323},{"className":322},[],[324],{"type":54,"value":325},"app_metadata",{"type":54,"value":327}," instead.",{"type":49,"tag":267,"props":329,"children":330},{},[331,336,338,344,346,352],{"type":49,"tag":67,"props":332,"children":333},{},[334],{"type":54,"value":335},"Deleting a user does not invalidate existing access tokens.",{"type":54,"value":337}," Sign out or revoke sessions first, keep JWT expiry short for sensitive apps, and for strict guarantees validate ",{"type":49,"tag":80,"props":339,"children":341},{"className":340},[],[342],{"type":54,"value":343},"session_id",{"type":54,"value":345}," against ",{"type":49,"tag":80,"props":347,"children":349},{"className":348},[],[350],{"type":54,"value":351},"auth.sessions",{"type":54,"value":353}," on sensitive operations.",{"type":49,"tag":267,"props":355,"children":356},{},[357],{"type":49,"tag":67,"props":358,"children":359},{},[360,362,367,369,374],{"type":54,"value":361},"If you use ",{"type":49,"tag":80,"props":363,"children":365},{"className":364},[],[366],{"type":54,"value":325},{"type":54,"value":368}," or ",{"type":49,"tag":80,"props":370,"children":372},{"className":371},[],[373],{"type":54,"value":309},{"type":54,"value":375}," for authorization, remember JWT claims are not always fresh until the user's token is refreshed.",{"type":49,"tag":267,"props":377,"children":378},{},[379,384],{"type":49,"tag":67,"props":380,"children":381},{},[382],{"type":54,"value":383},"API key and client exposure",{"type":49,"tag":263,"props":385,"children":386},{},[387],{"type":49,"tag":267,"props":388,"children":389},{},[390,403,405,410,412,418],{"type":49,"tag":67,"props":391,"children":392},{},[393,395,401],{"type":54,"value":394},"Never expose the ",{"type":49,"tag":80,"props":396,"children":398},{"className":397},[],[399],{"type":54,"value":400},"service_role",{"type":54,"value":402}," or secret key in public clients.",{"type":54,"value":404}," Prefer publishable keys for frontend code. Legacy ",{"type":49,"tag":80,"props":406,"children":408},{"className":407},[],[409],{"type":54,"value":142},{"type":54,"value":411}," keys are only for compatibility. In Next.js, any ",{"type":49,"tag":80,"props":413,"children":415},{"className":414},[],[416],{"type":54,"value":417},"NEXT_PUBLIC_",{"type":54,"value":419}," env var is sent to the browser.",{"type":49,"tag":267,"props":421,"children":422},{},[423,428],{"type":49,"tag":67,"props":424,"children":425},{},[426],{"type":54,"value":427},"RLS, views, and privileged database code",{"type":49,"tag":263,"props":429,"children":430},{},[431,462,472,573,640,718,771],{"type":49,"tag":267,"props":432,"children":433},{},[434,439,441,447,449,454,455,460],{"type":49,"tag":67,"props":435,"children":436},{},[437],{"type":54,"value":438},"Views bypass RLS by default.",{"type":54,"value":440}," In Postgres 15 and above, use ",{"type":49,"tag":80,"props":442,"children":444},{"className":443},[],[445],{"type":54,"value":446},"CREATE VIEW ... WITH (security_invoker = true)",{"type":54,"value":448},". In older versions of Postgres, protect your views by revoking access from the ",{"type":49,"tag":80,"props":450,"children":452},{"className":451},[],[453],{"type":54,"value":142},{"type":54,"value":144},{"type":49,"tag":80,"props":456,"children":458},{"className":457},[],[459],{"type":54,"value":150},{"type":54,"value":461}," roles, or by putting them in an unexposed schema.",{"type":49,"tag":267,"props":463,"children":464},{},[465,470],{"type":49,"tag":67,"props":466,"children":467},{},[468],{"type":54,"value":469},"UPDATE requires a SELECT policy.",{"type":54,"value":471}," In Postgres RLS, an UPDATE needs to first SELECT the row. Without a SELECT policy, updates silently return 0 rows — no error, just no change.",{"type":49,"tag":267,"props":473,"children":474},{},[475,494,496,501,503,509,510,516,518,524,526,531,533],{"type":49,"tag":67,"props":476,"children":477},{},[478,484,486,492],{"type":49,"tag":80,"props":479,"children":481},{"className":480},[],[482],{"type":54,"value":483},"auth.role()",{"type":54,"value":485}," is deprecated — use the ",{"type":49,"tag":80,"props":487,"children":489},{"className":488},[],[490],{"type":54,"value":491},"TO",{"type":54,"value":493}," clause instead.",{"type":54,"value":495}," Supabase has deprecated ",{"type":49,"tag":80,"props":497,"children":499},{"className":498},[],[500],{"type":54,"value":483},{"type":54,"value":502}," in favour of specifying the target role directly on the policy with ",{"type":49,"tag":80,"props":504,"children":506},{"className":505},[],[507],{"type":54,"value":508},"TO authenticated",{"type":54,"value":368},{"type":49,"tag":80,"props":511,"children":513},{"className":512},[],[514],{"type":54,"value":515},"TO anon",{"type":54,"value":517},". Beyond deprecation, ",{"type":49,"tag":80,"props":519,"children":521},{"className":520},[],[522],{"type":54,"value":523},"auth.role() = 'authenticated'",{"type":54,"value":525}," breaks silently when anonymous sign-ins are enabled, because anonymous users carry the ",{"type":49,"tag":80,"props":527,"children":529},{"className":528},[],[530],{"type":54,"value":150},{"type":54,"value":532}," Postgres role and pass the check regardless of whether the user is genuinely signed in.\n",{"type":49,"tag":534,"props":535,"children":540},"pre",{"className":536,"code":537,"language":538,"meta":539,"style":539},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- Deprecated (do not use)\ncreate policy \"example\" on table_name for select\nusing ( auth.role() = 'authenticated' );\n","sql","",[541],{"type":49,"tag":80,"props":542,"children":543},{"__ignoreMap":539},[544,555,564],{"type":49,"tag":545,"props":546,"children":549},"span",{"class":547,"line":548},"line",1,[550],{"type":49,"tag":545,"props":551,"children":552},{},[553],{"type":54,"value":554},"-- Deprecated (do not use)\n",{"type":49,"tag":545,"props":556,"children":558},{"class":547,"line":557},2,[559],{"type":49,"tag":545,"props":560,"children":561},{},[562],{"type":54,"value":563},"create policy \"example\" on table_name for select\n",{"type":49,"tag":545,"props":565,"children":567},{"class":547,"line":566},3,[568],{"type":49,"tag":545,"props":569,"children":570},{},[571],{"type":54,"value":572},"using ( auth.role() = 'authenticated' );\n",{"type":49,"tag":267,"props":574,"children":575},{},[576,586,588,593,595,600,602,608,610],{"type":49,"tag":67,"props":577,"children":578},{},[579,584],{"type":49,"tag":80,"props":580,"children":582},{"className":581},[],[583],{"type":54,"value":508},{"type":54,"value":585}," alone is authentication without authorization (BOLA \u002F IDOR).",{"type":54,"value":587}," Using ",{"type":49,"tag":80,"props":589,"children":591},{"className":590},[],[592],{"type":54,"value":508},{"type":54,"value":594}," only checks the role — it does not restrict which rows a user can access. The correct pattern combines ",{"type":49,"tag":80,"props":596,"children":598},{"className":597},[],[599],{"type":54,"value":508},{"type":54,"value":601}," with an ownership predicate in ",{"type":49,"tag":80,"props":603,"children":605},{"className":604},[],[606],{"type":54,"value":607},"USING",{"type":54,"value":609},":\n",{"type":49,"tag":534,"props":611,"children":613},{"className":536,"code":612,"language":538,"meta":539,"style":539},"create policy \"example\" on table_name for select\nto authenticated\nusing ( (select auth.uid()) = user_id );\n",[614],{"type":49,"tag":80,"props":615,"children":616},{"__ignoreMap":539},[617,624,632],{"type":49,"tag":545,"props":618,"children":619},{"class":547,"line":548},[620],{"type":49,"tag":545,"props":621,"children":622},{},[623],{"type":54,"value":563},{"type":49,"tag":545,"props":625,"children":626},{"class":547,"line":557},[627],{"type":49,"tag":545,"props":628,"children":629},{},[630],{"type":54,"value":631},"to authenticated\n",{"type":49,"tag":545,"props":633,"children":634},{"class":547,"line":566},[635],{"type":49,"tag":545,"props":636,"children":637},{},[638],{"type":54,"value":639},"using ( (select auth.uid()) = user_id );\n",{"type":49,"tag":267,"props":641,"children":642},{},[643,662,664,669,671,677,679],{"type":49,"tag":67,"props":644,"children":645},{},[646,648,653,654,660],{"type":54,"value":647},"UPDATE policies require both ",{"type":49,"tag":80,"props":649,"children":651},{"className":650},[],[652],{"type":54,"value":607},{"type":54,"value":144},{"type":49,"tag":80,"props":655,"children":657},{"className":656},[],[658],{"type":54,"value":659},"WITH CHECK",{"type":54,"value":661},".",{"type":54,"value":663}," Without ",{"type":49,"tag":80,"props":665,"children":667},{"className":666},[],[668],{"type":54,"value":659},{"type":54,"value":670},", a user can reassign a row's ",{"type":49,"tag":80,"props":672,"children":674},{"className":673},[],[675],{"type":54,"value":676},"user_id",{"type":54,"value":678}," to another user:\n",{"type":49,"tag":534,"props":680,"children":682},{"className":536,"code":681,"language":538,"meta":539,"style":539},"create policy \"example\" on table_name for update\nto authenticated\nusing ( (select auth.uid()) = user_id )\nwith check ( (select auth.uid()) = user_id );\n",[683],{"type":49,"tag":80,"props":684,"children":685},{"__ignoreMap":539},[686,694,701,709],{"type":49,"tag":545,"props":687,"children":688},{"class":547,"line":548},[689],{"type":49,"tag":545,"props":690,"children":691},{},[692],{"type":54,"value":693},"create policy \"example\" on table_name for update\n",{"type":49,"tag":545,"props":695,"children":696},{"class":547,"line":557},[697],{"type":49,"tag":545,"props":698,"children":699},{},[700],{"type":54,"value":631},{"type":49,"tag":545,"props":702,"children":703},{"class":547,"line":566},[704],{"type":49,"tag":545,"props":705,"children":706},{},[707],{"type":54,"value":708},"using ( (select auth.uid()) = user_id )\n",{"type":49,"tag":545,"props":710,"children":712},{"class":547,"line":711},4,[713],{"type":49,"tag":545,"props":714,"children":715},{},[716],{"type":54,"value":717},"with check ( (select auth.uid()) = user_id );\n",{"type":49,"tag":267,"props":719,"children":720},{},[721,732,734,739,741,747,749,755,757,762,764,770],{"type":49,"tag":67,"props":722,"children":723},{},[724,730],{"type":49,"tag":80,"props":725,"children":727},{"className":726},[],[728],{"type":54,"value":729},"SECURITY DEFINER",{"type":54,"value":731}," functions bypass RLS.",{"type":54,"value":733}," A ",{"type":49,"tag":80,"props":735,"children":737},{"className":736},[],[738],{"type":54,"value":729},{"type":54,"value":740}," function runs with its creator's privileges — typically a role with ",{"type":49,"tag":80,"props":742,"children":744},{"className":743},[],[745],{"type":54,"value":746},"bypassrls",{"type":54,"value":748}," (e.g., ",{"type":49,"tag":80,"props":750,"children":752},{"className":751},[],[753],{"type":54,"value":754},"postgres",{"type":54,"value":756},"). Never add ",{"type":49,"tag":80,"props":758,"children":760},{"className":759},[],[761],{"type":54,"value":729},{"type":54,"value":763}," to resolve a permission error; it silently removes access control without fixing the underlying cause. Prefer ",{"type":49,"tag":80,"props":765,"children":767},{"className":766},[],[768],{"type":54,"value":769},"SECURITY INVOKER",{"type":54,"value":661},{"type":49,"tag":267,"props":772,"children":773},{},[774,791,793,799,801,807,809,814,816,821,823,828,829,834,836,841,843,848,850,855,857,863],{"type":49,"tag":67,"props":775,"children":776},{},[777,782,784,789],{"type":49,"tag":80,"props":778,"children":780},{"className":779},[],[781],{"type":54,"value":729},{"type":54,"value":783}," functions in ",{"type":49,"tag":80,"props":785,"children":787},{"className":786},[],[788],{"type":54,"value":221},{"type":54,"value":790}," are callable by all roles.",{"type":54,"value":792}," Postgres grants ",{"type":49,"tag":80,"props":794,"children":796},{"className":795},[],[797],{"type":54,"value":798},"EXECUTE",{"type":54,"value":800}," to ",{"type":49,"tag":80,"props":802,"children":804},{"className":803},[],[805],{"type":54,"value":806},"PUBLIC",{"type":54,"value":808}," by default for every new function, so any ",{"type":49,"tag":80,"props":810,"children":812},{"className":811},[],[813],{"type":54,"value":729},{"type":54,"value":815}," function in ",{"type":49,"tag":80,"props":817,"children":819},{"className":818},[],[820],{"type":54,"value":221},{"type":54,"value":822}," is a public API endpoint callable by ",{"type":49,"tag":80,"props":824,"children":826},{"className":825},[],[827],{"type":54,"value":142},{"type":54,"value":144},{"type":49,"tag":80,"props":830,"children":832},{"className":831},[],[833],{"type":54,"value":150},{"type":54,"value":835}," (which inherit from ",{"type":49,"tag":80,"props":837,"children":839},{"className":838},[],[840],{"type":54,"value":806},{"type":54,"value":842},") without any additional grant. When ",{"type":49,"tag":80,"props":844,"children":846},{"className":845},[],[847],{"type":54,"value":729},{"type":54,"value":849}," is genuinely needed (e.g., bypassing RLS on an internal lookup table), keep the function in a non-exposed schema, always include an ",{"type":49,"tag":80,"props":851,"children":853},{"className":852},[],[854],{"type":54,"value":249},{"type":54,"value":856}," check in the function body, and run ",{"type":49,"tag":80,"props":858,"children":860},{"className":859},[],[861],{"type":54,"value":862},"supabase db advisors",{"type":54,"value":864}," after making changes.",{"type":49,"tag":267,"props":866,"children":867},{},[868,873],{"type":49,"tag":67,"props":869,"children":870},{},[871],{"type":54,"value":872},"Storage access control",{"type":49,"tag":263,"props":874,"children":875},{},[876],{"type":49,"tag":267,"props":877,"children":878},{},[879,884],{"type":49,"tag":67,"props":880,"children":881},{},[882],{"type":54,"value":883},"Storage upsert requires INSERT + SELECT + UPDATE.",{"type":54,"value":885}," Granting only INSERT allows new uploads but file replacement (upsert) silently fails. You need all three.",{"type":49,"tag":267,"props":887,"children":888},{},[889,894],{"type":49,"tag":67,"props":890,"children":891},{},[892],{"type":54,"value":893},"Dependency and supply-chain security",{"type":49,"tag":263,"props":895,"children":896},{},[897],{"type":49,"tag":267,"props":898,"children":899},{},[900,905,907,913,915,921,922,928,930,937],{"type":49,"tag":67,"props":901,"children":902},{},[903],{"type":54,"value":904},"Always pin package versions and commit lockfiles",{"type":54,"value":906}," when installing Supabase packages (",{"type":49,"tag":80,"props":908,"children":910},{"className":909},[],[911],{"type":54,"value":912},"supabase-js",{"type":54,"value":914},", ",{"type":49,"tag":80,"props":916,"children":918},{"className":917},[],[919],{"type":54,"value":920},"@supabase\u002Fssr",{"type":54,"value":914},{"type":49,"tag":80,"props":923,"children":925},{"className":924},[],[926],{"type":54,"value":927},"supabase-py",{"type":54,"value":929},", etc.). See the ",{"type":49,"tag":127,"props":931,"children":934},{"href":932,"rel":933},"https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fsecurity\u002Fnpm-security.md",[131],[935],{"type":54,"value":936},"npm security guide",{"type":54,"value":938}," for the full checklist.",{"type":49,"tag":63,"props":940,"children":941},{},[942,944],{"type":54,"value":943},"For any security concern not covered above, fetch the Supabase product security index: ",{"type":49,"tag":80,"props":945,"children":947},{"className":946},[],[948],{"type":54,"value":949},"https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fsecurity\u002Fproduct-security.md",{"type":49,"tag":56,"props":951,"children":953},{"id":952},"supabase-cli",[954],{"type":54,"value":955},"Supabase CLI",{"type":49,"tag":63,"props":957,"children":958},{},[959,961,967],{"type":54,"value":960},"Always discover commands via ",{"type":49,"tag":80,"props":962,"children":964},{"className":963},[],[965],{"type":54,"value":966},"--help",{"type":54,"value":968}," — never guess. The CLI structure changes between versions.",{"type":49,"tag":534,"props":970,"children":974},{"className":971,"code":972,"language":973,"meta":539,"style":539},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","supabase --help                    # All top-level commands\nsupabase \u003Cgroup> --help            # Subcommands (e.g., supabase db --help)\nsupabase \u003Cgroup> \u003Ccommand> --help  # Flags for a specific command\n","bash",[975],{"type":49,"tag":80,"props":976,"children":977},{"__ignoreMap":539},[978,998,1035],{"type":49,"tag":545,"props":979,"children":980},{"class":547,"line":548},[981,986,992],{"type":49,"tag":545,"props":982,"children":984},{"style":983},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[985],{"type":54,"value":4},{"type":49,"tag":545,"props":987,"children":989},{"style":988},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[990],{"type":54,"value":991}," --help",{"type":49,"tag":545,"props":993,"children":995},{"style":994},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[996],{"type":54,"value":997},"                    # All top-level commands\n",{"type":49,"tag":545,"props":999,"children":1000},{"class":547,"line":557},[1001,1005,1011,1016,1021,1026,1030],{"type":49,"tag":545,"props":1002,"children":1003},{"style":983},[1004],{"type":54,"value":4},{"type":49,"tag":545,"props":1006,"children":1008},{"style":1007},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1009],{"type":54,"value":1010}," \u003C",{"type":49,"tag":545,"props":1012,"children":1013},{"style":988},[1014],{"type":54,"value":1015},"grou",{"type":49,"tag":545,"props":1017,"children":1019},{"style":1018},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1020],{"type":54,"value":63},{"type":49,"tag":545,"props":1022,"children":1023},{"style":1007},[1024],{"type":54,"value":1025},">",{"type":49,"tag":545,"props":1027,"children":1028},{"style":988},[1029],{"type":54,"value":991},{"type":49,"tag":545,"props":1031,"children":1032},{"style":994},[1033],{"type":54,"value":1034},"            # Subcommands (e.g., supabase db --help)\n",{"type":49,"tag":545,"props":1036,"children":1037},{"class":547,"line":566},[1038,1042,1046,1050,1054,1058,1062,1067,1072,1076,1080],{"type":49,"tag":545,"props":1039,"children":1040},{"style":983},[1041],{"type":54,"value":4},{"type":49,"tag":545,"props":1043,"children":1044},{"style":1007},[1045],{"type":54,"value":1010},{"type":49,"tag":545,"props":1047,"children":1048},{"style":988},[1049],{"type":54,"value":1015},{"type":49,"tag":545,"props":1051,"children":1052},{"style":1018},[1053],{"type":54,"value":63},{"type":49,"tag":545,"props":1055,"children":1056},{"style":1007},[1057],{"type":54,"value":1025},{"type":49,"tag":545,"props":1059,"children":1060},{"style":1007},[1061],{"type":54,"value":1010},{"type":49,"tag":545,"props":1063,"children":1064},{"style":988},[1065],{"type":54,"value":1066},"comman",{"type":49,"tag":545,"props":1068,"children":1069},{"style":1018},[1070],{"type":54,"value":1071},"d",{"type":49,"tag":545,"props":1073,"children":1074},{"style":1007},[1075],{"type":54,"value":1025},{"type":49,"tag":545,"props":1077,"children":1078},{"style":988},[1079],{"type":54,"value":991},{"type":49,"tag":545,"props":1081,"children":1082},{"style":994},[1083],{"type":54,"value":1084},"  # Flags for a specific command\n",{"type":49,"tag":63,"props":1086,"children":1087},{},[1088],{"type":49,"tag":67,"props":1089,"children":1090},{},[1091],{"type":54,"value":1092},"Supabase CLI Known gotchas:",{"type":49,"tag":263,"props":1094,"children":1095},{},[1096,1129,1151],{"type":49,"tag":267,"props":1097,"children":1098},{},[1099,1105,1107,1112,1114,1120,1121,1127],{"type":49,"tag":80,"props":1100,"children":1102},{"className":1101},[],[1103],{"type":54,"value":1104},"supabase db query",{"type":54,"value":1106}," requires ",{"type":49,"tag":67,"props":1108,"children":1109},{},[1110],{"type":54,"value":1111},"CLI v2.79.0+",{"type":54,"value":1113}," → use MCP ",{"type":49,"tag":80,"props":1115,"children":1117},{"className":1116},[],[1118],{"type":54,"value":1119},"execute_sql",{"type":54,"value":368},{"type":49,"tag":80,"props":1122,"children":1124},{"className":1123},[],[1125],{"type":54,"value":1126},"psql",{"type":54,"value":1128}," as fallback",{"type":49,"tag":267,"props":1130,"children":1131},{},[1132,1137,1138,1143,1144,1150],{"type":49,"tag":80,"props":1133,"children":1135},{"className":1134},[],[1136],{"type":54,"value":862},{"type":54,"value":1106},{"type":49,"tag":67,"props":1139,"children":1140},{},[1141],{"type":54,"value":1142},"CLI v2.81.3+",{"type":54,"value":1113},{"type":49,"tag":80,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":54,"value":1149},"get_advisors",{"type":54,"value":1128},{"type":49,"tag":267,"props":1152,"children":1153},{},[1154,1156,1161,1163,1169],{"type":54,"value":1155},"When you need a new migration SQL file, ",{"type":49,"tag":67,"props":1157,"children":1158},{},[1159],{"type":54,"value":1160},"always",{"type":54,"value":1162}," create it with ",{"type":49,"tag":80,"props":1164,"children":1166},{"className":1165},[],[1167],{"type":54,"value":1168},"supabase migration new \u003Cname>",{"type":54,"value":1170}," first. Never invent a migration filename or rely on memory for the expected format.",{"type":49,"tag":63,"props":1172,"children":1173},{},[1174,1179,1181,1187,1189,1196,1197,1204],{"type":49,"tag":67,"props":1175,"children":1176},{},[1177],{"type":54,"value":1178},"Version check and upgrade:",{"type":54,"value":1180}," Run ",{"type":49,"tag":80,"props":1182,"children":1184},{"className":1183},[],[1185],{"type":54,"value":1186},"supabase --version",{"type":54,"value":1188}," to check. For CLI changelogs and version-specific features, consult the ",{"type":49,"tag":127,"props":1190,"children":1193},{"href":1191,"rel":1192},"https:\u002F\u002Fsupabase.com\u002Fdocs\u002Freference\u002Fcli\u002Fintroduction",[131],[1194],{"type":54,"value":1195},"CLI documentation",{"type":54,"value":368},{"type":49,"tag":127,"props":1198,"children":1201},{"href":1199,"rel":1200},"https:\u002F\u002Fgithub.com\u002Fsupabase\u002Fcli\u002Freleases",[131],[1202],{"type":54,"value":1203},"GitHub releases",{"type":54,"value":661},{"type":49,"tag":56,"props":1206,"children":1208},{"id":1207},"supabase-mcp-server",[1209],{"type":54,"value":1210},"Supabase MCP Server",{"type":49,"tag":63,"props":1212,"children":1213},{},[1214,1216,1223],{"type":54,"value":1215},"For setup instructions, server URL, and configuration, see the ",{"type":49,"tag":127,"props":1217,"children":1220},{"href":1218,"rel":1219},"https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fgetting-started\u002Fmcp",[131],[1221],{"type":54,"value":1222},"MCP setup guide",{"type":54,"value":661},{"type":49,"tag":63,"props":1225,"children":1226},{},[1227,1232],{"type":49,"tag":67,"props":1228,"children":1229},{},[1230],{"type":54,"value":1231},"Troubleshooting connection issues",{"type":54,"value":1233}," — follow these steps in order:",{"type":49,"tag":1235,"props":1236,"children":1237},"ol",{},[1238,1262,1294],{"type":49,"tag":267,"props":1239,"children":1240},{},[1241,1246,1252,1254,1260],{"type":49,"tag":67,"props":1242,"children":1243},{},[1244],{"type":54,"value":1245},"Check if the server is reachable:",{"type":49,"tag":80,"props":1247,"children":1249},{"className":1248},[],[1250],{"type":54,"value":1251},"curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" https:\u002F\u002Fmcp.supabase.com\u002Fmcp",{"type":54,"value":1253},"\nA ",{"type":49,"tag":80,"props":1255,"children":1257},{"className":1256},[],[1258],{"type":54,"value":1259},"401",{"type":54,"value":1261}," is expected (no token) and means the server is up. Timeout or \"connection refused\" means it may be down.",{"type":49,"tag":267,"props":1263,"children":1264},{},[1265,1278,1280,1285,1287,1293],{"type":49,"tag":67,"props":1266,"children":1267},{},[1268,1270,1276],{"type":54,"value":1269},"Check ",{"type":49,"tag":80,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":54,"value":1275},".mcp.json",{"type":54,"value":1277}," configuration:",{"type":54,"value":1279},"\nVerify the project root has a valid ",{"type":49,"tag":80,"props":1281,"children":1283},{"className":1282},[],[1284],{"type":54,"value":1275},{"type":54,"value":1286}," with the correct server URL. If missing, create one pointing to ",{"type":49,"tag":80,"props":1288,"children":1290},{"className":1289},[],[1291],{"type":54,"value":1292},"https:\u002F\u002Fmcp.supabase.com\u002Fmcp",{"type":54,"value":661},{"type":49,"tag":267,"props":1295,"children":1296},{},[1297,1302,1304,1309],{"type":49,"tag":67,"props":1298,"children":1299},{},[1300],{"type":54,"value":1301},"Authenticate the MCP server:",{"type":54,"value":1303},"\nIf the server is reachable and ",{"type":49,"tag":80,"props":1305,"children":1307},{"className":1306},[],[1308],{"type":54,"value":1275},{"type":54,"value":1310}," is correct but tools aren't visible, the user needs to authenticate. The Supabase MCP server uses OAuth 2.1 — tell the user to trigger the auth flow in their agent, complete it in the browser, and reload the session.",{"type":49,"tag":56,"props":1312,"children":1314},{"id":1313},"supabase-documentation",[1315],{"type":54,"value":1316},"Supabase Documentation",{"type":49,"tag":63,"props":1318,"children":1319},{},[1320],{"type":54,"value":1321},"Before implementing any Supabase feature, find the relevant documentation. Use these methods in priority order:",{"type":49,"tag":1235,"props":1323,"children":1324},{},[1325,1343,1361],{"type":49,"tag":267,"props":1326,"children":1327},{},[1328,1341],{"type":49,"tag":67,"props":1329,"children":1330},{},[1331,1333,1339],{"type":54,"value":1332},"MCP ",{"type":49,"tag":80,"props":1334,"children":1336},{"className":1335},[],[1337],{"type":54,"value":1338},"search_docs",{"type":54,"value":1340}," tool",{"type":54,"value":1342}," (preferred — returns relevant snippets directly)",{"type":49,"tag":267,"props":1344,"children":1345},{},[1346,1351,1353,1359],{"type":49,"tag":67,"props":1347,"children":1348},{},[1349],{"type":54,"value":1350},"Fetch docs pages as markdown",{"type":54,"value":1352}," — any docs page can be fetched by appending ",{"type":49,"tag":80,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":54,"value":1358},".md",{"type":54,"value":1360}," to the URL path.",{"type":49,"tag":267,"props":1362,"children":1363},{},[1364,1369],{"type":49,"tag":67,"props":1365,"children":1366},{},[1367],{"type":54,"value":1368},"Web search",{"type":54,"value":1370}," for Supabase-specific topics when you don't know which page to look at.",{"type":49,"tag":56,"props":1372,"children":1374},{"id":1373},"making-and-committing-schema-changes",[1375],{"type":54,"value":1376},"Making and Committing Schema Changes",{"type":49,"tag":63,"props":1378,"children":1379},{},[1380,1399],{"type":49,"tag":67,"props":1381,"children":1382},{},[1383,1385,1390,1392,1397],{"type":54,"value":1384},"To make schema changes, use ",{"type":49,"tag":80,"props":1386,"children":1388},{"className":1387},[],[1389],{"type":54,"value":1119},{"type":54,"value":1391}," (MCP) or ",{"type":49,"tag":80,"props":1393,"children":1395},{"className":1394},[],[1396],{"type":54,"value":1104},{"type":54,"value":1398}," (CLI).",{"type":54,"value":1400}," These run SQL directly on the database without creating migration history entries, so you can iterate freely and generate a clean migration when ready.",{"type":49,"tag":63,"props":1402,"children":1403},{},[1404,1406,1412,1414,1420,1421,1427],{"type":54,"value":1405},"Do NOT use ",{"type":49,"tag":80,"props":1407,"children":1409},{"className":1408},[],[1410],{"type":54,"value":1411},"apply_migration",{"type":54,"value":1413}," to change a local database schema — it writes a migration history entry on every call, which means you can't iterate, and ",{"type":49,"tag":80,"props":1415,"children":1417},{"className":1416},[],[1418],{"type":54,"value":1419},"supabase db diff",{"type":54,"value":319},{"type":49,"tag":80,"props":1422,"children":1424},{"className":1423},[],[1425],{"type":54,"value":1426},"supabase db pull",{"type":54,"value":1428}," will produce empty or conflicting diffs. If you use it, you'll be stuck with whatever SQL you passed on the first try.",{"type":49,"tag":63,"props":1430,"children":1431},{},[1432,1437],{"type":49,"tag":67,"props":1433,"children":1434},{},[1435],{"type":54,"value":1436},"When ready to commit",{"type":54,"value":1438}," your changes to a migration file:",{"type":49,"tag":1235,"props":1440,"children":1441},{},[1442,1466,1476,1491],{"type":49,"tag":267,"props":1443,"children":1444},{},[1445,1450,1452,1457,1459,1464],{"type":49,"tag":67,"props":1446,"children":1447},{},[1448],{"type":54,"value":1449},"Run advisors",{"type":54,"value":1451}," → ",{"type":49,"tag":80,"props":1453,"children":1455},{"className":1454},[],[1456],{"type":54,"value":862},{"type":54,"value":1458}," (CLI v2.81.3+) or MCP ",{"type":49,"tag":80,"props":1460,"children":1462},{"className":1461},[],[1463],{"type":54,"value":1149},{"type":54,"value":1465},". Fix any issues.",{"type":49,"tag":267,"props":1467,"children":1468},{},[1469,1474],{"type":49,"tag":67,"props":1470,"children":1471},{},[1472],{"type":54,"value":1473},"Review the Security Checklist above",{"type":54,"value":1475}," if your changes involve views, functions, triggers, or storage.",{"type":49,"tag":267,"props":1477,"children":1478},{},[1479,1484,1485],{"type":49,"tag":67,"props":1480,"children":1481},{},[1482],{"type":54,"value":1483},"Generate the migration",{"type":54,"value":1451},{"type":49,"tag":80,"props":1486,"children":1488},{"className":1487},[],[1489],{"type":54,"value":1490},"supabase db pull \u003Cdescriptive-name> --local --yes",{"type":49,"tag":267,"props":1492,"children":1493},{},[1494,1499,1500],{"type":49,"tag":67,"props":1495,"children":1496},{},[1497],{"type":54,"value":1498},"Verify",{"type":54,"value":1451},{"type":49,"tag":80,"props":1501,"children":1503},{"className":1502},[],[1504],{"type":54,"value":1505},"supabase migration list --local",{"type":49,"tag":56,"props":1507,"children":1509},{"id":1508},"reference-guides",[1510],{"type":54,"value":1511},"Reference Guides",{"type":49,"tag":263,"props":1513,"children":1514},{},[1515],{"type":49,"tag":267,"props":1516,"children":1517},{},[1518,1523,1524,1529,1534],{"type":49,"tag":67,"props":1519,"children":1520},{},[1521],{"type":54,"value":1522},"Skill Feedback",{"type":54,"value":1451},{"type":49,"tag":127,"props":1525,"children":1527},{"href":1526},"references\u002Fskill-feedback.md",[1528],{"type":54,"value":1526},{"type":49,"tag":67,"props":1530,"children":1531},{},[1532],{"type":54,"value":1533},"MUST read when",{"type":54,"value":1535}," the user reports that this skill gave incorrect guidance or is missing information.",{"type":49,"tag":1537,"props":1538,"children":1539},"style",{},[1540],{"type":54,"value":1541},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1543,"total":1663},[1544,1563,1579,1591,1611,1633,1653],{"slug":1545,"name":1545,"fn":1546,"description":1547,"org":1548,"tags":1549,"stars":30,"repoUrl":31,"updatedAt":1562},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1550,1553,1556,1559],{"name":1551,"slug":1552,"type":15},"Accessibility","accessibility",{"name":1554,"slug":1555,"type":15},"Charts","charts",{"name":1557,"slug":1558,"type":15},"Data Visualization","data-visualization",{"name":1560,"slug":1561,"type":15},"Design","design","2026-06-30T19:00:57.102",{"slug":1564,"name":1564,"fn":1565,"description":1566,"org":1567,"tags":1568,"stars":30,"repoUrl":31,"updatedAt":1578},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1569,1572,1575],{"name":1570,"slug":1571,"type":15},"Agents","agents",{"name":1573,"slug":1574,"type":15},"Browser Automation","browser-automation",{"name":1576,"slug":1577,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":1580,"name":1580,"fn":1581,"description":1582,"org":1583,"tags":1584,"stars":30,"repoUrl":31,"updatedAt":1590},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1585,1586,1589],{"name":1573,"slug":1574,"type":15},{"name":1587,"slug":1588,"type":15},"Local Development","local-development",{"name":1576,"slug":1577,"type":15},"2026-04-06T18:41:17.526867",{"slug":1592,"name":1592,"fn":1593,"description":1594,"org":1595,"tags":1596,"stars":30,"repoUrl":31,"updatedAt":1610},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1597,1598,1601,1604,1607],{"name":1570,"slug":1571,"type":15},{"name":1599,"slug":1600,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":1602,"slug":1603,"type":15},"SDK","sdk",{"name":1605,"slug":1606,"type":15},"Serverless","serverless",{"name":1608,"slug":1609,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":1612,"name":1612,"fn":1613,"description":1614,"org":1615,"tags":1616,"stars":30,"repoUrl":31,"updatedAt":1632},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1617,1620,1623,1626,1629],{"name":1618,"slug":1619,"type":15},"Frontend","frontend",{"name":1621,"slug":1622,"type":15},"React","react",{"name":1624,"slug":1625,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":1627,"slug":1628,"type":15},"UI Components","ui-components",{"name":1630,"slug":1631,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":1634,"name":1634,"fn":1635,"description":1636,"org":1637,"tags":1638,"stars":30,"repoUrl":31,"updatedAt":1652},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1639,1642,1645,1648,1651],{"name":1640,"slug":1641,"type":15},"AI Infrastructure","ai-infrastructure",{"name":1643,"slug":1644,"type":15},"Cost Optimization","cost-optimization",{"name":1646,"slug":1647,"type":15},"LLM","llm",{"name":1649,"slug":1650,"type":15},"Performance","performance",{"name":1630,"slug":1631,"type":15},"2026-04-06T18:40:44.377464",{"slug":1654,"name":1654,"fn":1655,"description":1656,"org":1657,"tags":1658,"stars":30,"repoUrl":31,"updatedAt":1662},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1659,1660,1661],{"name":1643,"slug":1644,"type":15},{"name":19,"slug":20,"type":15},{"name":1646,"slug":1647,"type":15},"2026-04-06T18:41:08.513425",600,{"items":1665,"total":1862},[1666,1687,1710,1727,1743,1760,1779,1791,1805,1819,1831,1846],{"slug":1667,"name":1667,"fn":1668,"description":1669,"org":1670,"tags":1671,"stars":1684,"repoUrl":1685,"updatedAt":1686},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1672,1675,1678,1681],{"name":1673,"slug":1674,"type":15},"Documents","documents",{"name":1676,"slug":1677,"type":15},"Healthcare","healthcare",{"name":1679,"slug":1680,"type":15},"Insurance","insurance",{"name":1682,"slug":1683,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":1688,"name":1688,"fn":1689,"description":1690,"org":1691,"tags":1692,"stars":1707,"repoUrl":1708,"updatedAt":1709},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1693,1696,1698,1701,1704],{"name":1694,"slug":1695,"type":15},".NET","dotnet",{"name":1697,"slug":1688,"type":15},"ASP.NET Core",{"name":1699,"slug":1700,"type":15},"Blazor","blazor",{"name":1702,"slug":1703,"type":15},"C#","csharp",{"name":1705,"slug":1706,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":1711,"name":1711,"fn":1712,"description":1713,"org":1714,"tags":1715,"stars":1707,"repoUrl":1708,"updatedAt":1726},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1716,1719,1722,1725],{"name":1717,"slug":1718,"type":15},"Apps SDK","apps-sdk",{"name":1720,"slug":1721,"type":15},"ChatGPT","chatgpt",{"name":1723,"slug":1724,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":1728,"name":1728,"fn":1729,"description":1730,"org":1731,"tags":1732,"stars":1707,"repoUrl":1708,"updatedAt":1742},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1733,1736,1739],{"name":1734,"slug":1735,"type":15},"API Development","api-development",{"name":1737,"slug":1738,"type":15},"CLI","cli",{"name":1740,"slug":1741,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":1744,"name":1744,"fn":1745,"description":1746,"org":1747,"tags":1748,"stars":1707,"repoUrl":1708,"updatedAt":1759},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1749,1752,1755,1756],{"name":1750,"slug":1751,"type":15},"Cloudflare","cloudflare",{"name":1753,"slug":1754,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":1599,"slug":1600,"type":15},{"name":1757,"slug":1758,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":1761,"name":1761,"fn":1762,"description":1763,"org":1764,"tags":1765,"stars":1707,"repoUrl":1708,"updatedAt":1778},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1766,1769,1772,1775],{"name":1767,"slug":1768,"type":15},"Productivity","productivity",{"name":1770,"slug":1771,"type":15},"Project Management","project-management",{"name":1773,"slug":1774,"type":15},"Strategy","strategy",{"name":1776,"slug":1777,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":1780,"name":1780,"fn":1781,"description":1782,"org":1783,"tags":1784,"stars":1707,"repoUrl":1708,"updatedAt":1790},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1785,1786,1788,1789],{"name":1560,"slug":1561,"type":15},{"name":1787,"slug":1780,"type":15},"Figma",{"name":1618,"slug":1619,"type":15},{"name":1723,"slug":1724,"type":15},"2026-04-12T05:06:47.939943",{"slug":1792,"name":1792,"fn":1793,"description":1794,"org":1795,"tags":1796,"stars":1707,"repoUrl":1708,"updatedAt":1804},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1797,1798,1801,1802,1803],{"name":1560,"slug":1561,"type":15},{"name":1799,"slug":1800,"type":15},"Design System","design-system",{"name":1787,"slug":1780,"type":15},{"name":1618,"slug":1619,"type":15},{"name":1627,"slug":1628,"type":15},"2026-05-10T05:59:52.971881",{"slug":1806,"name":1806,"fn":1807,"description":1808,"org":1809,"tags":1810,"stars":1707,"repoUrl":1708,"updatedAt":1818},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1811,1812,1813,1816,1817],{"name":1560,"slug":1561,"type":15},{"name":1799,"slug":1800,"type":15},{"name":1814,"slug":1815,"type":15},"Documentation","documentation",{"name":1787,"slug":1780,"type":15},{"name":1618,"slug":1619,"type":15},"2026-05-16T06:07:47.821474",{"slug":1820,"name":1820,"fn":1821,"description":1822,"org":1823,"tags":1824,"stars":1707,"repoUrl":1708,"updatedAt":1830},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1825,1826,1827,1828,1829],{"name":1560,"slug":1561,"type":15},{"name":1787,"slug":1780,"type":15},{"name":1618,"slug":1619,"type":15},{"name":1627,"slug":1628,"type":15},{"name":1705,"slug":1706,"type":15},"2026-05-16T06:07:40.583615",{"slug":1832,"name":1832,"fn":1833,"description":1834,"org":1835,"tags":1836,"stars":1707,"repoUrl":1708,"updatedAt":1845},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1837,1840,1841,1844],{"name":1838,"slug":1839,"type":15},"Animation","animation",{"name":1740,"slug":1741,"type":15},{"name":1842,"slug":1843,"type":15},"Creative","creative",{"name":1560,"slug":1561,"type":15},"2026-05-02T05:31:48.48485",{"slug":1847,"name":1847,"fn":1848,"description":1849,"org":1850,"tags":1851,"stars":1707,"repoUrl":1708,"updatedAt":1861},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1852,1853,1854,1857,1860],{"name":1842,"slug":1843,"type":15},{"name":1560,"slug":1561,"type":15},{"name":1855,"slug":1856,"type":15},"Image Generation","image-generation",{"name":1858,"slug":1859,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]