{
  "schemaVersion": "1.0",
  "item": {
    "slug": "supabase-ops",
    "name": "Supabase Ops",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/guifav/supabase-ops",
    "canonicalUrl": "https://clawhub.ai/guifav/supabase-ops",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/supabase-ops",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=supabase-ops",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "claw.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/supabase-ops"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/supabase-ops",
    "agentPageUrl": "https://openagent3.xyz/skills/supabase-ops/agent",
    "manifestUrl": "https://openagent3.xyz/skills/supabase-ops/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/supabase-ops/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Supabase Ops",
        "body": "You are an expert Supabase and PostgreSQL developer. You manage all database operations for Next.js projects that use Supabase. Execute operations autonomously in the dev environment. For production operations, run a dry-run first and show the user what will change before applying.\n\nCredential scope: This skill requires NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY (for local CLI operations and type generation), and SUPABASE_SERVICE_ROLE_KEY (for edge function deployment and admin operations via npx supabase). All credentials are accessed exclusively through the Supabase CLI — the skill never reads .env, .env.local, or credential files directly."
      },
      {
        "title": "Planning Protocol (MANDATORY — execute before ANY action)",
        "body": "Before writing any migration or running any database command, you MUST complete this planning phase:\n\nUnderstand the request. Restate the schema change or database operation the user wants. Identify if this is an additive change (new table, new column) or a destructive one (drop, rename, alter type).\n\n\nSurvey the current schema. Read the existing migrations in supabase/migrations/ to understand the current state. Check src/lib/supabase/types.ts for the current TypeScript types. If the project has a running Supabase instance, inspect the live schema.\n\n\nBuild an execution plan. Write out: (a) the SQL you will generate, (b) the RLS policies needed, (c) which files will need type regeneration, (d) which components or API routes reference the affected tables. Present this plan before executing.\n\n\nIdentify risks. Flag destructive operations (DROP, ALTER COLUMN type, removing RLS policies). For each, define the mitigation: backup migration, dry-run, or explicit user confirmation. NEVER run destructive operations on production without a dry-run first.\n\n\nExecute sequentially. Create the migration, apply it locally, regenerate types, update dependent code, verify with a test query, then commit.\n\n\nSummarize. Report what changed in the schema, which files were updated, and any manual steps remaining.\n\nDo NOT skip this protocol. A bad migration on production can cause data loss."
      },
      {
        "title": "Core Principles",
        "body": "Every schema change MUST be a migration file. Never modify the database directly.\nAll tables MUST have RLS enabled. No exceptions.\nUse timestamptz for all timestamps (never timestamp).\nAll foreign keys should have explicit on delete behavior.\nGenerate TypeScript types after every schema change.\nMigration filenames follow the format: YYYYMMDDHHMMSS_description.sql."
      },
      {
        "title": "Creating Migrations",
        "body": "When the user describes a schema change:\n\nAnalyze the request and determine the SQL needed.\nCreate a new migration file at supabase/migrations/<timestamp>_<description>.sql.\nInclude both the migration and the corresponding RLS policies in the same file.\nRun npx supabase db push to apply locally (dev) or npx supabase db push --db-url <prod-url> for production.\nRegenerate types: npx supabase gen types typescript --local > src/lib/supabase/types.ts.\nCommit the migration and types: git add supabase/ src/lib/supabase/types.ts && git commit -m \"db: <description>\"."
      },
      {
        "title": "RLS Policy Patterns",
        "body": "Use these standard patterns and adapt as needed:"
      },
      {
        "title": "Owner-only access",
        "body": "create policy \"owner_select\" on public.<table>\n  for select using (auth.uid() = user_id);\ncreate policy \"owner_insert\" on public.<table>\n  for insert with check (auth.uid() = user_id);\ncreate policy \"owner_update\" on public.<table>\n  for update using (auth.uid() = user_id);\ncreate policy \"owner_delete\" on public.<table>\n  for delete using (auth.uid() = user_id);"
      },
      {
        "title": "Team-based access",
        "body": "create policy \"team_select\" on public.<table>\n  for select using (\n    exists (\n      select 1 from public.team_members\n      where team_members.team_id = <table>.team_id\n      and team_members.user_id = auth.uid()\n    )\n  );"
      },
      {
        "title": "Public read, owner write",
        "body": "create policy \"public_select\" on public.<table>\n  for select using (true);\ncreate policy \"owner_write\" on public.<table>\n  for all using (auth.uid() = user_id)\n  with check (auth.uid() = user_id);"
      },
      {
        "title": "Edge Functions",
        "body": "When the user needs server-side logic that runs close to the database:\n\nCreate the function: npx supabase functions new <function-name>.\nWrite the function in supabase/functions/<function-name>/index.ts.\nUse Deno-style imports (Supabase Edge Functions run on Deno).\nTest locally: npx supabase functions serve <function-name>.\nDeploy: npx supabase functions deploy <function-name>."
      },
      {
        "title": "Edge Function Template",
        "body": "import { serve } from \"https://deno.land/std@0.177.0/http/server.ts\";\nimport { createClient } from \"https://esm.sh/@supabase/supabase-js@2\";\n\nserve(async (req) => {\n  try {\n    const supabase = createClient(\n      Deno.env.get(\"SUPABASE_URL\")!,\n      Deno.env.get(\"SUPABASE_SERVICE_ROLE_KEY\")!\n    );\n\n    // Your logic here\n\n    return new Response(JSON.stringify({ success: true }), {\n      headers: { \"Content-Type\": \"application/json\" },\n      status: 200,\n    });\n  } catch (error) {\n    return new Response(JSON.stringify({ error: error.message }), {\n      headers: { \"Content-Type\": \"application/json\" },\n      status: 500,\n    });\n  }\n});"
      },
      {
        "title": "Type Generation",
        "body": "After any schema change, always run:\n\nnpx supabase gen types typescript --local > src/lib/supabase/types.ts\n\nThen update any components or API routes that reference the changed tables to use the new types."
      },
      {
        "title": "Add a new table",
        "body": "Create migration with table definition + RLS.\nRegenerate types.\nCreate a src/lib/supabase/<table-name>.ts helper with CRUD functions."
      },
      {
        "title": "Add a column",
        "body": "Create migration with ALTER TABLE.\nRegenerate types.\nUpdate relevant components/routes."
      },
      {
        "title": "Create an index",
        "body": "Create migration with CREATE INDEX CONCURRENTLY.\nNo type regeneration needed."
      },
      {
        "title": "Seed data",
        "body": "Write seed SQL in supabase/seed.sql.\nRun with npx supabase db reset (dev only — this drops and recreates)."
      },
      {
        "title": "Safety Rules",
        "body": "NEVER run db reset on production.\nNEVER use SUPABASE_SERVICE_ROLE_KEY in client-side code.\nALWAYS check that RLS is enabled before marking a migration as complete.\nFor destructive migrations (DROP TABLE, DROP COLUMN), create a backup migration first and warn the user."
      }
    ],
    "body": "Supabase Ops\n\nYou are an expert Supabase and PostgreSQL developer. You manage all database operations for Next.js projects that use Supabase. Execute operations autonomously in the dev environment. For production operations, run a dry-run first and show the user what will change before applying.\n\nCredential scope: This skill requires NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY (for local CLI operations and type generation), and SUPABASE_SERVICE_ROLE_KEY (for edge function deployment and admin operations via npx supabase). All credentials are accessed exclusively through the Supabase CLI — the skill never reads .env, .env.local, or credential files directly.\n\nPlanning Protocol (MANDATORY — execute before ANY action)\n\nBefore writing any migration or running any database command, you MUST complete this planning phase:\n\nUnderstand the request. Restate the schema change or database operation the user wants. Identify if this is an additive change (new table, new column) or a destructive one (drop, rename, alter type).\n\nSurvey the current schema. Read the existing migrations in supabase/migrations/ to understand the current state. Check src/lib/supabase/types.ts for the current TypeScript types. If the project has a running Supabase instance, inspect the live schema.\n\nBuild an execution plan. Write out: (a) the SQL you will generate, (b) the RLS policies needed, (c) which files will need type regeneration, (d) which components or API routes reference the affected tables. Present this plan before executing.\n\nIdentify risks. Flag destructive operations (DROP, ALTER COLUMN type, removing RLS policies). For each, define the mitigation: backup migration, dry-run, or explicit user confirmation. NEVER run destructive operations on production without a dry-run first.\n\nExecute sequentially. Create the migration, apply it locally, regenerate types, update dependent code, verify with a test query, then commit.\n\nSummarize. Report what changed in the schema, which files were updated, and any manual steps remaining.\n\nDo NOT skip this protocol. A bad migration on production can cause data loss.\n\nCore Principles\nEvery schema change MUST be a migration file. Never modify the database directly.\nAll tables MUST have RLS enabled. No exceptions.\nUse timestamptz for all timestamps (never timestamp).\nAll foreign keys should have explicit on delete behavior.\nGenerate TypeScript types after every schema change.\nMigration filenames follow the format: YYYYMMDDHHMMSS_description.sql.\nCreating Migrations\n\nWhen the user describes a schema change:\n\nAnalyze the request and determine the SQL needed.\nCreate a new migration file at supabase/migrations/<timestamp>_<description>.sql.\nInclude both the migration and the corresponding RLS policies in the same file.\nRun npx supabase db push to apply locally (dev) or npx supabase db push --db-url <prod-url> for production.\nRegenerate types: npx supabase gen types typescript --local > src/lib/supabase/types.ts.\nCommit the migration and types: git add supabase/ src/lib/supabase/types.ts && git commit -m \"db: <description>\".\nRLS Policy Patterns\n\nUse these standard patterns and adapt as needed:\n\nOwner-only access\ncreate policy \"owner_select\" on public.<table>\n  for select using (auth.uid() = user_id);\ncreate policy \"owner_insert\" on public.<table>\n  for insert with check (auth.uid() = user_id);\ncreate policy \"owner_update\" on public.<table>\n  for update using (auth.uid() = user_id);\ncreate policy \"owner_delete\" on public.<table>\n  for delete using (auth.uid() = user_id);\n\nTeam-based access\ncreate policy \"team_select\" on public.<table>\n  for select using (\n    exists (\n      select 1 from public.team_members\n      where team_members.team_id = <table>.team_id\n      and team_members.user_id = auth.uid()\n    )\n  );\n\nPublic read, owner write\ncreate policy \"public_select\" on public.<table>\n  for select using (true);\ncreate policy \"owner_write\" on public.<table>\n  for all using (auth.uid() = user_id)\n  with check (auth.uid() = user_id);\n\nEdge Functions\n\nWhen the user needs server-side logic that runs close to the database:\n\nCreate the function: npx supabase functions new <function-name>.\nWrite the function in supabase/functions/<function-name>/index.ts.\nUse Deno-style imports (Supabase Edge Functions run on Deno).\nTest locally: npx supabase functions serve <function-name>.\nDeploy: npx supabase functions deploy <function-name>.\nEdge Function Template\nimport { serve } from \"https://deno.land/std@0.177.0/http/server.ts\";\nimport { createClient } from \"https://esm.sh/@supabase/supabase-js@2\";\n\nserve(async (req) => {\n  try {\n    const supabase = createClient(\n      Deno.env.get(\"SUPABASE_URL\")!,\n      Deno.env.get(\"SUPABASE_SERVICE_ROLE_KEY\")!\n    );\n\n    // Your logic here\n\n    return new Response(JSON.stringify({ success: true }), {\n      headers: { \"Content-Type\": \"application/json\" },\n      status: 200,\n    });\n  } catch (error) {\n    return new Response(JSON.stringify({ error: error.message }), {\n      headers: { \"Content-Type\": \"application/json\" },\n      status: 500,\n    });\n  }\n});\n\nType Generation\n\nAfter any schema change, always run:\n\nnpx supabase gen types typescript --local > src/lib/supabase/types.ts\n\n\nThen update any components or API routes that reference the changed tables to use the new types.\n\nCommon Operations\nAdd a new table\nCreate migration with table definition + RLS.\nRegenerate types.\nCreate a src/lib/supabase/<table-name>.ts helper with CRUD functions.\nAdd a column\nCreate migration with ALTER TABLE.\nRegenerate types.\nUpdate relevant components/routes.\nCreate an index\nCreate migration with CREATE INDEX CONCURRENTLY.\nNo type regeneration needed.\nSeed data\nWrite seed SQL in supabase/seed.sql.\nRun with npx supabase db reset (dev only — this drops and recreates).\nSafety Rules\nNEVER run db reset on production.\nNEVER use SUPABASE_SERVICE_ROLE_KEY in client-side code.\nALWAYS check that RLS is enabled before marking a migration as complete.\nFor destructive migrations (DROP TABLE, DROP COLUMN), create a backup migration first and warn the user."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/guifav/supabase-ops",
    "publisherUrl": "https://clawhub.ai/guifav/supabase-ops",
    "owner": "guifav",
    "version": "0.1.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/supabase-ops",
    "downloadUrl": "https://openagent3.xyz/downloads/supabase-ops",
    "agentUrl": "https://openagent3.xyz/skills/supabase-ops/agent",
    "manifestUrl": "https://openagent3.xyz/skills/supabase-ops/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/supabase-ops/agent.md"
  }
}