Skip to content
Agentmart
Submit a tool

expo-services

Patrones de servicios API: requestWithAuth, manejo de errores, tipado.

Skill by myquota

IndexedMIT★ 2
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/cabrerojas-expo-services

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

Patrones de servicios API: requestWithAuth, manejo de errores, tipado. Trigger: Cuando se crean servicios, se hacen llamadas HTTP, o se usa requestWithAuth.

Use cases: backend

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/expo-services

What's inside

Skill name
expo-services
Description
Patrones de servicios API: requestWithAuth, manejo de errores, tipado. Trigger: Cuando se crean servicios, se hacen llamadas HTTP, o se usa requestWithAuth.
License
MIT
Metadata
author: myquota · version: 1.0
Instructions
229 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Propósito

Crear servicios API consistentes en MyQuota App usando `requestWithAuth`.

---

## HTTP Client

**SIEMPRE** usar `requestWithAuth` para endpoints autenticados:

```typescript
import { requestWithAuth } from "@/features/auth/hooks/useAuth";
import { API_BASE_URL } from "@/config/api";
```

**NUNCA** usar `fetch()` directamente para endpoints que requieren auth.

---

## Patrón Base

```typescript
// src/features/<feature>/services/<feature>Api.ts

import { requestWithAuth } from "@/features/auth/hooks/useAuth";
import { API_BASE_URL } from "@/config/api";
import { MyItem } from "@/shared/types/myItem";

export const getItems = async (): Promise<MyItem[]> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items`);
  if (!response.ok) {
    const data = await response.json().catch(() => null);
    const msg = data?.message || data?.error || `Error HTTP ${response.status}`;
    throw new Error(msg);
  }
  return response.json();
};
```

---

## Templates por Operación

### GET All

```typescript
export const getItems = async (): Promise<Item[]> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items`);
  if (!response.ok) {
    const data = await response.json().catch(() => null);
    const msg = data?.message || data?.error || `Error HTTP ${response.status}`;
    throw new Error(msg);
  }
  return response.json();
};
```

### GET by ID

```typescript
export const getItemById = async (id: string): Promise<Item> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items/${id}`);
  if (!response.ok) {
    const data = await response.json().catch(() => null);
    const msg = data?.message || data?.error || `Error HTTP ${response.status}`;
    throw new Error(msg);
  }
  return response.json();
};
```

### POST Create

```typescript
export const createItem = async (item: CreateItemDto): Promise<Item> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(item),
  });
  if (!response.ok) {
    const data = await response.json().catch(() => null);
    const msg = data?.message || data?.error || `Error HTTP ${response.status}`;
    throw new Error(msg);
  }
  return response.json();
};
```

### PUT Update

```typescript
export const updateItem = async (
  id: string,
  item: UpdateItemDto
): Promise<Item> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items/${id}`, {
    method: "PUT",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(item),
  });
  if (!response.ok) {
    const data = await response.json().catch(() => null);
    const msg = data?.message || data?.error || `Error HTTP ${response.status}`;
    throw new Error(msg);
  }
  return response.json();
};
```

### DELETE

```typescript
export const deleteItem = async (id: string): Promise<void> => {
  const response = await requestWithAuth(`${API_BASE_URL}/items/${id}`, {
    method: "DELETE",
  });
  if (!response.ok) {
    const data = await response.json().catch(() => null);

From cabrerojas/myquota-app, MIT.

More from cabrerojas/myquota-app

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Aug 15, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from myquota

Cite this page

expo-services skill. Agent Mart. https://agentmart.dev/skills/cabrerojas-expo-services (last updated 2026-10-24)