api-fetching
Implements data fetching following a three-layer pattern (api → repository → hook) with TanStack Query.
Skill by ZevaGuillo
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zevaguillo-api-fetching
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-fetching
What's inside
- Skill name
api-fetching- Description
- Implements data fetching following a three-layer pattern (api → repository → hook) with TanStack Query. Use this skill when writing any data fetching code, creating API calls, defining query hooks, or implementing mutations with optimistic updates.
- License
- MIT
- Instructions
- 77 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (12)
- SKILL.md
- errors.ts · rules/
- invalidation.ts · rules/
- nextjs.ts · rules/
- optimistic.ts · rules/
- query-keys.ts · rules/
- shared-types.ts · rules/
- three-layer.ts · rules/
- entity.repository.ts · templates/
- query-client.template.ts · templates/
- query-keys.template.ts · templates/
- useEntity.template.ts · templates/
SKILL.md (first lines)
# api-fetching — Execution Protocol
## Phase 1: Intent Detection
### IF user says:
- "fetch data" / "API call" / "get data"
- "useQuery" / "useMutation"
- "TanStack Query" / "React Query"
- "optimistic update" / "cache invalidation"
- "server component" / "SSR" / "hydration"
→ THEN activate api-fetching skill
## Phase 2: Context Selection (LAZY LOAD)
### Required (ALWAYS):
- rules/three-layer.ts (always needed)
### Conditional (LOAD ON DEMAND):
| User Context | Load Rule |
|------------|-----------|
| Query keys | rules/query-keys.ts |
| Optimistic updates | rules/optimistic.ts |
| Cache invalidation | rules/invalidation.ts |
| Error handling | rules/errors.ts |
| Next.js SSR | rules/nextjs.ts |
| Type sharing | rules/shared-types.ts |
## Phase 3: Decision Tree
```
User Request
│
├─► New API endpoint? → three-layer.ts → api → repository → hook
│
├─► Query keys? → LOAD: query-keys.ts → QUERY_KEYS constants
│
├─► Mutation with update? → LOAD: optimistic.ts → onMutate/onError
│
├─► After mutation? → LOAD: invalidation.ts → invalidateQueries
│
├─► Error handling? → LOAD: errors.ts → three-level handling
│
└─► Next.js SSR? → LOAD: nextjs.ts → HydrationBoundary
```
## Phase 4: Output Generation
### DO:
- Generate api → repository → hook structure
- Use QUERY_KEYS constants
- Implement optimistic updates for mutations
- Invalidate after mutations
### DON'T:
- Use useQuery directly in components
- Magic string query keys
- Skip error handling
## Quick Reference
| Pattern | Location |
|---------|----------|
| Three-layer | rules/three-layer.ts |
| Query keys | rules/query-keys.ts |
| Optimistic | rules/optimistic.ts |
| Invalidation | rules/invalidation.ts |
| Next.js SSR | rules/nextjs.ts |
## Commands
```
npx api:add [entity] → Generate api + repository + hooks
npx api:mutation [type] → Add CRUD mutation
```From ZevaGuillo/frontend-skills, MIT.
More from ZevaGuillo/frontend-skills
- 0.409score
project-setup
ZevaGuillo
Scaffolds a new frontend project or feature following screaming architecture by feature.
SkillDFreshness: DClaude Code +9 - 0.409score
components
ZevaGuillo
Guides the creation of React components using shadcn/ui as a base with compound component patterns.
SkillDFreshness: DClaude Code +9 - 0.409score
forms
ZevaGuillo
Implements forms using React Hook Form with Zod validation.
SkillDFreshness: DClaude Code +9 - 0.380score
nextjs-integration
ZevaGuillo
Adapts the feature architecture to Next.js App Router, TanStack Start, or Vite SPA.
SkillDFreshness: DClaude Code +9 - 0.380score
tailwind-styling
ZevaGuillo
Configures a dynamic theming system using semantic design tokens and a Tailwind CSS preset.
SkillDFreshness: DClaude Code +9 - 0.380score
state-management
ZevaGuillo
Implements state management patterns using Zustand for client-side global state.
SkillDFreshness: DClaude Code +9 - 0.226score
performance-optimization
ZevaGuillo
Enforces code quality principles in React and TypeScript including SOLID, KISS, YAGNI, and DRY.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 30, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ZevaGuillo/frontend-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ZevaGuillo
- 0.409score
components
ZevaGuillo
Guides the creation of React components using shadcn/ui as a base with compound component patterns.
SkillDFreshness: DClaude Code +9 - 0.409score
forms
ZevaGuillo
Implements forms using React Hook Form with Zod validation.
SkillDFreshness: DClaude Code +9 - 0.409score
project-setup
ZevaGuillo
Scaffolds a new frontend project or feature following screaming architecture by feature.
SkillDFreshness: DClaude Code +9 - 0.380score
nextjs-integration
ZevaGuillo
Adapts the feature architecture to Next.js App Router, TanStack Start, or Vite SPA.
SkillDFreshness: DClaude Code +9 - 0.380score
state-management
ZevaGuillo
Implements state management patterns using Zustand for client-side global state.
SkillDFreshness: DClaude Code +9 - 0.380score
tailwind-styling
ZevaGuillo
Configures a dynamic theming system using semantic design tokens and a Tailwind CSS preset.
SkillDFreshness: DClaude Code +9
Cite this page
api-fetching skill. Agent Mart. https://agentmart.dev/skills/zevaguillo-api-fetching (last updated 2026-10-24)