-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhooks.json
More file actions
129 lines (129 loc) · 4.63 KB
/
Copy pathhooks.json
File metadata and controls
129 lines (129 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"_comment": "Next.js Supabase AI SDK Dev Plugin - Local dev environment setup",
"_notes": [
"Installs Vercel CLI on remote, warns on local",
"Sets up Supabase local dev: CLI, Docker, server, env vars, dev server",
"Tracks task/agent calls for context",
"Check hooks moved to rule-based system in project-context plugin"
],
"_disabled_hooks": {
"_note": "Disabled hooks preserved for future re-enabling",
"SessionStart": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/install-start-supabase-next.ts",
"description": "Sets up Supabase local dev: installs CLI, starts Docker, starts Supabase, exports env vars, starts dev server",
"timeout": 600
}
],
"SessionEnd": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/cleanup-supabase-session.ts",
"description": "Stops Supabase containers and marks session as stopped when session ends",
"timeout": 60
}
]
},
"description": "Local development environment setup for Next.js, Supabase, and AI SDK projects",
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear",
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/setup-nodes-config.ts",
"description": "Creates .nodes/.mcp.nodes.json config for the nodes-md MCP proxy"
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/install-vercel.ts",
"description": "Installs Vercel CLI on remote, warns if missing on local"
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/link-vercel-apps.ts",
"description": "Auto-links monorepo apps to Vercel projects and pulls env vars"
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/cache-supabase-schema.ts",
"description": "Caches Supabase table/column metadata for context matching. Checks for stale cache and provides refresh instructions."
}
]
}
],
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/validate-supabase-env.ts",
"description": "Validates Supabase environment variables in .env.local and dev.vars files. Blocks deprecated names (SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY) and incorrect prefixes."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/use-proxy-nextjs-16.ts",
"description": "Blocks middleware.ts creation in Next.js 16+ projects. Requires proxy.ts instead. Exception: Supabase middleware allowed."
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/run-file-eslint.ts",
"description": "Runs ESLint on edited .ts/.tsx/.js/.jsx files. Blocking on errors."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/run-file-vitests.ts",
"description": "Runs related vitest tests for edited files. Non-blocking (warns only)."
}
]
},
{
"matcher": "browser_eval",
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/move-playwright-screenshots.ts",
"description": "Moves screenshots to .claude/screenshots/ to prevent permission prompts"
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/run-task-vitests.ts",
"description": "Runs vitest for all files edited during agent's task. Blocking on failure."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/run-task-typechecks.ts",
"description": "Runs tsc --noEmit after agent completes. Blocking on type errors."
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/run-session-typechecks.ts",
"description": "Runs tsc --noEmit before session stops. Blocking on type errors."
}
]
}
]
}
}