david-li0406/meta-skill-evloving/fetch-api-data
Claude Code and agent skill by david-li0406/meta-skill-evloving
Trust tier 2
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending
Checking that the SKILL.md file is still in the repository.
Generates Query hooks and services for API data fetching and mutations.
Install
npx vskill@latest install david-li0406/meta-skill-evloving/fetch-api-dataSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as david-li0406/meta-skill-evloving/fetch-api-data.
Fetch API Data Skill
This skill provides instructions for implementing data fetching and mutations using TanStack Query in the Verseau frontend.
Tech Stack
- Library:
@tanstack/react-query - Framework: React 19
- API Client: Standard
fetch(or a wrapper if available in the project) - Services:
apps/front/src/servicesfor reusable business logic and specialized API handlers (e.g.,authService).
Core Principles
0. Services vs. Hooks
- Use Services (
apps/front/src/services) for raw API calls, authentication logic, or complex data transformations that are independent of the React lifecycle. - Use Hooks (
apps/front/src/hooks) to wrap these services with TanStack Query, managing loading states and caching within components.
1. Custom Hooks
- ALWAYS wrap API calls in custom hooks located in
apps/front/src/hooks. - Name hooks starting with
use(e.g.,useProjects,useUpdateUser).
2. useQuery for Fetching
- Use
useQueryfor read operations. - Ensure unique and descriptive
queryKeyarrays. - Handle loading and error states.
3. useMutation for Side Effects
- Use
useMutationfor CREATE, UPDATE, or DELETE operations. - Implement
onSuccesscallbacks to invalidate related queries usingqueryClient.invalidateQueries.
4. Integration with UI
- Use the returned
status,isLoading,error, anddataobjects in components. - Map errors to DSFR
Alertcomponents or toast notifications.
5. Testing
- Hooks SHOULD be tested using
@testing-library/react-hooksor similar. - Mock the API calls using
vi.fn()or a mocking library. - Ensure the hook correctly transitions through states (loading -> success/error).
- Test that mutations correctly trigger invalidations.
Example: Query Hook
Example: Mutation Hook
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill-flow/data/skills-refined-36k/skillsmp/fetch-api-data/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/david-li0406/meta-skill-evloving/fetch-api-data)