data-fetching-architecture
LobeHub data-fetching pipeline guide. Use for service layer, Zustand store, SWR, lambdaClient, useClientDataSWR, useFetchXxx hooks, or migrating useEffect fetches.
Install
git clone https://github.com/lobehub/lobehub /tmp/lobehub && ln -s /tmp/lobehub/.agents/skills/data-fetching-architecture ~/.claude/skills/data-fetching-architecture
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
add-provider-doc
Used to add documentation for a new AI provider — usage docs, env vars, Docker config, image resources.
full-text-search
LobeHub product full-text search architecture and operations.
testing-heterogeneous-agents
Manually runs the live LobeHub official-provider compatibility matrix across Claude Code, Codex, Grok Build, Kimi Code,...
