yapi-specialist

Parses YApi interface documentation to generate TypeScript type definitions and annotated API code.

1|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/linzb93/ai-coding-docs --skill yapi-specialist-linzb93
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: yapi-specialist
Source: https://github.com/linzb93/ai-coding-docs/tree/main/vue3/skills/yapi-specialist
Command: npx skills add https://github.com/linzb93/ai-coding-docs --skill yapi-specialist-linzb93

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires open, axios, fs-extra, dayjs, p-map, and includes scripts (resource) components.

What problem does it solve? Manually reading YApi interface documentation and translating it into TypeScript types and business code is repetitive and error-prone. This Skill automates fetching YApi docs, generating type definitions, and synchronizing code with the documented interface contract. ## Core Features & Use Cases - Open API Docs: Look up an interface by path in the local docs index and open its YApi page in the browser. - Generate Type Definitions: Parse a YApi interface URL, download the raw spec into docs/api/content, and produce a type.ts file with exported interfaces, extracting the result field when present. - Code Generation & Sync: Generate or modify business code to match the documented fields exactly, update shared/api.js endpoints and types/index.ts, remove stale mock.json files, and add JSDoc @file comments linking back to the YApi page. - Use Case: Given a YApi URL like http://192.168.0.107:3000/project/1386/interface/api/97271, the Skill fetches the spec, creates the interface types, and updates the module's API call code with correct field names and doc-link comments. ## Quick Start Parse this YApi interface documentation and generate the type definitions and API call code for it: http://192.168.0.107:3000/project/1386/interface/api/97271

Frequently Asked Questions about yapi-specialist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from a YApi interface document?▼

Run the create script with the YApi interface URL, which downloads the spec into docs/api/content as origin.json. Then generate a type.ts file in the module directory, extracting the result field structure when the response body contains one.

How do I open a YApi documentation page from an API path?▼

Run the open-yapi.js script with the API path as an argument. It looks up the path in docs/api/index.json, builds the YApi URL from the projectId and interface id, and opens it in the system browser.

What credentials does YApi interface fetching require?▼

Fetching requires a per-project token stored in a secret.json file at the project root under the yapiList array, keyed by projectId. Without a matching token, the script cannot retrieve interface details from the YApi server.

Can it fetch all interfaces in a YApi project or category?▼

Yes. The parser accepts single interface URLs, category URLs containing cat_ segments, and whole-project URLs. For categories and projects it lists all interfaces and downloads each detail concurrently with a concurrency of four.

Why does YApi doc fetching fail with a token error?▼

Failures occur when secret.json is missing, the projectId has no matching token entry, or the token has expired (YApi error code 40011). Verify the yapiList configuration and regenerate the token in the YApi project settings.