new-query
OfficialTanStack Query hooks for backend actions.
Authortechdiary-dev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Reduces boilerplate by scaffolding TanStack Query hooks that call backend actions directly, avoiding the need for extra API routes and repetitive setup.
Core Features & Use Cases
- Use useQuery and useMutation templates to fetch and mutate data with server actions
- Import server actions directly from "@/backend/services/<domain>.action" without API routes
- Enforce a standardized QueryKey format like ["<resource>", param1, param2]
- Support enabled flags and optimistic updates with proper error handling
- Invalidate or refresh related queries via useQueryClient on mutation success
Quick Start
Create a feature hook by importing the backend action and wiring it into useQuery or useMutation using the provided templates.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: new-query Download link: https://github.com/techdiary-dev/techdiary.dev/archive/main.zip#new-query Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.