Back to list
CleanExpo

workspace-isolation-audit

by CleanExpo

Unite Group CRM

1🍴 0📅 Jan 25, 2026

SKILL.md


name: workspace-isolation-audit description: Use when asked to audit or fix Supabase queries to ensure every query filters by workspace_id and workspace access is validated.

Goal: ensure multi-tenant isolation by enforcing workspace_id filtering everywhere it applies.

Workflow:

  1. Identify affected scope

    • Ask which feature/agent/API route is in scope if unclear.
    • Prefer targeted fixes over repo-wide refactors.
  2. Find candidate queries

    • Search for .from( usage in the relevant area.
    • Look for missing .eq("workspace_id", workspaceId) (or equivalent RLS-safe filter).
  3. Verify workspace context

    • API routes: read workspaceId from req.nextUrl.searchParams, validate via validateUserAndWorkspace.
    • Agents: use task.workspace_id (required); do not derive workspace from auth user id.
    • Server helpers: ensure functions accept workspaceId explicitly rather than importing globals.
  4. Fix and harden

    • Add the required filter.
    • Add or update targeted tests for the modified behavior.
  5. Validate

    • Run npm run typecheck.
    • Run the most targeted tests that cover the change (Vitest/Playwright depending on area).

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon