← スキル一覧に戻る

workspace-isolation-audit
by CleanExpo
Unite Group CRM
⭐ 1🍴 0📅 2026年1月25日
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:
-
Identify affected scope
- Ask which feature/agent/API route is in scope if unclear.
- Prefer targeted fixes over repo-wide refactors.
-
Find candidate queries
- Search for
.from(usage in the relevant area. - Look for missing
.eq("workspace_id", workspaceId)(or equivalent RLS-safe filter).
- Search for
-
Verify workspace context
- API routes: read
workspaceIdfromreq.nextUrl.searchParams, validate viavalidateUserAndWorkspace. - Agents: use
task.workspace_id(required); do not derive workspace from auth user id. - Server helpers: ensure functions accept
workspaceIdexplicitly rather than importing globals.
- API routes: read
-
Fix and harden
- Add the required filter.
- Add or update targeted tests for the modified behavior.
-
Validate
- Run
npm run typecheck. - Run the most targeted tests that cover the change (Vitest/Playwright depending on area).
- Run
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓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
レビュー
💬
レビュー機能は近日公開予定です