solid-router-queries
Solid Router queries: query() for data fetching with caching/deduplication, createAsync() for reactive signals, createAsyncStore() for fine-grained reactivity, query keys for revalidation.
Best use case
solid-router-queries is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Solid Router queries: query() for data fetching with caching/deduplication, createAsync() for reactive signals, createAsyncStore() for fine-grained reactivity, query keys for revalidation.
Teams using solid-router-queries should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/solid-router-queries/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How solid-router-queries Compares
| Feature / Agent | solid-router-queries | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Solid Router queries: query() for data fetching with caching/deduplication, createAsync() for reactive signals, createAsyncStore() for fine-grained reactivity, query keys for revalidation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Solid Router Queries
## Defining Queries
Queries provide caching, deduplication, and revalidation:
```tsx
import { query } from "@solidjs/router";
const getUserQuery = query(async (userId: string) => {
const response = await fetch(`/api/users/${userId}`);
if (!response.ok) {
throw new Error("Failed to fetch user");
}
return response.json();
}, "user");
```
**Query features:**
- Automatic request deduplication
- Caching for preloading and navigation
- Server-side deduplication in SSR
- Automatic revalidation after actions
- Browser history navigation reuse
## Using Queries with createAsync
```tsx
import { Show, Suspense, ErrorBoundary } from "solid-js";
import { createAsync, query } from "@solidjs/router";
const getUserQuery = query(async (id: string) => {
// Fetch user
}, "user");
function UserProfile(props: { userId: string }) {
const user = createAsync(() => getUserQuery(props.userId));
return (
<ErrorBoundary fallback={<div>Error loading user</div>}>
<Suspense fallback={<div>Loading...</div>}>
<Show when={user()}>
<div>{user()!.name}</div>
</Show>
</Suspense>
</ErrorBoundary>
);
}
```
### createAsync Options
```tsx
const data = createAsync(() => getDataQuery(), {
name: "myData", // Debug name
initialValue: [], // Initial value before fetch
deferStream: true // Wait for data before streaming (SSR)
});
```
**deferStream**: Set to `true` when data is critical for SEO or initial render.
## createAsyncStore
For large datasets that need fine-grained reactivity:
```tsx
import { createAsyncStore } from "@solidjs/router";
const getNotificationsQuery = query(async (unreadOnly: boolean) => {
// Fetch notifications
}, "notifications");
function Notifications() {
const notifications = createAsyncStore(() =>
getNotificationsQuery(false),
{ initialValue: [] }
);
// Access as store (direct property access)
return (
<For each={notifications()}>
{(notification) => (
<div>{notification.message}</div>
)}
</For>
);
}
```
**Use `createAsyncStore` when:**
- Working with large, complex data structures
- Need fine-grained reactivity on nested properties
- Want reconciliation when data updates
## cache (Deprecated)
**Note:** `cache` is deprecated since v0.15.0. Use `query` instead.
```tsx
// ❌ Deprecated
import { cache } from "@solidjs/router";
const getUser = cache(async (id) => fetchUser(id), "user");
// ✅ Use query instead
import { query } from "@solidjs/router";
const getUser = query(async (id) => fetchUser(id), "user");
```
## Query Keys
Query keys are generated from name and arguments. Access for revalidation:
```tsx
const getProductQuery = query(async (id: string) => {
// ...
}, "product");
// Base key - revalidates all instances
getProductQuery.key
// Specific key - revalidates one instance
getProductQuery.keyFor("123")
```
## Best Practices
1. Wrap async data with `<Suspense>` and `<ErrorBoundary>`
2. Use `deferStream: true` for SEO-critical data
3. Use query names for debugging and devtools
4. Use `createAsyncStore` for complex nested data
5. Access query keys for manual revalidation when neededRelated Skills
u0532-engineering-human-approval-router
Operate the "Engineering Human Approval Router" capability in production for workflows. Use when mission execution explicitly requires this capability and outcomes must be reproducible, policy-gated, and handoff-ready.
solidstart-hydration-guard
SolidStart hydration guard: keep SSR/CSR output identical, gate browser-only APIs, use stable IDs, align Suspense/resource fallbacks, and use clientOnly/onMount for client-only UI.
solidstart-entrypoints
SolidStart entrypoints: app.tsx for isomorphic root, entry-client.tsx for browser initialization, entry-server.tsx for SSR setup, app.config.ts for build configuration.
solid-router-preloading
Solid Router preloading: preload function for routes, usePreloadRoute hook, hover/focus intent detection, lazy component preloading, performance optimization.
Next.js App Router & Server Components
Build Next.js 15 applications using App Router, Server Components, Client Components, Server Actions, and streaming. Apply when creating pages, handling data fetching, implementing routes, or optimizing performance.
app-router
This skill should be used when the user asks to "create a Next.js route", "add a page", "set up layouts", "implement loading states", "add error boundaries", "organize routes", "create dynamic routes", or needs guidance on Next.js App Router file conventions and routing patterns.
angular-router
Angular Router for navigation, routing configuration, route guards, lazy loading, and parameter handling. Use when setting up routes, implementing navigation guards, lazy loading modules, handling route parameters, or implementing breadcrumbs and nested routes in Angular applications.
ai-organizer-ui-consolidation
Build a unified, ADHD-friendly web UI that consolidates 70+ CLI tools into a beautiful liquid glass interface for the AI File Organizer. Use when creating the complete frontend application that replaces all terminal interactions with a macOS-inspired dashboard for file organization, search, VEO prompts, and system management.
ai-chapter-consolidate
Use AI to merge individual page HTML files into a unified chapter document. Creates continuous document format for improved reading experience and semantic consistency.
markdown-consolidator
Intelligent consolidation and synthesis of multiple markdown files with overlapping content and different update dates. Use when: (1) Multiple AI-generated markdown files need merging, (2) Knowledge bases have fragmented or duplicate content, (3) Documentation requires recency-aware synthesis, (4) Supporting documents need re-synthesis after AI task completion, (5) Project documentation has semantic overlap across files, (6) Periodic knowledge base maintenance and deduplication is needed.
u0538-engineering-memory-consolidation-pipeline
Operate the "Engineering Memory Consolidation Pipeline" capability in production for workflows. Use when mission execution explicitly requires this capability and outcomes must be reproducible, policy-gated, and handoff-ready.
router-operations
Master orchestration for routing QA, testing, DevOps, observability, and git workflow questions through 15 operational skills