Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/virastack/aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/virastack/ai/server-state)<a href="https://agentmods.dev/rules/virastack/ai/server-state"><img src="https://agentmods.dev/badge/rules/virastack/ai/server-state/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/virastack/ai/server-state"><img src="https://agentmods.dev/badge/rules/virastack/ai/server-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00518 |
| Opus 5.5 | $0.00000 | $0.00207 |
| Sonnet 5.5 | $0.00000 | $0.00104 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
server-state scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
TanStack Query
Setup
QueryProvider(src/providers/QueryProvider.tsx) creates the browserQueryClientonce.
- The router context owns the
QueryClient(src/providers/root-provider.ts, wired insrc/router.tsx).
- Defaults live in
makeQueryClient()(src/lib/query-client.ts). Never create a module-levelQueryClient.
Rules
- Key factory per feature in
api/query-keys.ts(all,lists(),list(filters),details(),detail(id),as const). Page and filters belong in the key. - Define each query once with
queryOptions()inapi/; reuse it in hooks, prefetching, loaders andsetQueryData. - Components call a thin hook from
hooks/(useUsers), neveruseQuerydirectly. - Pass the query function's
signalto the api function. - Mutation hooks invalidate the affected keys in
onSettled. - Optimistic updates only when the UX needs them: render
mutation.variableswhile pending; useonMutatewith rollback only when several components must show the change. - Server data stays in the Query cache. Never copy it into a Zustand store.
import { getUsers } from "@/features/users/api/get-users.api"; import { userKeys } from "@/features/users/api/query-keys";
export const usersQueryOptions = (page: number) => queryOptions({ queryKey: userKeys.list({ page }), queryFn: ({ signal }) => getUsers(page, signal), });
```ts
// features/users/hooks/use-users.ts
import { useQuery } from "@tanstack/react-query";
import { usersQueryOptions } from "@/features/users/api";
export function useUsers(page: number) {
return useQuery(usersQueryOptions(page));
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 55 lines · 0 tokens per session scan A 20b58677998e
server-state is a cursor rule published in the GitHub repository virastack/ai (23 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 518 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-22.
Other cursor rules, from other repositories
sync-api-endpoints
When HTTP routes change, update the web UI API page and API docs together.
marker-triage
Triage a Marker.io website-feedback backlog at scale. Use when asked to go through, categorize, prioritize, deduplicate, or make sense of many Marker.io issues at once. Splits content fixes from functional bugs, groups by page, rates criticality, flags duplicates and repeat reporters, surfaces quick wins, lists…
marker-insights
Aggregate Marker.io website feedback into recurring patterns. Use when asked to find the most common issues on a site, which pages get the most feedback, recurring content problems, or the content-vs-bug split across many Marker.io reports, and produce a prioritized brief for a website team or agency. Read-only: it…
developer
Senior Developer persona — implements backend user stories, production code, git workflow. Use when coding backend features, writing tests, or implementing API endpoints.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.