返回顶部
s

supabase

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
84
下载量
0
收藏
概述
安装方式
版本历史

supabase

# Supabase You manage Supabase projects using the REST API and SQL. Fast, direct, no ORM overhead. ## Connection Setup On first use, ask the user for: 1. **Supabase URL** — `https://[project-ref].supabase.co` 2. **Anon key** (public) — for RLS-protected queries This skill uses ONLY the anon (public) key by default. The anon key is designed to be safe for client-side use — it is protected by Row Level Security (RLS) policies you configure in Supabase. ## Credential Handling - Credentials are provided by the user at runtime via environment variables: `SUPABASE_URL` and `SUPABASE_ANON_KEY` - This skill does NOT store credentials to disk - This skill does NOT request or use the service role key - All queries go through Supabase's RLS layer — the skill cannot bypass your security policies ## API Calls Use `curl` for all Supabase REST API operations: ### Query (SELECT) ```bash curl -s "[URL]/rest/v1/[table]?select=*&[filters]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" ``` ### Insert ```bash curl -s -X POST "[URL]/rest/v1/[table]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" \ -H "Content-Type: application/json" \ -d '[JSON]' ``` ### Update ```bash curl -s -X PATCH "[URL]/rest/v1/[table]?[filter]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" \ -H "Content-Type: application/json" \ -H "Prefer: return=representation" \ -d '[JSON]' ``` ### Delete ```bash curl -s -X DELETE "[URL]/rest/v1/[table]?[filter]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" ``` ## PostgREST Filter Syntax - `?column=eq.value` — equals - `?column=neq.value` — not equals - `?column=gt.value` — greater than - `?column=lt.value` — less than - `?column=gte.value` — greater than or equal - `?column=like.*pattern*` — LIKE - `?column=ilike.*pattern*` — case-insensitive LIKE - `?column=in.(val1,val2)` — IN - `?column=is.null` — IS NULL - `?order=column.desc` — ORDER BY - `?limit=10` — LIMIT - `?offset=20` — OFFSET - `?select=col1,col2,related_table(col3)` — select specific columns + joins ## Commands ### "Show tables" / "List tables" ```bash curl -s "[URL]/rest/v1/" -H "apikey: [KEY]" | jq 'keys' ``` ### "Query [table]" / "Show me [table]" ```bash curl -s "[URL]/rest/v1/[table]?select=*&limit=20" \ -H "apikey: [KEY]" -H "Authorization: Bearer [KEY]" | jq . ``` Present as a formatted markdown table. ### "Count [table]" ```bash curl -s "[URL]/rest/v1/[table]?select=count" \ -H "apikey: [KEY]" -H "Authorization: Bearer [KEY]" \ -H "Prefer: count=exact" ``` ### "Insert into [table]: [data]" Parse the user's data, construct JSON, POST it. ### "Delete from [table] where [condition]" Construct the filter, confirm with user before executing: "This will delete rows from [table] where [condition]. Proceed? (y/n)" ### "Run SQL: [query]" For complex queries, use Supabase RPC (remote procedure call) with the anon key: ```bash curl -s -X POST "[URL]/rest/v1/rpc/[function_name]" \ -H "apikey: [ANON_KEY]" \ -H "Authorization: Bearer [ANON_KEY]" \ -H "Content-Type: application/json" \ -d '{"param": "value"}' ``` Note: RPC functions must be created in Supabase first and must have appropriate RLS policies. ## Rules - ALWAYS confirm before DELETE or UPDATE operations - Only use the anon key — never request the service role key - Credentials come from environment variables, not stored in files - Present query results as formatted markdown tables, not raw JSON - If a query returns >50 rows, show first 20 and say "Showing 20 of [N] rows. Add a filter to narrow down." - Store config locally — never send keys to external services

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 supabase-manager-1775973445 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 supabase-manager-1775973445 技能

通过命令行安装

skillhub install supabase-manager-1775973445

下载 Zip 包

⬇ 下载 supabase v1.0.2

文件大小: 2.41 KB | 发布时间: 2026-4-13 12:12

v1.0.2 最新 2026-4-13 12:12
- Added an explicit env section to SKILL.md to document required environment variables (SUPABASE_URL, SUPABASE_ANON_KEY) and their descriptions.
- No changes to functionality; documentation only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部