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/ryoha000/launchergWrote 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/ryoha000/launcherg/32-data-fetch-patterns)<a href="https://agentmods.dev/rules/ryoha000/launcherg/32-data-fetch-patterns"><img src="https://agentmods.dev/badge/rules/ryoha000/launcherg/32-data-fetch-patterns/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/ryoha000/launcherg/32-data-fetch-patterns"><img src="https://agentmods.dev/badge/rules/ryoha000/launcherg/32-data-fetch-patterns.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.01469 |
| Opus 5 | $0.00000 | $0.00734 |
| Sonnet 5 | $0.00000 | $0.00294 |
| Haiku 4.5 | $0.00000 | $0.00147 |
Grade A, and why
32-data-fetch-patterns 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.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Data Fetch パターン(TanStack Query + Tauri)
このルールは、SQLite/Tauri コマンド連携を TanStack Query で統一するための運用規約です。UI 層は直接 invoke を呼ばず、データ層(Query/Mutation)を経由します。
コア設計
- QueryClient は単一インスタンスを
QueryClientProviderでアプリ全体に提供。- 実装: src/lib/data/queryClient.ts
- 既定オプション(
staleTime等)はここで集中管理。例外のみクエリ側で上書き。
- クエリキーは安定・最小の粒度で
queryKeysに集約。 - リソース別に Query/Mutation を
src/lib/data/queries/*に定義。 - UI 層からはコマンドを直接呼ばず、Query/Mutation のみ使用。
ディレクトリ構成(要点)
src/lib/data/queryClient.ts… QueryClient の生成・既定オプションsrc/lib/data/queryKeys.ts… 安定キー(例:denyList.all()、games(),game(id))src/lib/data/queries/*.ts… リソース毎のuseXxxQuery/useXxxMutation
Provider(アプリ組み込み)
App.svelte で QueryClientProvider をルートに設置。
<script lang="ts">
import { QueryClientProvider } from '@tanstack/svelte-query'
import { queryClient } from '@/lib/data/queryClient'
</script>
<QueryClientProvider client={queryClient}>
<!-- App content -->
</QueryClientProvider>
クエリ定義(読み取り系)
- 命名は
useXxxQuery。返り値は Svelte ストア(CreateQueryResult)。 queryKeyはqueryKeysを使用。- 既定オプションは
queryClientに寄せ、特殊な場合のみクエリ側で指定。
// src/lib/data/queries/denyList.ts
import { createQuery } from '@tanstack/svelte-query'
import { commandDenyListAll } from '@/lib/command'
import { queryKeys } from '@/lib/data/queryKeys'
export function useDenyListQuery() {
return createQuery({
queryKey: queryKeys.denyList.all(),
queryFn: () => commandDenyListAll(),
})
}
ミューテーション定義(更新系)
- 命名は
useXxxMutation。成功時に関連クエリをピンポイントで invalidate。 - 必要に応じて楽観的更新(
onMutate)→ ロールバック(onError)を使用。
// src/lib/data/queries/denyList.ts
import { createMutation } from '@tanstack/svelte-query'
import { commandDenyListAdd, commandDenyListRemove } from '@/lib/command'
import { queryClient } from '@/lib/data/queryClient'
import { queryKeys } from '@/lib/data/queryKeys'
export function useAddDenyListMutation() {
return createMutation<unknown, Error, { storeType: number, storeId: string, name: string }>({
mutationFn: input => commandDenyListAdd(input.storeType, input.storeId, input.name),
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: queryKeys.denyList.all() })
},
})
}
export function useRemoveDenyListMutation() {
return createMutation<unknown, Error, { storeType: number, storeId: string }>({
mutationFn: input => commandDenyListRemove(input.storeType, input.storeId),
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: queryKeys.denyList.all() })
},
})
}
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 · 125 lines · 0 tokens per session scan A ead51118fce6
32-data-fetch-patterns is a cursor rule published in the GitHub repository ryoha000/launcherg (37 stars, last pushed 5mo ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 1,469 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-09-12.
Other cursor rules, from other repositories
fh
A set of project rules for maintaining the FeHelper Chrome extension. It describes the extension's folders, coding conventions, module structure, security expectations, analytics server, and MongoDB storage.
compat-ui
A set of front-end interaction rules for Compat, a compatibility layer for Wails and WebView applications. It defines how controls, menus, dialogs, focus, and outside-click behavior should work.
cursorrules
ITops Agent is a one-stop intelligent ops platform. Stack: Node.js + Express + TypeScript + SQLite (backend) / React + Vite + Ant Design + Tailwind (frontend). DDD modules: 24 backend modules + 23 frontend modules. See .trae/rules/architecture.md §1.2.
prisma
Prisma database patterns and conventions for Next.js and TypeScript projects.
nextjs-supabase
Next.js + Supabase stack best practices with Auth, shadcn/ui, and Tailwind CSS.
common-patterns
// src/lib/database.ts import { createClient } from '@supabase/supabase-js'.