$npx -y skills add Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations --skill supabaseManage Supabase projects, databases, migrations, Edge Functions, and storage using the supabase CLI.
| 1 | # Supabase Skill |
| 2 | |
| 3 | Use the `supabase` CLI to manage Supabase projects and local development. |
| 4 | |
| 5 | ## Projects |
| 6 | |
| 7 | List all projects: |
| 8 | ```bash |
| 9 | supabase projects list |
| 10 | ``` |
| 11 | |
| 12 | Link to a remote project: |
| 13 | ```bash |
| 14 | supabase link --project-ref <project-id> |
| 15 | ``` |
| 16 | |
| 17 | ## Local Development |
| 18 | |
| 19 | Start local Supabase stack (Postgres, Auth, Storage, etc.): |
| 20 | ```bash |
| 21 | supabase start |
| 22 | ``` |
| 23 | |
| 24 | Stop local stack: |
| 25 | ```bash |
| 26 | supabase stop |
| 27 | ``` |
| 28 | |
| 29 | Check status of local services: |
| 30 | ```bash |
| 31 | supabase status |
| 32 | ``` |
| 33 | |
| 34 | ## Database |
| 35 | |
| 36 | Run SQL query: |
| 37 | ```bash |
| 38 | supabase db execute --sql "SELECT * FROM users LIMIT 10" |
| 39 | ``` |
| 40 | |
| 41 | Pull remote schema to local: |
| 42 | ```bash |
| 43 | supabase db pull |
| 44 | ``` |
| 45 | |
| 46 | Push local migrations to remote: |
| 47 | ```bash |
| 48 | supabase db push |
| 49 | ``` |
| 50 | |
| 51 | Reset local database: |
| 52 | ```bash |
| 53 | supabase db reset |
| 54 | ``` |
| 55 | |
| 56 | Diff local vs remote schema: |
| 57 | ```bash |
| 58 | supabase db diff |
| 59 | ``` |
| 60 | |
| 61 | ## Migrations |
| 62 | |
| 63 | Create a new migration: |
| 64 | ```bash |
| 65 | supabase migration new <migration-name> |
| 66 | ``` |
| 67 | |
| 68 | List migrations: |
| 69 | ```bash |
| 70 | supabase migration list |
| 71 | ``` |
| 72 | |
| 73 | Apply migrations locally: |
| 74 | ```bash |
| 75 | supabase migration up |
| 76 | ``` |
| 77 | |
| 78 | Squash migrations: |
| 79 | ```bash |
| 80 | supabase migration squash |
| 81 | ``` |
| 82 | |
| 83 | ## Edge Functions |
| 84 | |
| 85 | List functions: |
| 86 | ```bash |
| 87 | supabase functions list |
| 88 | ``` |
| 89 | |
| 90 | Create a new function: |
| 91 | ```bash |
| 92 | supabase functions new <function-name> |
| 93 | ``` |
| 94 | |
| 95 | Deploy a function: |
| 96 | ```bash |
| 97 | supabase functions deploy <function-name> |
| 98 | ``` |
| 99 | |
| 100 | Deploy all functions: |
| 101 | ```bash |
| 102 | supabase functions deploy |
| 103 | ``` |
| 104 | |
| 105 | Serve functions locally: |
| 106 | ```bash |
| 107 | supabase functions serve |
| 108 | ``` |
| 109 | |
| 110 | View function logs: |
| 111 | ```bash |
| 112 | supabase functions logs <function-name> |
| 113 | ``` |
| 114 | |
| 115 | ## Storage |
| 116 | |
| 117 | List buckets: |
| 118 | ```bash |
| 119 | supabase storage ls |
| 120 | ``` |
| 121 | |
| 122 | List objects in a bucket: |
| 123 | ```bash |
| 124 | supabase storage ls <bucket-name> |
| 125 | ``` |
| 126 | |
| 127 | Copy file to storage: |
| 128 | ```bash |
| 129 | supabase storage cp <local-path> ss:///<bucket>/<path> |
| 130 | ``` |
| 131 | |
| 132 | Download from storage: |
| 133 | ```bash |
| 134 | supabase storage cp ss:///<bucket>/<path> <local-path> |
| 135 | ``` |
| 136 | |
| 137 | ## Secrets |
| 138 | |
| 139 | Set a secret for Edge Functions: |
| 140 | ```bash |
| 141 | supabase secrets set <NAME>=<value> |
| 142 | ``` |
| 143 | |
| 144 | List secrets: |
| 145 | ```bash |
| 146 | supabase secrets list |
| 147 | ``` |
| 148 | |
| 149 | Unset a secret: |
| 150 | ```bash |
| 151 | supabase secrets unset <NAME> |
| 152 | ``` |
| 153 | |
| 154 | ## Type Generation |
| 155 | |
| 156 | Generate TypeScript types from database schema: |
| 157 | ```bash |
| 158 | supabase gen types typescript --local > types/supabase.ts |
| 159 | ``` |
| 160 | |
| 161 | Generate types from remote: |
| 162 | ```bash |
| 163 | supabase gen types typescript --project-id <project-id> > types/supabase.ts |
| 164 | ``` |
| 165 | |
| 166 | ## Authentication |
| 167 | |
| 168 | Login to Supabase: |
| 169 | ```bash |
| 170 | supabase login |
| 171 | ``` |
| 172 | |
| 173 | Check current status: |
| 174 | ```bash |
| 175 | supabase projects list |
| 176 | ``` |