← Back to list

fix-hardcoded-workspaceid-pages
by CleanExpo
Unite Group CRM
⭐ 1🍴 0📅 Jan 25, 2026
SKILL.md
name: fix-hardcoded-workspaceid-pages description: Use when asked to remove hardcoded workspaceId values from client pages and replace them with useWorkspace() + friendly loading/error states.
Goal: remove hardcoded workspaceId values from client-side pages and use useWorkspace() instead.
Workflow:
-
Locate hardcoded workspace IDs
- Search for
workspaceId =and the sentinel UUID00000000-0000-0000-0000-000000000000.
- Search for
-
Replace with
useWorkspace()- Import
useWorkspacefrom@/hooks/useWorkspace. - Destructure
{ workspaceId, loading: workspaceLoading, error: workspaceError }.
- Import
-
Ensure safe fetch execution
- Guard data loads: do not call APIs until
workspaceIdis available. - Add dependencies so effects re-run when
workspaceIdchanges.
- Guard data loads: do not call APIs until
-
Add friendly UI states
- While
workspaceLoading: show "Loading workspace…" - If
workspaceErroror missingworkspaceId: show a clear error card/message
- While
-
Validate
- Run
npm run typecheck. - Run the smallest tests that exercise the changed pages or helper logic.
- Run
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