openapi-to-typescript

openapi-to-typescript is a skill for Claude Code from Dannykkh/skill-olympus. It costs 27 tokens per session (2,239 once invoked), scanned A, a copy of openapi-to-typescript, MIT.

A converter that turns OpenAPI 3.0 or 3.1 specifications into TypeScript interfaces, type guards, and request and response types. OpenAPI is a standard format for describing an HTTP API.

In plain words
What is it for?
Use it to generate TypeScript API types from OpenAPI files written in JSON or YAML, including types for schemas and endpoint requests and responses.
Why use it?
It removes the need to manually rewrite API schemas in TypeScript and checks that the input has the required OpenAPI structure. This helps keep application types aligned with the API description.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skill-olympus plugin — 98 skills, 7 commands, 42 agents, 5 MCP servers shipped together

Good fit Use it to generate TypeScript API types from OpenAPI files written in JSON or YAML, including types for schemas and endpoint requests and responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dannykkh/skill-olympus/openapi-to-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Dannykkh/skill-olympus --skill openapi-to-typescript
Clone the repo
git clone --depth 1 https://github.com/Dannykkh/skill-olympus

Made for: Claude Code.

Or install skill-olympus, the plugin that ships this one along with the rest of its 98 skills, 7 commands, 42 agents, 5 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openapi-to-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/dannykkh/skill-olympus/openapi-to-typescript/github.svg)](https://agentmods.dev/skills/dannykkh/skill-olympus/openapi-to-typescript)
Your own site
<a href="https://agentmods.dev/skills/dannykkh/skill-olympus/openapi-to-typescript"><img src="https://agentmods.dev/badge/skills/dannykkh/skill-olympus/openapi-to-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openapi-to-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/dannykkh/skill-olympus/openapi-to-typescript"><img src="https://agentmods.dev/badge/skills/dannykkh/skill-olympus/openapi-to-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.02239
Opus 5 $0.00014 $0.01120
Sonnet 5 $0.00005 $0.00448
Haiku 4.5 $0.00003 $0.00224

Measured 7d ago against content hash 8d319b31a790, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

openapi-to-typescript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to openapi-to-typescript — 25 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/openapi-to-typescript/SKILL.md · 360 lines

How it starts

The opening of the file, as written. The whole thing — 360 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAPI to TypeScript

Converts OpenAPI 3.0 and 3.1 specifications to TypeScript interfaces and type guards.

Input: OpenAPI file (JSON or YAML) Output: TypeScript file with interfaces and type guards

When to Use

  • "generate types from openapi"
  • "convert openapi to typescript"
  • "create API interfaces"
  • "generate types from spec"

Workflow

  1. Request the OpenAPI file path (if not provided)
  2. Read and validate the file (must be OpenAPI 3.0.x or 3.1.x)
  3. Extract schemas from components/schemas
  4. Extract endpoints from paths (request/response types)
  5. Generate TypeScript (interfaces + type guards)
  6. Ask where to save (default: types/api.ts in current directory)
  7. Write the file

OpenAPI Validation

Check before processing:

- Field "openapi" must exist and start with "3.0" or "3.1"
- Field "paths" must exist
- Field "components.schemas" must exist (if there are types)

If invalid, report the error and stop.

Type Mapping

Primitives

OpenAPI TypeScript
string string
number number
integer number
boolean boolean
null null

Format Modifiers

Format TypeScript
uuid string (comment UUID)
date string (comment date)
date-time string (comment ISO)
email string (comment email)
uri string (comment URI)

Nullable & Union (OpenAPI 3.0 vs 3.1)

3.0과 3.1은 nullable·union 표현이 다릅니다 — 둘 다 처리하세요:

입력 버전 TypeScript
{type: string, nullable: true} 3.0 string | null
{type: ["string", "null"]} 3.1 string | null
{type: ["string", "integer"]} 3.1 string | number
example / examples: [...] 3.0 / 3.1 JSDoc @example
  • 3.0: nullable은 nullable: true로만 표현. type은 항상 단일 문자열.
  • 3.1: nullable 키워드 없음type을 배열로(["string","null"]) 표현. type 배열은 그대로 TS union으로 매핑하고 "null" 멤버는 | null로 변환.
  • 3.1은 JSON Schema 2020-12 정합이라 const(→ 리터럴 타입), examples(배열), $defs 등이 올 수 있습니다. 모르는 키워드는 unknown으로 처리하고 경고.

Read the full file on GitHub · 360 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 360 lines · 27 tokens per session scan A 8d319b31a790

Subscribe to this mod's changes

openapi-to-typescript is a skill published in the GitHub repository Dannykkh/skill-olympus (5 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 2,239 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to openapi-to-typescript, differing in 25 lines, and is treated as a copy.

Related

Other skills, from other repositories

better-auth

Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.

secondsky/claude-skills · 53 tokens

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens

bun-api

Bun runtime API reference for TypeScript scripts. Covers Bun.serve() HTTP/HTTP/2 server with routes and WebSockets, fetch() transport options, Bun.file(), Bun.write(), Bun.$() shell, Bun.spawn(), Bun.Glob, Bun.env, bun:sqlite, Bun.sql() for PostgreSQL/MySQL via DATABASEURL, Bun.s3 for S3-compatible storage, Bun.redis…

dmythro/agent-skills · 250 tokens

express-prisma-pattern

House pattern for Express + Prisma backends structured as manual Clean Architecture (controller → usecase → repository, wired by hand in a factory) — the real shape of dream-book-api and simple-management-api. Use whenever creating a new route, usecase or domain in an Express backend on this stack, even if the request…

JoaoEquer/Oficina · 85 tokens

skill-nestjs-api

Padrões DARE para APIs REST em NestJS + TypeScript + Prisma + Swagger. Modules, Controllers, Services, DTOs com class-validator, Guards, Interceptors, exceções globais, Jest + Supertest, OpenAPI auto-gerado, rate limiting com @nestjs/throttler.

dewtech-technologies/dare-method · 67 tokens

backend-dev-guidelines

Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod valid...

rootcastleco/rei-skills · 39 tokens