Skip to content
Agentmart
Submit a tool

api-integration

Wire the app to a backend API — data fetching, caching, error handling, loading states.

Skill by ajyadav013

IndexedMIT★ 14
Write a review

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/ajyadav013-api-integration

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.

We use your email only for this newsletter. Privacy

About

Wire the app to a backend API — data fetching, caching, error handling, loading states. Use when connecting to an endpoint, adding a fetch layer, or fixing API error and loading behaviour. React-query detail lives in tanstack-react-query-patterns.

Use cases: frontend, backend, data, agent-building

No 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

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/api-integration

What's inside

Skill name
api-integration
Description
Wire the app to a backend API — data fetching, caching, error handling, loading states. Use when connecting to an endpoint, adding a fetch layer, or fixing API error and loading behaviour. React-query detail lives in tanstack-react-query-patterns.
License
MIT
Instructions
367 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

Integrate API for: the invocation request.

## Steps

1. **Identify the API**: Determine the endpoint(s), HTTP method(s), request/response shapes, and authentication requirements for the invocation request.

2. **Define types**: Create typed interfaces for request and response payloads. Co-locate types with the API client module according to the project's conventions.

   ```typescript
   // TypeScript example
   export interface GetItemsParams {
     page: number;
     limit: number;
     status?: 'open' | 'resolved' | 'escalated';
   }

   export interface ItemResponse {
     data: Item[];
     total: number;
     page: number;
   }
   ```

   ```python
   # Python example (Pydantic)
   from pydantic import BaseModel

   class GetItemsParams(BaseModel):
       page: int
       limit: int
       status: str | None = None

   class ItemResponse(BaseModel):
       data: list[Item]
       total: int
       page: int
   ```

3. **Create API client functions**: Place in the project's designated API layer as pure async functions. Use the project's HTTP client.

   ```typescript
   // TypeScript example
   import { httpClient } from '@/lib/httpClient';
   import type { GetItemsParams, ItemResponse } from './types/items';

   export async function getItems(params: GetItemsParams): Promise<ItemResponse> {
     const { data } = await httpClient.get<ItemResponse>('/items', { params });
     return data;
   }

   export async function resolveItem(id: string, resolution: string): Promise<void> {
     await httpClient.post(`/items/${encodeURIComponent(id)}/resolve`, { resolution });
   }
   ```

   ```python
   # Python example (httpx)
   import httpx
   from .schemas import GetItemsParams, ItemResponse

   async def get_items(params: GetItemsParams) -> ItemResponse:
       async with httpx.AsyncClient() as client:
           response = await client.get('/items', params=params.model_dump())
           return ItemResponse.model_validate(response.json())

   async def resolve_item(id: str, resolution: str) -> None:
       async with httpx.AsyncClient() as client:
           await client.post(f'/items/{id}/resolve', json={'resolution': resolution})
   ```

4. **Create data-fetching hooks/functions**: Wrap API calls with the project's caching/state management layer.

   ### Query Pattern (React Query example)
   ```typescript
   import { useQuery } from '@tanstack/react-query';
   import { getItems } from '@/api/items';
   import type { GetItemsParams } from '@/api/types/items';

   export const itemKeys = {
     all: ['items'] as const,
     lists: () => [...itemKeys.all, 'list'] as const,
     list: (params: GetItemsParams) => [...itemKeys.lists(), params] as const,
     details: () => [...itemKeys.all, 'detail'] as const,
     detail: (id: string) => [...itemKeys.details(), id] as const,
   };

   export function useItems(params: GetItemsParams) {
     return useQuery({
       queryKey: itemKeys.list(params),
       queryFn: () => getItems(params),
       staleTime: 5 * 60 * 1000, // 5 minutes
       placeholderData: keepPreviousData,
     });
   }
   ```

   ### Mutation Pattern (React Query example)
   ```typescript
   import { useMutation, useQueryClient } from '@tanstack/react-query';
   import { resolveItem } from '@/api/items';

   export function useResolveItem() {
     const queryClient = useQueryClient();

     return useMutation({
       mutationFn: ({ id, resolution }: { id: string; resolution: string }) =>
         resolveItem(id, resolution),
       onSuccess: () => {
         queryClient.invalidateQueries({ queryKey: itemKeys.all });
       },
     });
   }
   ```

   ### Alternative: Service Layer Pattern (backend or Vue/Angular)
   ```python
   # Python service layer
   from .repository import ItemRepository
   from .schemas import GetItemsParams, ItemResponse

From ajyadav013/claude-kit, MIT.

More from ajyadav013/claude-kit

Signals

Stars
14
Forks
5
Open issues
9
Last commit (this folder)
Aug 22, 2026 (2 months ago)
Last release
Sep 7, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ajyadav013

Cite this page

api-integration skill. Agent Mart. https://agentmart.dev/skills/ajyadav013-api-integration (last updated 2026-10-24)