Agent skill
chatgpt-app:add-database
Configure a PostgreSQL database for your ChatGPT App using Supabase for data persistence.
Install this agent skill to your Project
npx add-skill https://github.com/hollaugo/tutorials/tree/main/chatgpt-apps-plugin/skills/add-database
SKILL.md
Configure Database
You are helping the user add a PostgreSQL database to their ChatGPT App using Supabase.
When to Add Database
- App needs to persist user data
- Data survives across conversations
- Multiple entities with relationships
- Query and filter capabilities needed
Workflow
-
Check Supabase Setup Ask:
- "Do you have a Supabase project?"
- If no, guide them to create one at supabase.com
-
Gather Credentials
- Project URL
- Anon Key (public)
- Service Key (private, server-side)
-
Define Entities For each entity, gather:
- Name (e.g., "Task", "Recipe")
- Fields and types
- Relationships to other entities
-
Generate Schema Use
chatgpt-schema-designeragent to create:- SQL migrations in
supabase/migrations/ - TypeScript types
- Query helpers
- SQL migrations in
-
Generate Connection Pool Create
server/db/pool.ts. -
Setup Local Development Create Supabase config and start scripts.
-
Apply Migrations
bashsupabase start supabase db reset
Schema Requirements
Every table MUST have:
id UUID PRIMARY KEYuser_subject TEXT NOT NULL(for data isolation)created_at TIMESTAMPTZupdated_at TIMESTAMPTZ- Index on
(user_subject)
Environment Variables
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
Query Pattern
Always filter by user_subject:
SELECT * FROM tasks WHERE user_subject = $1
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
chatgpt-app:new
Create a new ChatGPT App from concept to working code. Guides through conceptualization, design, implementation, testing, and deployment.
chatgpt-app:add-auth
Configure authentication for your ChatGPT App using Auth0 or Supabase Auth for multi-user support.
chatgpt-app:add-tool
Add a new MCP tool to your ChatGPT App. Guides through tool design, schema creation, and code generation.
chatgpt-app:deploy
Deploy your ChatGPT App to Render with PostgreSQL database and automatic health checks.
chatgpt-app:golden-prompts
Generate test prompts to validate that ChatGPT will correctly invoke your app's tools.
chatgpt-app:add-widget
Add a new inline widget to your ChatGPT App with Tailwind CSS and Apps SDK integration.
Didn't find tool you were looking for?