Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
A collection of frontend skills for working with OpenAPI specifications, including downloading Swagger files and generating TypeScript models.
npx claudepluginhub haibaraaiaptx/frontend-openapi-skills --plugin frontend-openapi-skillsMateral-specific enum adaptation workflow: fetch enum values from provider API, let LLM fill suggested_name, then apply patch with aptx-ft. Use ONLY when: (1) user mentions Materal framework, (2) Materal naming rules are required, or (3) adapting Materal enum semantics. Do NOT use for generic OpenAPI projects.
Download remote OpenAPI/Swagger JSON specification from a URL to local file using aptx-ft CLI. TRIGGER when user mentions: (1) fetch/pull/download swagger or openapi from URL, (2) save API spec to openapi.json locally, (3) get API documentation from server, or (4) prepare local input for code generation. DO NOT TRIGGER when: generating code/types from local file, reading existing openapi.json, downloading non-OpenAPI files, or authentication is required.
Generate frontend artifacts from OpenAPI via aptx-ft, including models and request clients. Use when user wants: (1) to generate API code from OpenAPI/Swagger, (2) React Query hooks from API spec, (3) Vue Query composables from API spec, (4) function-based API clients, (5) a standard flow for frontend projects without framework-specific business adaptation, (6) track generated files with manifest, (7) preview changes before generation, or (8) update barrel files automatically.
Generate barrel index.ts files for TypeScript projects. Use when user mentions: (1) barrel files, (2) index.ts exports, (3) re-export files, (4) simplify import paths, (5) create index files for directory, or (6) generate export aggregators.
Generate TypeScript interfaces and enums from OpenAPI schemas using aptx-ft CLI. Use when user asks to: (1) generate types/models from OpenAPI/Swagger, (2) create TypeScript interfaces from API schema, (3) extract type definitions from openapi.json, (4) generate selective models with --name filter, (5) preserve translated enum values, (6) track generated files with manifest, (7) preview changes before generation, or (8) update barrel files automatically. Do NOT use for full artifact generation with request layer or Material UI enum adaptation.
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Kubb is a meta framework for code generation. Generate TypeScript types, Zod schemas, Axios and fetch clients, React Query and Vue Query hooks, Faker mocks and more from an OpenAPI spec. The commands run the Kubb CLI, and a bundled MCP server adds conversational generation.
OpenAPI spec generation, validation, and client code scaffolding
OpenAPI CLI expert for @desplega.ai/oapi - register specs, execute requests, manage auth
SDK generation and OpenAPI tooling with Speakeasy CLI
Generate comprehensive API documentation from OpenAPI/Swagger specs
Creates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples. Use when documenting REST APIs, creating SDK references, or building developer portals.
这是一个 Claude Code 技能集,基于底层 aptx-ft 代码生成器,从 OpenAPI 3.x 规范生成前端模型与请求代码。
从 OpenAPI 定义自动生成类型安全的模型代码 — 消除手动类型定义,减少样板代码。
从远程 URL 下载 OpenAPI 3.x JSON 规范文件。
从 OpenAPI 3.x 规范生成 TypeScript 模型(接口、枚举):
aptx-ft model:gen,保持通用、纯净从 OpenAPI 3.x 规范生成通用前端产物:
model:gen)terminal:codegen,如 axios-ts / react-query / vue-query)仅用于 Materal 框架:
suggested_namegenerate-artifacts / generate-models(所有前端项目可用)adapt-materal-enums(仅 Materal,必须专用触发)在使用这些 skill 的目标前端项目中安装 aptx 相关包,并保证命令 aptx-ft 可用。
安装命令(任选其一):
pnpm add -D @aptx/frontend-tk-cli @aptx/frontend-tk-types
npm install -D @aptx/frontend-tk-cli @aptx/frontend-tk-types
yarn add -D @aptx/frontend-tk-cli @aptx/frontend-tk-types
项目代码中请使用包名引用,例如:
import type { APTXFtConfig } from "@aptx/frontend-tk-types";
不要在项目中引用仓库绝对路径(如 F:/... 或 /mnt/...)。
统一使用包命令(pnpm exec aptx-ft ... / npx aptx-ft ...)。
# 将此仓库添加为市场
/plugin marketplace add https://github.com/HaibaraAiAPTX/frontend-openapi-skills
# 安装插件
/plugin install frontend-openapi-skills@frontend-openapi-skills
下载并转换 OpenAPI 3.x JSON 规范为 TypeScript 模型:
Download https://petstore.swagger.io/v2/swagger.json file and convert to TypeScript models
为每个模型生成一个 TypeScript 文件以便更好地组织:
Download https://api.example.com/swagger.json file and convert to TypeScript models in folder mode
输出示例(文件夹模式):
src/types/
├── User.ts
├── UserStatus.ts
├── Order.ts
├── Product.ts
└── index.ts
每个文件自动导入其依赖项:
// User.ts
import { UserStatus } from './UserStatus';
export interface User {
id: number;
email: string;
status: UserStatus;
}
有关详细的配置选项和高级用法,请参阅技能文档。
仅支持 OpenAPI 3.x JSON 格式,不支持 Swagger 2.0 和 YAML 格式
| 功能 | OpenAPI 3.x |
|---|---|
| 基本类型 | ✅ |
| 枚举 | ✅ |
| 数组 | ✅ |
| 对象/嵌套 | ✅ |
| 必填/可选字段 | ✅ |
| 格式类型 | ✅ |
| 引用($ref) | ✅ |
| 描述支持 | ✅ |
| 类型导入 | ✅ |
注意事项:
我们欢迎贡献!要添加新技能:
skills/ 中创建新的技能目录SKILL.md 文件# 克隆仓库
git clone https://github.com/HaibaraaiAPTX/frontend-openapi-skills.git
cd frontend-openapi-skills
# 本地测试(直接使用 aptx 包命令)
pnpm exec aptx-ft input download --url <url> --output ./openapi.json
pnpm exec aptx-ft -i ./openapi.json model gen --output ./src/types --style module
# 将技能安装到 Claude Code 进行测试
cp -r skills/* ~/.claude/skills/
本项目在 MIT 许可证下授权 — 有关详细信息,请参阅 LICENSE 文件。
MIT License
Copyright (c) 2025 HaibaraaiAPTX
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
为 Claude Code 生态系统构建,使前端开发人员的 API 集成更快、更安全。