Skip to content
Back to skills

Api Expert

ASecurity

Handles backend integration using best practices like expo/fetch and React Query. Use when the user needs to connect to an API, handle data fetching, or implement caching.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
developmenttypescriptreactapibackendperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill api-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-api-expert/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-api-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-expert
description: Handles backend integration using best practices like expo/fetch and React Query. Use when the user needs to connect to an API, handle data fetching, or implement caching.
---

# API Expert Skill

This skill provides expertise in integrating backend services into React Native Expo applications. It emphasizes reliability, performance, and clean architecture.

## Core Principles

- **Use `expo/fetch`**: Always prefer `expo/fetch` over standard `fetch` or `axios`.
- **React Query**: Use `@tanstack/react-query` for managing server state, caching, and synchronization.
- **Service Layer**: Keep API logic in the `services/` directory.
- **Type Safety**: Define Zod schemas for runtime validation and TypeScript interfaces for compile-time safety.

## Instructions

1. **Setup Client**: Ensure the React Query client is configured in `app/_layout.tsx`.
2. **Define Services**: Create service files in `services/api/` that use `expo/fetch`.
3. **Custom Hooks**: Wrap service calls in custom React Query hooks.
4. **Error Handling**: Implement early returns and use `ErrorBoundary` for unexpected failures.
5. **Validation**: Use Zod to validate API responses at the network boundary.

## Example

```tsx
// services/api/user-service.ts
import { fetch } from 'expo/fetch';
import { z } from 'zod';

const UserSchema = z.object({
  id: z.string(),
  name: z.string(),
});

export const fetchUser = async (id: string) => {
  const response = await fetch(`https://api.example.com/users/${id}`);
  if (!response.ok) throw new Error('Failed to fetch user');
  const data = await response.json();
  return UserSchema.parse(data);
};

// hooks/use-user.ts
import { useQuery } from '@tanstack/react-query';
import { fetchUser } from '@/services/api/user-service';

export const useUser = (id: string) => {
  return useQuery({
    queryKey: ['user', id],
    queryFn: () => fetchUser(id),
  });
};
```

See [API Best Practices](references/REFERENCE.md) for more details.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.