enforce-mantine-hooks
Installation
SKILL.md
Enforce Mantine Hooks
Goal: remove custom code that @mantine/hooks already does, but only when the swap keeps the behavior the same or makes it better. A swap that changes behavior in a way nobody asked for is a bug, not a cleanup.
Required companion skill
Load the mantine-hooks skill before you scan, and tell every worker to load it too. It holds the hook catalog, the 9.x API, SSR rules, and migration traps. If it is not available, use the current docs at https://mantine.dev/hooks/ and say so in the report.
Preconditions
- Read
package.json(and workspace packages). Record the@mantine/hooksversion and the React version. - If
@mantine/hooksis not installed, stop and ask before you add it (new dependency).@mantine/hooks@9.xneedsreact@^19.2. On older React, ask whether to pin 8.x or stop. - Note if the app renders on the server (SSR, hydration). This changes the safe options for media, storage, and viewport hooks.
- Use only
@mantine/hooks. Never add@mantine/coreor other@mantine/*packages for this task.