omgskills Get the Mac app
Skill

data-fetching-architecture

@lobehub 81k stars Updated 2026-07-28 Author match: High

LobeHub data-fetching pipeline guide. Use for service layer, Zustand store, SWR, lambdaClient, useClientDataSWR, useFetchXxx hooks, or migrating useEffect fetches.

agentagent-collaborationagent-harnessaicaochatgptchief-agent-operatorclaude

Install

Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.

Install command
git clone https://github.com/lobehub/lobehub /tmp/lobehub && ln -s /tmp/lobehub/.agents/skills/data-fetching-architecture ~/.claude/skills/data-fetching-architecture

View on GitHub

From README

LobeHub Data Fetching Architecture Related: store-data-structures covers List vs Detail data shape rationale (Map vs Array). Architecture Overview Core Principles ✅ DO Use Service Layer for all API calls Use Store SWR Hooks for data fetching (not useEffect) Use proper data structures — see store-data-structures skill for List vs Detail patterns Use lambdaClient.mutate for write operations (create/update/delete) Use lambdaClient.query only inside service methods Naming convention — read hooks are useFetchXxx, cache invalidation helpers are refreshXxx (e.g. useFetchBenchmarks / refreshBenchmarks). Mutations then chain refreshXxx() after the service call.

More from this repo