Skip to main content
ClaudeWave
EN, English
Slash Command262 repo starsupdated 7mo ago

supabase-performance-optimizer

This slash command optimizes Supabase database performance by delegating tasks to specialized agents based on the provided arguments. Use it to address specific performance concerns including query and index optimization, RLS and function security, realtime subscription issues, storage cleanup, or run all agents for comprehensive database optimization.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/maslennikov-ig/claude-code-orchestrator-kit/HEAD/.claude/commands/supabase-performance-optimizer.md -o ~/.claude/commands/supabase-performance-optimizer.md
Then start a new Claude Code session; the slash command loads automatically.

supabase-performance-optimizer.md

# Supabase Performance Optimizer

Optimize Supabase database performance with specialized agents: **$ARGUMENTS**

## Agent Delegation Matrix

| Argument | Agent | What it fixes |
|----------|-------|---------------|
| `--queries`, `--indexes`, `--rls`, `--functions` | `supabase-fixer` | Advisors API issues (security + performance) |
| `--realtime` | `supabase-realtime-optimizer` | Publication issues, subscription indexes |
| `--storage` | `supabase-storage-optimizer` | Orphaned files, table sizes, data types |
| `--all` | All three agents | Complete optimization |

## Task Execution

Based on **$ARGUMENTS**, delegate to the appropriate agent(s):

### For `--queries`, `--indexes`, `--rls`, `--functions`:

Use Task tool with:
- `subagent_type`: `supabase-fixer`
- `prompt`: Focus on performance advisors for query/index optimization, or security advisors for RLS/function issues

### For `--realtime`:

Use Task tool with:
- `subagent_type`: `supabase-realtime-optimizer`
- `prompt`: Optimize realtime subscriptions, check publications, add missing indexes for filters

### For `--storage`:

Use Task tool with:
- `subagent_type`: `supabase-storage-optimizer`
- `prompt`: Analyze table sizes, find orphaned files, optimize data types

### For `--all`:

Run all three agents sequentially:
1. First: `supabase-fixer` (security + performance advisors)
2. Then: `supabase-realtime-optimizer` (realtime publications)
3. Finally: `supabase-storage-optimizer` (storage cleanup)

## Expected Output

Each agent generates a structured report in `.tmp/current/`:
- `database-fixing-report.md` (from supabase-fixer)
- `realtime-optimization-report.md` (from supabase-realtime-optimizer)
- `storage-optimization-report.md` (from supabase-storage-optimizer)

## Quick Reference

```bash
# Fix security issues (RLS, functions)
/supabase-performance-optimizer --rls --functions

# Optimize queries and indexes
/supabase-performance-optimizer --queries --indexes

# Optimize realtime subscriptions
/supabase-performance-optimizer --realtime

# Clean up storage
/supabase-performance-optimizer --storage

# Full optimization (all agents)
/supabase-performance-optimizer --all
```
algorithmic-artSkill

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

artifacts-builderSkill

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

beadsSkill
beads-initSlash Command

Initialize Beads issue tracking in your project with interactive configuration setup.

calculate-priority-scoreSkill

Calculate priority score for bugs, issues, or tasks based on severity, impact, and likelihood. Use for bug prioritization, task ordering, or risk assessment.

canvas-designSkill

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

changelog-generatorSkill

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

cleanup-health-inlineSkill

Inline orchestration workflow for dead code detection and removal with Beads integration. Provides step-by-step phases for dead-code-hunter detection, priority-based cleanup with dead-code-remover, and verification cycles.