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.
Generate Python code from OpenAPI via aptx-ft, including Pydantic models, sync API functions, and OpenAI function-calling tools.json. Use when user wants: (1) to generate Python client code from OpenAPI/Swagger, (2) Pydantic v2 data models from API schemas, (3) sync API function wrappers with RequestSpec, (4) OpenAI function-calling tools.json, (5) Python code generation targeting aptx-api-core runtime, (6) track generated files with manifest, (7) preview changes before generation. Do NOT use for TypeScript code generation — use generate-artifacts or generate-models instead.
Write custom JS plugins for the aptx-ft CLI to add commands, generate code, or analyze OpenAPI specs. Use when: (1) writing or loading a plugin file (.js/.ts), (2) using --plugin/-p CLI flag, (3) creating custom CLI subcommands, (4) accessing parsed OpenAPI data via ctx.getIr/PluginContext/GeneratorInput, (5) building custom code generators (e.g. Axios clients), (6) producing reports from OpenAPI specs, (7) questions about PluginDescriptor/CommandDescriptor/OptionDescriptor. Do NOT use for standard generation (models, react-query, vue-query, barrel files) — use generate-artifacts or generate-models instead.
这是一个 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 集成更快、更安全。
Team-oriented workflow plugin with role agents, 27 specialist agents, ECC-inspired commands, layered rules, and hooks skeleton.
UI/UX design intelligence. 67 styles, 161 palettes, 57 font pairings, 25 charts, 15 stacks (React, Next.js, Vue, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Nuxt, Jetpack Compose). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Comprehensive startup business analysis with market sizing (TAM/SAM/SOM), financial modeling, team planning, and strategic research
This skill should be used when users need to generate ideas, explore creative solutions, or systematically brainstorm approaches to problems. Use when users request help with ideation, content planning, product features, marketing campaigns, strategic planning, creative writing, or any task requiring structured idea generation. The skill provides 30+ research-validated prompt patterns across 14 categories with exact templates, success metrics, and domain-specific applications.