
Data Fetching
This is LobeHub's opinionated data fetching architecture that enforces a three-layer pattern: Service layer wraps all lambdaClient calls, Zustand stores expose SWR hooks instead of useEffect, and components call useFetchXxx hooks that handle loading states and cache invalidation. The skill covers the complete flow from service class setup through store actions with optimistic updates, including naming conventions like useFetchBenchmarks for reads and refreshBenchmarks for cache busting. It's strict about what not to do, no direct lambdaClient calls in components, no useEffect for data loading, no useState for server data. Works well if you want enforced separation of concerns and are already using this exact stack.
- skills.sh installs
- 812
- GitHub stars
- 84.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add lobehub/lobehub --skill data-fetching --agent claude-codeInstalls into .claude/skills of the current project.
Files
This is LobeHub's opinionated data fetching architecture that enforces a three-layer pattern: Service layer wraps all lambdaClient calls, Zustand stores expose SWR hooks instead of useEffect, and components call useFetchXxx hooks that handle loading states and cache invalidation. The skill covers the complete flow from service class setup through store actions with optimistic updates, including naming conventions like useFetchBenchmarks for reads and refreshBenchmarks for cache busting. It's strict about what not to do, no direct lambdaClient calls in components, no useEffect for data loading, no useState for server data. Works well if you want enforced separation of concerns and are already using this exact stack.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/lobehub/lobehub
- Categories
- Frontend Development, Backend & APIs, Documentation, Code Review & Quality
- First seen
- May 16, 2026
More from lobehub/lobehub
All 26- Vercel React Best Practices489
- Db Migrations248
- Spa Routes204
- Chat Sdk201
- Agent Tracing195
- Zustand6.9K
- React5.7K
- Drizzle5.5K
- Typescript5.2K
- I18n4.7K
- Project Overview4.4K
- Testing4.3K
- Desktop4.2K
- Modal4.2K
- Add Setting Env4.2K
- Linear4.1K
- Hotkey4.1K
- Add Provider Doc3.9K
- Microcopy2.5K
- Version Release2.4K
- Store Data Structures2.4K
- Pr2.3K
- Upstash Workflow2.3K
- Debug1.5K