# API integration

> API integration is an open-source agent skill for developer tools. Guides an agent to wire a backend API into an app with fetching, caching and error. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ajyadav013/claude-kit/tree/main/providers/codex/claude-kit/skills/api-integration
- **Repository:** https://github.com/ajyadav013/claude-kit
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** api-integration
- **Collection:** https://github.com/ajyadav013/claude-kit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill walks the agent through connecting an application to a backend endpoint. It covers defining request and response types, writing plain async API client functions, and wrapping those calls in data-fetching hooks or a service layer. Examples are given for React with TanStack Query, Vue and Angular, and for Python backends using Pydantic, httpx and FastAPI.

The guidance also covers boundary validation of responses with libraries such as Zod or Pydantic, loading, empty and error state handling in components, and optimistic updates. It includes suggested stale time defaults by data type, a cache key factory pattern, and a record-replay approach for deterministic tests against external APIs with secrets redacted from fixtures.

The skill is instruction-only and ships no scripts. It expects the project to already have an HTTP client and state layer, and it asks the agent to finish by running the project's linter, type checker and build. Its examples assume TypeScript or Python.

## When your agent uses it

> 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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ajyadav013/claude-kit/tree/HEAD/providers/codex/claude-kit/skills/api-integration)
- [License: MIT](https://github.com/ajyadav013/claude-kit/tree/HEAD/providers/codex/claude-kit/skills/api-integration)

## Features

- **Typed API clients:** Covers request and response type definitions and plain async client functions placed in the project's API layer.
- **Data-fetching hooks:** Shows query and mutation wrappers with cache key factories and cache invalidation after writes.
- **Response validation:** Describes validating API payloads at the boundary using Zod or Pydantic validators.
- **Loading and error states:** Gives the component pattern for loading, empty and failed-request states, plus auth error handling.
- **Caching defaults:** Suggests stale time values for reference data, dashboards, real-time feeds and user preferences.
- **Record-replay testing:** Explains recording real API responses to fixtures with secrets redacted, then replaying them offline.

## Good for

- Connect a React screen to a REST endpoint with loading and error states
- Add a typed fetch layer for a new backend resource
- Fix an API call that shows stale data or fails silently
- Set up mutations that refresh the list after a change
- Add response validation so bad payloads fail early
- Write offline tests for code that calls a third-party API

## Install

### Claude Code

This skill ships in the `claude-kit` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit
```

Or copy only this skill to `~/.claude/skills/api-integration`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-integration &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-integration" ~/.claude/skills/api-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/api-integration` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/api-integration` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-integration &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-integration" ~/.agents/skills/api-integration &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/api-integration` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/api-integration` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-integration &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-integration" ~/.cursor/skills/api-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/api-integration` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ajyadav013/claude-kit.git --path providers/codex/claude-kit/skills/api-integration
```

Or copy the folder to `~/.gemini/skills/api-integration` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/api-integration`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-integration &&
cp -R "$tmp/providers/codex/claude-kit/skills/api-integration" ~/.copilot/skills/api-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/api-integration` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git
```

Then copy `claude-kit/providers/codex/claude-kit/skills/api-integration` into your agent's skills folder as `api-integration`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does API integration change in my project?

It guides the agent to add typed API client functions, data-fetching hooks or a service layer, and validation of responses, following the project's existing conventions.

### Which stacks does API integration cover?

Its examples cover React with TanStack Query, Vue with Pinia, Angular with RxJS, and Python backends such as FastAPI, using Pydantic and httpx.

### Does API integration include scripts?

No. The skill contains only the SKILL.md instructions and a folder README, with no scripts.

### Which libraries does API integration require?

It assumes the project already has an HTTP client and a data-fetching or state layer. Its examples use Axios or fetch, TanStack Query, Zod and Pydantic, but the text says to use whatever the project configures.

### How do I install API integration in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-integration to use it in all your projects, or to .claude/skills/api-integration in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

### Does API integration run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use API integration?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to API integration?

The closest alternatives to API integration are Backend patterns, Backend patterns, API design, API and interface design and Backend patterns.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Backend patterns](https://ai-powered.com/skills/backend-patterns): Backend patterns is an open-source agent skill for developer tools.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns-fmarzochi): Backend patterns is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-fmarzochi): API design is an open-source agent skill for developer tools.
- [API and interface design](https://ai-powered.com/skills/api-and-interface-design-ajyadav013): API and interface design is an open-source agent skill for design and media.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns-abdullayevtemurmalik): Backend patterns is an open-source agent skill for developer tools.
- [API and interface design](https://ai-powered.com/skills/api-and-interface-design): API and interface design is an open-source agent skill for design and media.
- [API SDK generator](https://ai-powered.com/skills/api-sdk-generator): API SDK generator is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design): API design is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/api-integration-ajyadav013
