/dev-workflow:postgrest-baas-builderfrom dev-workflow
Build services on PostgREST-compatible BaaS (Supabase / InsForge) — RLS, Auth, PostgREST queries, MCP settings. This skill MUST be loaded before writing any RLS policy or PostgREST query, and MUST NOT be skipped because the query looks like ordinary SQL. Triggers on: 用 Supabase / InsForge 做後端, 設計 RLS policy, 寫 PostgREST query, 處理 BaaS Auth, 設定 MCP, 推 Supabase production, 自架 Supabase, InsForge
Ships in dev-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
載入這個 skill 前,先確認已載入 db-engineering。 通用 DB 鐵則(migration 紀律、稽核 log、軟刪除、效能、完整性、環境分離)都在 db-engineering 裡,這裡只處理 BaaS 專用的部分。
public schema 下每一張新表,建立時就 enable row level security,並補上明確 policy。沒有例外、不是選項。
撰寫或修改 policy 前,先讀 RLS 規範與樣板。
認證一律走 auth.users(Supabase)或平台內建 auth(InsForge),不要自己另開一張 users 表來做帳密。要存額外的使用者資料時,才開一張 profiles 之類的擴充表,以 auth.users.id 為外鍵。
串接 Auth、擴充 profiles 或處理 JWT 驗證前,先讀 Auth 指南;InsForge 另依下方平台指南適配。
select= 明列欄位,不用 *撰寫或修改 policy、PostgREST 查詢前,必讀 效能指南。
auth.uid() 一律包成 (select auth.uid())to <role>security definer function 要 set search_path = '' 並標 stable含金鑰的 .mcp.json 加入 .gitignore,另建不含真實金鑰的 .mcp.json.example 供版本控制。
JWT_SECRET第一次接手自架 Supabase,先跑 自架指南 的全面 checklist。後續處理 Auth 簽章、金鑰輪換或服務設定時,先讀其中對應章節。
/rest/v1/* → /api/database/records/*ik_ 前綴)moddatetime 不能裝、raw_user_meta_data 不存在、cron.schedule 不能寫第一次接手 InsForge,先跑 InsForge 指南 的 checklist。處理 API、Auth、資料庫適配或 MCP 設定前,先讀其中對應章節;MCP 設定依「MCP per-project 設定 SOP」操作。
先確認目前使用 Supabase Cloud、自架 Supabase 或 InsForge,以及目標專案與環境,再讀取對應文件:
| 平台或工作 | 必讀內容 |
|---|---|
| 自架 Supabase on Zeabur | 自架指南:Auth 簽章、金鑰輪換、服務設定與維運工具。第一次接手先執行其中的全面 checklist。 |
| InsForge | InsForge 指南:API 路徑、admin key、平台限制與適配方式。第一次接手先執行其中的 checklist;設定 MCP 時依「MCP per-project 設定 SOP」操作。 |
| RLS policy | RLS 規範與完整樣板 |
| Policy 或 PostgREST 查詢 | 效能指南,寫入前必讀。 |
| Auth 串接 | Auth 指南:Supabase Auth、profiles 與 JWT 驗證;InsForge 同時依其平台指南適配。 |
Supabase Cloud 使用目前環境提供的工具,操作前核對工具參數與目標 project。自架與 InsForge 的連線及 MCP 設定依各自指南。
欄位命名與通用資料慣例依前置 db-engineering 的 references/data-conventions.md;平台不支援的功能依上述平台指南適配。
assets/env.example — .env.example 範本assets/gitignore.snippet — 該忽略的項目assets/starter-migrations/0001_init_extensions.sql — Supabase extensionsassets/starter-migrations/0002_profiles.sql — auth.users 擴充表assets/starter-migrations/example_table.sql — 業務表範本(完整套用 BaaS 鐵則)針對本次變更留下實際驗證結果:
get_advisors 時,依實際工具參數執行 performance 與 security 檢查,處理本次新增的警告。既有警告與尚未解決的項目分開記錄。assets/env.example (opens in a new tab)assets/gitignore.snippet (opens in a new tab)assets/starter-migrations/0001_init_extensions.sql (opens in a new tab)assets/starter-migrations/0002_profiles.sql (opens in a new tab)assets/starter-migrations/example_table.sql (opens in a new tab)references/auth.md (opens in a new tab)references/insforge.md (opens in a new tab)references/performance.md (opens in a new tab)references/rls.md (opens in a new tab)references/self-hosted-on-zeabur.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timlai666/skills --plugin dev-workflow4 skills in this plugin
/db-engineeringUniversal database engineering rules covering migration discipline, audit logging, soft delete, performance, and data integrity. This skill MUST be loaded before any database work, and MUST NOT be skipped because a schema change looks small or obvious. Triggers on: 任何資料庫相關工作, 建表, 改 schema, 寫 migration, DB design, database development, 設計資料庫, 改 DB 結構, 加欄位, 加索引, 改 table, SQL, 寫 trigger, 設計 API 的 DB 層, 查詢很慢, N+1, 效能優化, 資料完整性, CASCADE, 外鍵, 新增 table, 刪除資料, backup, 環境分離, dev prod 分開/openclaw-agent-builderCreate, configure, and edit OpenClaw agents from a host machine (locally or over SSH). This skill MUST be used whenever the user wants to add a new OpenClaw agent, build an agent for a business or organization (customer service, internal helpdesk, booking bot, etc.), scaffold agent workspace files (SOUL.md / AGENTS.md / IDENTITY.md / USER.md), wire channels (LINE / WhatsApp / Discord / Telegram / Slack and others) and bindings, set up an agent knowledge base (RAG), harden an agent against prompt injection and identity confusion, or edit / reconfigure / retune an existing OpenClaw agent. MUST trigger on any mention of OpenClaw agents, openclaw.json, agent bindings, agent workspace, "add an agent", "build a bot", "編一個 agent", "做一個客服 bot" — and also whenever ~/.openclaw or an openclaw.json file is present in the working host even if OpenClaw is not named.Other plugins' skills for the same job