.claude/skills/add-react-query/SKILL.md
Add a typed useQuery or useMutation hook for an existing API endpoint, following the project's TanStack Query conventions. Use when the user asks to "fetch X from the frontend", "call the new endpoint", or "wire up the data".
npx skillsauth add malhajri07/real-estate-CRM-project add-react-queryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Wrap an existing API endpoint in a TanStack React Query hook so pages stay clean.
/api/commissions)apps/web/src/pages/platform/leads/index.tsx.useQuery (read) or useMutation (write).queryKey: ['/api/<path>', ...params]queryFn uses the project's apiClient (or fetch wrapper) — never raw fetchuseQuery<MyType[]>)mutationFn calls the APIonSuccess invalidates the matching query key (queryClient.invalidateQueries({ queryKey: ['/api/<path>'] }))onError shows a destructive toast (the soft bg-destructive/10 variant)apps/web/src/hooks/api/use-{name}.ts if the project has a hooks dir, OR colocate inside the calling page if that's the existing pattern (check before deciding).types/ or generate from the zod schema in the route./typecheck.any/typecheck passesfetch() — go through the project's API client so auth headers + base URL are consistentonSuccess invalidation — stale lists are a common bugtesting
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
tools
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
data-ai
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.