Loading...
Loading...
Thiết kế schema Postgres, viết Row Level Security (RLS) policy, và Edge Function (Deno/TypeScript) cho Supabase khi tính năng cần logic phía server (không thể/không nên để client tự làm - ví dụ tính giá, webhook thanh toán, phân quyền dữ liệu). Dùng skill này song song với flutter-coding khi 1 task trong tasks.md cần cả phần client (Flutter) lẫn phần server (Supabase).
npx skill4agent add hoangsoft90/ai_skills backend-codingopenspec/changes/<change-name>/specs/textnumericfloattimestamptzuuidschema-migration/SKILL.mdALTER TABLEselectinsertupdatedeletecreate policy "user xem don hang cua minh"
on orders for select
using (auth.uid() = user_id);
create policy "chi admin sua trang thai don hang"
on orders for update
using (exists (select 1 from staff where staff.user_id = auth.uid() and staff.role = 'admin'));supabase/functions/<ten-function>/index.tsflutter-codingflutter-coding/SKILL.mdsupabase_fluttermcp-loop/SKILL.mdarchitecture/SKILL.mdsupabase_flutter