Skip to content
Back to skills

Rest Client Generator

ASecurity

Generate REST API client code in multiple languages with error handling. Use when creating API client libraries or SDK code.

  • 30 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 12, 2026
developmentjavascripttypescriptpythonjavaapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill rest-client-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rest Client Generator?

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

Security grade badge for Rest Client Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-rest-client-generator-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-rest-client-generator-claude-skill-registry-data)

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: rest-client-generator
description: Generate REST API client code in multiple languages with error handling. Use when creating API client libraries or SDK code.
---

# REST Client Generator Skill

REST API クライアントコードを生成するスキルです。

## 主な機能

- **Axios クライアント**: JavaScript/TypeScript
- **Fetch API**: モダンJavaScript
- **Requests**: Python
- **HTTPClient**: Java

## Axios (TypeScript)

```typescript
import axios, { AxiosInstance } from 'axios';

class UserAPI {
  private client: AxiosInstance;

  constructor(baseURL: string) {
    this.client = axios.create({
      baseURL,
      timeout: 5000,
      headers: {
        'Content-Type': 'application/json'
      }
    });

    this.setupInterceptors();
  }

  private setupInterceptors() {
    this.client.interceptors.request.use(
      (config) => {
        const token = localStorage.getItem('token');
        if (token) {
          config.headers.Authorization = `Bearer ${token}`;
        }
        return config;
      }
    );

    this.client.interceptors.response.use(
      (response) => response,
      (error) => {
        if (error.response?.status === 401) {
          // Handle unauthorized
        }
        return Promise.reject(error);
      }
    );
  }

  async getUsers(): Promise<User[]> {
    const { data } = await this.client.get('/users');
    return data;
  }

  async createUser(user: CreateUserDTO): Promise<User> {
    const { data } = await this.client.post('/users', user);
    return data;
  }

  async updateUser(id: string, user: UpdateUserDTO): Promise<User> {
    const { data } = await this.client.put(`/users/${id}`, user);
    return data;
  }

  async deleteUser(id: string): Promise<void> {
    await this.client.delete(`/users/${id}`);
  }
}

export const userAPI = new UserAPI('https://api.example.com');
```

## Python (requests)

```python
import requests
from typing import List, Optional

class UserAPI:
    def __init__(self, base_url: str, api_key: str):
        self.base_url = base_url
        self.session = requests.Session()
        self.session.headers.update({
            'Authorization': f'Bearer {api_key}',
            'Content-Type': 'application/json'
        })

    def get_users(self) -> List[dict]:
        response = self.session.get(f'{self.base_url}/users')
        response.raise_for_status()
        return response.json()

    def create_user(self, user_data: dict) -> dict:
        response = self.session.post(
            f'{self.base_url}/users',
            json=user_data
        )
        response.raise_for_status()
        return response.json()

    def update_user(self, user_id: str, user_data: dict) -> dict:
        response = self.session.put(
            f'{self.base_url}/users/{user_id}',
            json=user_data
        )
        response.raise_for_status()
        return response.json()

    def delete_user(self, user_id: str) -> None:
        response = self.session.delete(f'{self.base_url}/users/{user_id}')
        response.raise_for_status()
```

## バージョン情報
- Version: 1.0.0

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.

View all in development →

Comments

Loading comments…

Newsletter

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