AGENT SKILL

supabase-schema-from-requirements

Execute Supabase primary workflow: Schema from Requirements. Use when Starting a new project with defined data requirements, Refactoring an existing schema based on new features, or Creating migrations from specification documents. Trigger with phrases like "supabase schema from requirements", "generate database schema with supabase".

License 许可
MIT
最近更新
2026-03-20
Stars
★ 4
Forks
0

01 前言 Front Matter

name
supabase-schema-from-requirements
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Execute Supabase primary workflow: Schema from Requirements. Use when Starting a new project with defined data requirements, Refactoring an existing schema based on new features, or Creating migrations from specification documents. Trigger with phrases like "supabase schema from requirements", "generate database schema with supabase".
allowed-tools
Read, Write, Edit, Bash(npm:*), Grep
compatible-with
claude-code, codex, openclaw

03 SKILL.md 正文

Supabase Schema from Requirements

Overview

Generate Supabase database schema from natural language requirements. This is the primary workflow for starting new Supabase projects. Translating business requirements directly into a well-structured Postgres schema with Row Level Security policies, appropriate indexes, and foreign key constraints is one of the highest-leverage activities in the early stages of a project. A well-designed schema is far cheaper to iterate on before data is in production than after.

Prerequisites

  • Completed supabase-install-auth setup
  • Understanding of Supabase core concepts
  • Valid API credentials configured

Instructions

Step 1: Initialize

Parse the natural language requirements into a structured entity list. Identify the main entities, their attributes, the relationships between them (one-to-one, one-to-many, many-to-many), and the access control rules that determine who can see or modify each entity. Clarify any ambiguous requirements before generating SQL to avoid costly schema revisions later.

// Step 1 implementation

Step 2: Execute

Generate the SQL migration file that creates the tables, defines foreign key constraints, adds appropriate indexes on foreign keys and frequently filtered columns, and sets up Row Level Security policies matching the identified access control rules. Review the generated schema for normalization issues and verify that the RLS policies correctly implement the intent of the requirements.

// Step 2 implementation

Step 3: Finalize

Apply the migration to your Supabase project and run integration tests that exercise each RLS policy with different user roles to confirm access control behaves as specified. Document the schema design decisions, particularly any denormalization choices made for performance reasons, so future maintainers understand the rationale.

// Step 3 implementation

Output

  • Structured entity model derived from natural language requirements
  • SQL migration creating tables, indexes, and RLS policies
  • Verified schema with passing integration tests for each access control rule

Error Handling

Error Cause Solution
Error 1 Cause Solution
Error 2 Cause Solution

Examples

Complete Workflow

// Complete workflow example

Common Variations

  • Variation 1: Description
  • Variation 2: Description

Resources

Next Steps

For secondary workflow, see supabase-auth-storage-realtime-core.

04 同仓库更多 Skills

micsapp
micsapp/micstec-skills

azure-apim-architecture

Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.

开发工程师后端与接口
★ 4
micsapp
micsapp/micstec-skills

apiops-deployment

Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.

开发工程师后端与接口运维与部署
★ 4
micsapp
micsapp/micstec-skills

apim-policy-authoring

Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.

后端与接口
★ 4
micsapp
micsapp/micstec-skills

api-security-review

Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.

开发工程师后端与接口
★ 4
micsapp
micsapp/micstec-skills

jira-cli

Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.

★ 4
micsapp
micsapp/micstec-skills

calculator

Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.

★ 4