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.
npx skills add bovinphang/frontend-craft --skill fec-data-fetchinggit clone --depth 1 https://github.com/bovinphang/frontend-craftWrote 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/skills/bovinphang/frontend-craft/fec-data-fetching)<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-data-fetching"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-data-fetching/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/skills/bovinphang/frontend-craft/fec-data-fetching"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-data-fetching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00076 | $0.00721 |
| Opus 5 | $0.00038 | $0.00360 |
| Sonnet 5 | $0.00015 | $0.00144 |
| Haiku 4.5 | $0.00008 | $0.00072 |
Grade A, and why
fec-data-fetching 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 10d 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.
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
Server State 数据获取
用途
为前端 server state 建立清晰的数据获取、缓存、失效和提交边界,避免请求状态散落在页面组件中。
流程
- 判断状态来源:来自服务端且需要缓存、去重、刷新、分页或 mutation 时使用请求缓存方案;纯本地 UI 状态用组件 state 或 store。
- 先沿用项目已有数据获取库;新增依赖时 React/Vue/Solid/Svelte 可考虑 TanStack Query,也可沿用 SWR、Nuxt/Nitro 数据获取或项目封装。
- 设计稳定 cache key/query key:结构包含实体、动作和所有影响结果的参数。
- API 函数保持纯请求函数,数据 hook/composable 负责缓存、select、loading/error/empty 状态。
- mutation 成功后 invalidation;需要即时反馈时使用 optimistic update 并在失败时回滚。
React 快速开始
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
export function UserList({ keyword }: { keyword: string }) {
const query = useQuery({
queryKey: ["users", "list", { keyword }],
queryFn: () => getUserList({ keyword, page: 1, pageSize: 20 }),
select: (response) => response.list,
});
if (query.isLoading) return <Skeleton />;
if (query.isError) return <ErrorFallback onRetry={() => query.refetch()} />;
if (!query.data?.length) return <EmptyState />;
return query.data.map((user) => <UserRow key={user.id} user={user} />);
}
export function useCreateUser() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: createUser,
onSuccess: () => queryClient.invalidateQueries({ queryKey: ["users"] }),
});
}
详细参考
涉及是否需要查询库、QueryClient 默认配置、Vue adapter、乐观更新、无限滚动查询、预取、SSR 水合和 API 层整合时,加载 references/query-patterns.md。
约束
- 相同数据必须复用相同 cache key/query key;参数缺失会造成缓存串读。
staleTime过长会显示旧数据,过短会造成频繁请求。- 请求缓存库不管理本地 UI 状态;不要把 modal、输入框值放进 query cache。
- 乐观更新必须保存快照并在失败时回滚。
- SSR/SSG 场景必须使用框架支持的预取、水合或服务端数据边界。
预期输出
数据获取层具备 loading/error/empty/data 状态,重复请求自动去重,mutation 后缓存正确失效或回滚,API 层与 UI 层边界清晰。
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 63 lines · 76 tokens per session scan A 3c1832fa8133
fec-data-fetching is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 8d ago), licensed MIT. It adds 76 tokens to every session and 721 once invoked, about $0.0004 per session on Opus 5. 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-08-30.
Other skills, from other repositories
brand-design
Brand-aware design system generator that acts as Head of Brand. Translates abstract brand language into a mathematically-validated, implementation-ready design system, writes creative-brief.md as the source of truth for all UI/UX in a project, and optionally compiles it to framework tokens (Tailwind v4 @theme, v3…
liveview-patterns
Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.
cesiumjs-core-utilities
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility functions like defined, clone, or…
litestar-vite
Auto-activate for litestarvite, VitePlugin, ViteConfig, PathConfig, RuntimeConfig, TypeGenConfig, InertiaConfig, vite.config.ts, HMR, typegen, assets, or modes. Not for plain Vite.
litestar-inertia
Auto-activate for litestarvite.inertia, InertiaConfig, component=, @inertia, @inertiajs/, createInertiaApp, useForm, usePage, Link, router, or pages/. Not for HTMX.
litestar-htmx
Auto-activate for litestarhtmx, HTMXPlugin, HTMXConfig, HTMXRequest, HTMXTemplate, HXLocation, ReplaceUrl, TriggerEvent, HX- headers, or Litestar partial HTML. Not for generic browser-side HTMX or Litestar Vite JSON templating — those are client concerns.