docs: Update the prompt examples to make it more Cursor friendly (#33315)

* Update the instruction to add to project

* bringing Cursor at the front, because that is the most popular one of all

* Add sample description and globs for all sample prompt within the docs

* remove the cursor rule I created by mistake

* fix typo
This commit is contained in:
Tyler authored and GitHub committed 2025-02-05 10:16:25 +09:00
1 parent af7d12cedb
commit 806a8227b9
7 files changed
+32 -10

No files matched your search

@@ -3,13 +3,13 @@ title: AI Prompts
subtitle: Prompts for working with Supabase using AI-powered IDE tools
---
We've curated a selection of prompts to help you work with Supabase using your favorite AI-powered IDE tools, such as GitHub Copilot or Cursor.
We've curated a selection of prompts to help you work with Supabase using your favorite AI-powered IDE tools, such as Cursor or GitHub Copilot.
## How to use
Copy the prompt to a file in your repo.
Use the "include file" feature from your AI tool to include the prompt when chatting with your AI assistant. For example, with GitHub Copilot, use `#<filename>`, in Cursor, use `@Files`, and in Zed, use `/file`.
Use the "include file" feature from your AI tool to include the prompt when chatting with your AI assistant. For example, in Cursor, add them as [project rules](https://docs.cursor.com/context/rules-for-ai#project-rules-recommended), with GitHub Copilot, use `#<filename>`, and in Zed, use `/file`.
## Prompts
+5 -1
View File
@@ -1,4 +1,8 @@
# Postgres SQL Style Guide
---
# Specify the following for Cursor rules
description: Guidelines for writing Postgres SQL
globs: "**/*.sql"
---
## General
@@ -1,6 +1,8 @@
<!-- SUGGESTION: include the `code-format-sql.md` prompt for coding style. -->
# Database: Create migration
---
# Specify the following for Cursor rules
description: Guidelines for writing Postgres migrations
globs: "supabase/migrations/**/*.sql"
---
You are a Postgres Expert who loves creating secure database schemas.
+5 -1
View File
@@ -1,4 +1,8 @@
# Database: Create functions
---
# Specify the following for Cursor rules
description: Guidelines for writing Supabase database functions
globs: "**/*.sql"
---
You're a Supabase Postgres expert in writing database functions. Generate **high-quality PostgreSQL functions** that adhere to the following best practices:
+5 -1
View File
@@ -1,4 +1,8 @@
# Database: Create RLS policies
---
# Specify the following for Cursor rules
description: Guidelines for writing Postgres Row Level Security policies
globs: "**/*.sql"
---
You're a Supabase Postgres expert in writing row level security policies. Your purpose is to generate a policy with the constraints given by the user. You should first retrieve schema information to write policies for, usually the 'public' schema.
+5 -1
View File
@@ -1,4 +1,8 @@
# Writing Supabase Edge Functions
---
# Specify the following for Cursor rules
description: Coding rules for Supabase Edge Functions
globs: "supabase/functions/**/*.ts"
---
You're an expert in writing TypeScript and Deno JavaScript runtime. Generate **high-quality Supabase Edge Functions** that adhere to the following best practices:
+5 -1
View File
@@ -1,4 +1,8 @@
# Bootstrap Next.js app with Supabase Auth
---
# Specify the following for Cursor rules
description: Guidelines for writing Next.js apps with Supabase Auth
globs: "**/*.ts, **/*.tsx, **/*.js, **/*.jsx"
---
Create a Next.js app that uses App Router with Supabase Auth.