Skip to content
Agentmart
Submit a tool

api-client-gen

需要从 OpenAPI spec 生成类型安全的 API 客户端时使用

Skill by noobke

IndexedMIT★ 3
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/noobke-api-client-gen

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

需要从 OpenAPI spec 生成类型安全的 API 客户端时使用

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/api-client-gen

What's inside

Skill name
api-client-gen
Description
需要从 OpenAPI spec 生成类型安全的 API 客户端时使用
License
MIT
Instructions
44 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • name: missing

Files (1)

  • SKILL.md

SKILL.md (first lines)

# API Client Gen — API 客户端生成

从 OpenAPI/Swagger spec 或接口文档生成类型安全的 API 客户端。

## 流程

1. **读取 spec** — OpenAPI yaml/json 或接口文档
2. **分析接口** — 提取 endpoints、methods、parameters、responses
3. **生成类型** — TypeScript interfaces/types
4. **生成客户端** — 带类型的 fetch/axios 包装

## 输出

```
src/api/
├── types.ts       # 请求/响应类型
├── client.ts      # API 客户端(含错误处理)
└── endpoints/
    ├── users.ts   # 用户相关接口
    └── posts.ts   # 文章相关接口
```

## 客户端模板

```typescript
// client.ts
const BASE_URL = process.env.API_URL ?? 'http://localhost:3000';

async function request<T>(
  endpoint: string,
  options?: RequestInit,
): Promise<T> {
  const res = await fetch(`${BASE_URL}${endpoint}`, {
    headers: { 'Content-Type': 'application/json' },
    ...options,
  });
  if (!res.ok) {
    throw new ApiError(res.status, await res.text());
  }
  return res.json();
}
```

From noobke/reasonix-skills, MIT.

More from noobke/reasonix-skills

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
May 28, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from noobke

Cite this page

api-client-gen skill. Agent Mart. https://agentmart.dev/skills/noobke-api-client-gen (last updated 2026-10-24)