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/rm2thaddeus/Pixel_DetectiveWrote 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/rm2thaddeus/pixel_detective/react-query-api-integration)<a href="https://agentmods.dev/rules/rm2thaddeus/pixel_detective/react-query-api-integration"><img src="https://agentmods.dev/badge/rules/rm2thaddeus/pixel_detective/react-query-api-integration/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/rm2thaddeus/pixel_detective/react-query-api-integration"><img src="https://agentmods.dev/badge/rules/rm2thaddeus/pixel_detective/react-query-api-integration.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.01362 |
| Opus 5.5 | $0.00000 | $0.00545 |
| Sonnet 5.5 | $0.00000 | $0.00272 |
| Haiku 4.5 | $0.00000 | $0.00136 |
Grade A, and why
react-query-api-integration scanned grade A with 1 finding 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 1mo ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const api = axios.create({ How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Query & API Integration Patterns
🎯 MANDATORY: Use React Query for ALL Server State
Sprint 10 revealed that manual useEffect + useState patterns for API calls create unnecessary complexity and bugs. ALWAYS use React Query.
✅ CORRECT PATTERNS:
1. Query Hook Pattern
// ✅ Use useQuery for data fetching
function useCollections() {
return useQuery({
queryKey: ['collections'],
queryFn: async () => {
const response = await api.get('/api/v1/collections');
return response.data;
},
staleTime: 5 * 60 * 1000, // 5 minutes
retry: 3,
});
}
// ✅ Component usage
function CollectionsList() {
const { data: collections, isLoading, error } = useCollections();
if (isLoading) return <Spinner />;
if (error) return <ErrorAlert message={error.message} />;
return <CollectionGrid collections={collections} />;
}
2. Mutation Pattern
// ✅ Use useMutation for server modifications
function useCreateCollection() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async (data: CreateCollectionRequest) => {
const response = await api.post('/api/v1/collections', data);
return response.data;
},
onSuccess: () => {
// Invalidate and refetch collections
queryClient.invalidateQueries({ queryKey: ['collections'] });
toast.success('Collection created successfully');
},
onError: (error) => {
toast.error(`Failed to create collection: ${error.message}`);
},
});
}
3. Background Polling Pattern
// ✅ Job status polling with automatic cleanup
function useJobStatus(jobId: string | null) {
return useQuery({
queryKey: ['job-status', jobId],
queryFn: async () => {
if (!jobId) throw new Error('No job ID provided');
const response = await api.get(`/api/v1/ingest/status/${jobId}`);
return response.data;
},
enabled: !!jobId, // Only run when jobId exists
refetchInterval: (data) => {
// Stop polling when job is complete
if (data?.status === 'completed' || data?.status === 'failed') {
return false;
}
return 2000; // Poll every 2 seconds
},
retry: false, // Don't retry failed polls
});
}
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.
- 1mo ago First seen · 206 lines · 0 tokens per session scan A 085cde1facbc
react-query-api-integration is a cursor rule published in the GitHub repository rm2thaddeus/Pixel_Detective (21 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,362 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
windsurfrules
Create detailed components with these requirements.
state-management
Use the following stack. Do not introduce or recommend Redux or React Context for shared/global state.
backend
Backend development rules for TT Studio - AI model management backend.
new-component
Workflow for creating new React components.
tanstack-start-guide
TanStack Start best practices emphasizing client-first architecture, type safety, and modern React patterns.
tanstack-react-router_routing
TanStack Router: Routing.