swr-hooks
Installation
SKILL.md
SWR Hooks Skill
Generates typed SWR hooks that follow the project's fetcher pattern.
Fetcher utilities (lib/fetcher.ts)
All hooks rely on these four helpers:
export const fetcher = async <T>(
url: string,
options?: RequestInit,
): Promise<T> => {
const token =
typeof window !== 'undefined' ? localStorage.getItem('token') : null;