Skip to content
Back to skills

Api Client

ASecurity

Helps with APIs and code generation.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
ai-agentspythonbashapidocumentation

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 4, 2026

npx -y skills add shahshrey/skill-trainer --skill api-client --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Client?

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

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

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-http-client
description: Helps with APIs and code generation.
---

## Overview

Generate a fully typed HTTP client from an OpenAPI specification. This skill takes an OpenAPI 3.0+ schema and produces idiomatic, production-ready Python code with complete type hints, request validation, and response parsing.

## When to use this skill

Use when consuming a REST API where generated bindings beat hand-written HTTP calls. Particularly valuable when the API schema is the source of truth and client code must stay in sync as the API evolves.

## Quick start

1. Provide the OpenAPI spec (as a URL, local file path, or inline YAML/JSON)
2. Specify the HTTP client library preference: use requests, httpx, or aiohttp
3. Configure code generation options (base package name, output directory)
4. The skill generates `/client.py` with all operations as typed methods

## Generated code structure

The client module includes:

- **Models**: Pydantic-based request/response types with validation
- **Client class**: Async or sync methods for each API operation
- **Error handling**: Custom exception types for HTTP errors and validation failures
- **Authentication**: Support for API key, Bearer token, and OAuth2 flows

## Example

Given an OpenAPI spec for a pet store API:

```python
from generated_client import PetStoreClient

client = PetStoreClient(base_url="https://api.petstore.example.com")
pets = await client.list_pets(limit=10)
for pet in pets:
    print(pet.name, pet.species)
```

## Configuration

The skill accepts these parameters:

- `spec_url` (required): URL or local path to OpenAPI schema
- `output_format`: "single-file" or "structured" (organized by resource)
- `include_tests`: Generate pytest fixtures alongside client code
- `doc_style`: "docstring" or "markdown" for inline documentation

## Dependencies

The generated client requires the chosen HTTP library. Install one of:

```bash
pip install requests
pip install httpx
pip install aiohttp
```

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.