Native Data Fetching
CherryHQ/cherry-studio-app
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
A skill your agent uses when setting up route loaders or optimizing navigation performance.
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install MadAppGang/claude-code router-query-integration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .claude/skills/router-query-integration && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .claude/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install MadAppGang/claude-code router-query-integration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .agents/skills/router-query-integration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .agents/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install MadAppGang/claude-code router-query-integration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .cursor/skills/router-query-integration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .cursor/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/MadAppGang/claude-code.git --path plugins/frontend/skills/router-query-integration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install MadAppGang/claude-code router-query-integration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .gemini/skills/router-query-integration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .gemini/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install MadAppGang/claude-code router-query-integrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .github/skills/router-query-integration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .github/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add MadAppGang/claude-code --skill router-query-integration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install MadAppGang/claude-code router-query-integration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/frontend/skills/router-query-integration .opencode/skills/router-query-integration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "router-query-integration" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/frontend/skills/router-query-integration into .opencode/skills/router-query-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "router-query-integration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
router-query-integrationA skill your agent uses when setting up route loaders or optimizing navigation performance.
Router Query Integration is an agent skill from MadAppGang/claude-code. Use when setting up route loaders or optimizing navigation performance. Integrates TanStack Router with TanStack Query for optimal data fetching. Covers route loaders with query prefetching, ensuring instant navigation, and eliminating request waterfalls.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with TanStack. The repository describes itself as: claude code plugins marketplace. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Router Query Integration loads about 2.6k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 245 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 245 words, ~2,625 tokens.
.claude/skills/router-query-integration/SKILL.md (or your agent's skills folder).Seamlessly integrate TanStack Router with TanStack Query for optimal SPA performance and instant navigation.
The key pattern: Use route loaders to prefetch queries BEFORE navigation completes.
Benefits:
// src/routes/users/$id.tsx
import { createFileRoute } from '@tanstack/react-router'
import { queryClient } from '@/app/queryClient'
import { usersKeys, fetchUser } from '@/features/users/queries'
export const Route = createFileRoute('/users/$id')({
loader: async ({ params }) => {
const id = params.id
return queryClient.ensureQueryData({
queryKey: usersKeys.detail(id),
queryFn: () => fetchUser(id),
staleTime: 30_000, // Fresh for 30 seconds
})
},
component: UserPage,
})
function UserPage() {
const { id } = Route.useParams()
const { data: user } = useQuery({
queryKey: usersKeys.detail(id),
queryFn: () => fetchUser(id),
})
// Data is already loaded from loader, so this returns instantly
return <div>{user.name}</div>
}Query Options provide maximum type safety and DRY:
// features/users/queries.ts
import { queryOptions } from '@tanstack/react-query'
export function userQueryOptions(userId: string) {
return queryOptions({
queryKey: ['users', userId],
queryFn: () => fetchUser(userId),
staleTime: 30_000,
})
}
export function useUser(userId: string) {
return useQuery(userQueryOptions(userId))
}
// src/routes/users/$userId.tsx
import { userQueryOptions } from '@/features/users/queries'
import { queryClient } from '@/app/queryClient'
export const Route = createFileRoute('/users/$userId')({
loader: ({ params }) =>
queryClient.ensureQueryData(userQueryOptions(params.userId)),
component: UserPage,
})
function UserPage() {
const { userId } = Route.useParams()
const { data: user } = useUser(userId)
return <div>{user.name}</div>
}export const Route = createFileRoute('/dashboard')({
loader: async () => {
// Run in parallel
await Promise.all([
queryClient.ensureQueryData(userQueryOptions()),
queryClient.ensureQueryData(statsQueryOptions()),
queryClient.ensureQueryData(postsQueryOptions()),
])
},
component: Dashboard,
})
function Dashboard() {
const { data: user } = useUser()
const { data: stats } = useStats()
const { data: posts } = usePosts()
// All data pre-loaded, renders instantly
return (
<div>
<UserHeader user={user} />
<StatsPanel stats={stats} />
<PostsList posts={posts} />
</div>
)
}export const Route = createFileRoute('/users/$userId/posts')({
loader: async ({ params }) => {
// First ensure user data
const user = await queryClient.ensureQueryData(
userQueryOptions(params.userId)
)
// Then fetch user's posts
return queryClient.ensureQueryData(
userPostsQueryOptions(user.id)
)
},
component: UserPostsPage,
})Export the query client for use in loaders:
// src/app/queryClient.ts
import { QueryClient } from '@tanstack/react-query'
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 0,
gcTime: 5 * 60_000,
retry: 1,
},
},
})
// src/main.tsx
import { QueryClientProvider } from '@tanstack/react-query'
import { queryClient } from './app/queryClient'
ReactDOM.createRoot(document.getElementById('root')!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
</StrictMode>
)prefetchQuery - Fire and forget, don't wait:
loader: ({ params }) => {
// Don't await - just start fetching
queryClient.prefetchQuery(userQueryOptions(params.userId))
// Navigation continues immediately
}ensureQueryData - Wait for data (recommended):
loader: async ({ params }) => {
// Await - navigation waits until data is ready
return await queryClient.ensureQueryData(userQueryOptions(params.userId))
}fetchQuery - Always fetches fresh:
loader: async ({ params }) => {
// Ignores cache, always fetches
return await queryClient.fetchQuery(userQueryOptions(params.userId))
}Recommendation: Use ensureQueryData for most cases - respects cache and staleTime.
export const Route = createFileRoute('/users/$userId')({
loader: async ({ params }) => {
try {
return await queryClient.ensureQueryData(userQueryOptions(params.userId))
} catch (error) {
// Let router error boundary handle it
throw error
}
},
errorComponent: ({ error }) => (
<div>
<h1>Failed to load user</h1>
<p>{error.message}</p>
</div>
),
component: UserPage,
})// features/users/mutations.ts
export function useUpdateUser() {
const queryClient = useQueryClient()
const navigate = useNavigate()
return useMutation({
mutationFn: (user: UpdateUserDTO) => api.put(`/users/${user.id}`, user),
onSuccess: (updatedUser) => {
// Update cache immediately
queryClient.setQueryData(
userQueryOptions(updatedUser.id).queryKey,
updatedUser
)
// Invalidate related queries
queryClient.invalidateQueries({ queryKey: ['users', 'list'] })
// Navigate to updated user page (will use cached data)
navigate({ to: '/users/$userId', params: { userId: updatedUser.id } })
},
})
}import { Link, useRouter } from '@tanstack/react-router'
function UserLink({ userId }: { userId: string }) {
const router = useRouter()
const handleMouseEnter = () => {
// Preload route (includes loader)
router.preloadRoute({ to: '/users/$userId', params: { userId } })
}
return (
<Link
to="/users/$userId"
params={{ userId }}
onMouseEnter={handleMouseEnter}
>
View User
</Link>
)
}Or use built-in preload:
<Link
to="/users/$userId"
params={{ userId: '123' }}
preload="intent" // Preload on hover/focus
>
View User
</Link>// src/routes/users/index.tsx
import { z } from 'zod'
const searchSchema = z.object({
page: z.number().default(1),
filter: z.enum(['active', 'all']).default('all'),
})
export const Route = createFileRoute('/users/')({
validateSearch: searchSchema,
loader: ({ search }) => {
return queryClient.ensureQueryData(
usersListQueryOptions(search.page, search.filter)
)
},
component: UsersPage,
})
function UsersPage() {
const { page, filter } = Route.useSearch()
const { data: users } = useUsersList(page, filter)
return <UserTable users={users} page={page} filter={filter} />
}With Suspense, you don't need separate loading states:
export const Route = createFileRoute('/users/$userId')({
loader: ({ params }) =>
queryClient.ensureQueryData(userQueryOptions(params.userId)),
component: UserPage,
})
function UserPage() {
const { userId } = Route.useParams()
// Use Suspense hook - data is NEVER undefined
const { data: user } = useSuspenseQuery(userQueryOptions(userId))
return <div>{user.name}</div>
}
// Wrap route in Suspense boundary (in __root.tsx or layout)
<Suspense fallback={<Spinner />}>
<Outlet />
</Suspense>Promise.all() for independent queriespreload="intent" on critical links// src/main.tsx
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
<ReactQueryDevtools position="bottom-right" />
<TanStackRouterDevtools position="bottom-left" />
</QueryClientProvider>Both auto-hide in production.
List + Detail Pattern:
// List route prefetches list
export const ListRoute = createFileRoute('/users/')({
loader: () => queryClient.ensureQueryData(usersListQueryOptions()),
component: UsersList,
})
// Detail route prefetches specific user
export const DetailRoute = createFileRoute('/users/$userId')({
loader: ({ params }) =>
queryClient.ensureQueryData(userQueryOptions(params.userId)),
component: UserDetail,
})
// Clicking from list to detail uses cached data if availableEdit Form Pattern:
export const EditRoute = createFileRoute('/users/$userId/edit')({
loader: ({ params }) =>
queryClient.ensureQueryData(userQueryOptions(params.userId)),
component: UserEditForm,
})
function UserEditForm() {
const { userId } = Route.useParams()
const { data: user } = useUser(userId)
const updateUser = useUpdateUser()
// Form pre-populated with cached user data
return <Form initialValues={user} onSubmit={updateUser.mutate} />
}© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/frontend/skills/router-query-integration of MadAppGang/claude-code.
Open the folder on GitHubat commit 6097ad4
Router Query Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Router Query Integration this skillMadAppGang/claude-code | 285 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Native Data FetchingCherryHQ/cherry-studio-app | 4k | 6 repos | ~2.9k | Automated safety check: Notes | MIT | |
| Game Changing FeaturesopenstatusHQ/data-table-filters | 2.3k | 3 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Frontend Query Mutationlangflow-ai/langflow | 155k | — | ~979 | Automated safety check: Pass | MIT | |
| React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase | 10k | 2 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Wagmi Feature Developmentwevm/wagmi | 6.8k | — | ~3.8k | Automated safety check: Pass | MIT |
CherryHQ/cherry-studio-app
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
openstatusHQ/data-table-filters
Find 10x product opportunities and high-leverage improvements.
langflow-ai/langflow
Guide for implementing Langflow frontend query and mutation patterns with Axios and TanStack React Query v5.
diet103/claude-code-infrastructure-showcase
Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.
wevm/wagmi
Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.
involvex/youtube-music-cli
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.
MadAppGang/claude-code
Content brief template and creation methodology for SEO-optimized content.
MadAppGang/claude-code
A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…
MadAppGang/claude-code
On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.
MadAppGang/claude-code
Techniques for expanding seed keywords and clustering by topic and intent.
MadAppGang/claude-code
SERP analysis techniques for intent classification, feature identification, and competitive intelligence.
MadAppGang/claude-code
A skill your agent uses when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents.
Works with
A skill your agent uses when setting up route loaders or optimizing navigation performance. Router Query Integration is an agent skill from MadAppGang/claude-code. Use when setting up route loaders or optimizing navigation performance.
Router Query Integration fits situations like: setting up route loaders; optimizing navigation performance.
Run `npx skills add MadAppGang/claude-code --skill router-query-integration -a claude-code`. Or copy the skill folder (plugins/frontend/skills/router-query-integration in MadAppGang/claude-code) into .claude/skills/router-query-integration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add MadAppGang/claude-code --skill router-query-integration -a codex`. Or copy the skill folder (plugins/frontend/skills/router-query-integration in MadAppGang/claude-code) into .agents/skills/router-query-integration in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill router-query-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/router-query-integration, .gemini/skills/router-query-integration, .github/skills/router-query-integration and .opencode/skills/router-query-integration in your project.
SKILL.md names no scripts, command-line tools or credentials: Router Query Integration is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Router Query Integration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Router Query Integration: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Game Changing Features (openstatusHQ/data-table-filters, 2.3k stars), Frontend Query Mutation (langflow-ai/langflow, 155k stars) and React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 285 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.
Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.