Import API Specification

VerifiedSafe

Imports API specifications (OpenAPI, Swagger, GraphQL, AsyncAPI, Protobuf) and configures them for documentation. Automatically detects spec type, validates syntax, resolves references, and generates structured documentation pages. Useful when onboarding an existing API or migrating to a documentation platform.

Sby Skills Guide Bot
DocumentationIntermediate
3/9/2026
Claude CodeCursorCodex
#openapi#graphql#api-documentation#spec-import#mintlify

Recommended for

Automated summary

Detects the API specification type (OpenAPI, Swagger, GraphQL, AsyncAPI, Protobuf), validates it, then scaffolds the MDX documentation tree and the matching docs.json configuration.

Strengths

  • Recognizes five specification formats and applies the right processing to each
  • Checks syntax, $ref resolution, auth schemes and server URLs before generating anything
  • Produces a consistent file structure (introduction, authentication, errors) and wires the tab into docs.json
  • Explicitly splits queries, mutations and subscriptions into separate pages for GraphQL

Limitations

  • Assumes a Mintlify-style docs site built on docs.json and .mdx files
  • Generated pages are largely skeletons filled from spec fields rather than authored guides
  • The rate-limiting page is only created when the x-rateLimit extension is present in the spec
When to use it

Use it when you have an OpenAPI, GraphQL or AsyncAPI spec and need to bootstrap an API reference section in a documentation site quickly.

When not to use it

Avoid it if your docs site does not use docs.json and MDX, or if you need hand-written conceptual guides instead of pages derived from the spec.

Security analysis

Safe
Quality score78/100

The skill consists entirely of documentation and file-generation instructions (detecting spec types, validating schemas, laying out api-reference directories, updating docs.json, and emitting MDX templates). It declares no tools, invokes no shell/curl/network operations, does not read or transmit secrets, and contains no destructive or obfuscated actions. There is no meaningful execution risk in listing it.

No concerns found

How this analysis is made

Examples

Import an OpenAPI spec
Import api/openapi.yaml, generate the API reference docs including authentication and errors pages, and add the tab to docs.json.
Document a GraphQL schema
Add schema.graphql to our docs as a GraphQL API tab with separate queries, mutations and subscriptions pages.
Validate before scaffolding
Check asyncapi.yaml for $ref resolution issues and auth schemes, then scaffold the AsyncAPI documentation under api-reference/.

name: import-api-spec description: Import and configure API specification (OpenAPI, GraphQL, AsyncAPI) for documentation

Instructions

When importing an API specification:

Step 1: Detect Spec Type

| File Pattern | Type | Version | |--------------|------|---------| | openapi.json/yaml | OpenAPI | 3.x | | swagger.json/yaml | Swagger | 2.0 | | schema.graphql | GraphQL | - | | asyncapi.json/yaml | AsyncAPI | 2.x/3.x | | *.proto | Protobuf/gRPC | - |

Step 2: Validate & Process

  1. Validate spec syntax
  2. Check for $ref resolution issues
  3. Identify auth schemes
  4. Extract server URLs

Step 3: Generate Documentation

For OpenAPI/Swagger:

api-reference/
├── openapi.json          # Cleaned/validated spec
├── introduction.mdx      # API overview from info
├── authentication.mdx    # From securitySchemes
├── errors.mdx           # From error response schemas
└── rate-limiting.mdx    # If x-rateLimit extension exists

For GraphQL:

api-reference/
├── schema.graphql       # Schema file
├── introduction.mdx     # Overview
├── authentication.mdx   # Auth guide
├── queries.mdx          # Query documentation
├── mutations.mdx        # Mutation documentation
└── subscriptions.mdx    # If subscriptions exist

Step 4: Update docs.json

Add appropriate tab configuration:

// OpenAPI
{
  "tab": "API Reference",
  "type": "openapi",
  "path": "/api-reference",
  "spec": "api-reference/openapi.json",
  "groups": [
    {
      "group": "Overview",
      "pages": [
        "api-reference/introduction",
        "api-reference/authentication"
      ]
    }
  ]
}
// GraphQL
{
  "tab": "GraphQL API", 
  "type": "graphql",
  "path": "/graphql-api",
  "schema": "api-reference/schema.graphql",
  "endpoint": "https://api.example.com/graphql"
}

Step 5: Generate Supporting Pages

introduction.mdx

---
title: "API Introduction"
description: "Overview of the {API Name}"
---

{Description from spec info}

## Base URL

Production: `{server URL}`

## Authentication

{Summary of auth methods}

See [Authentication](/api-reference/authentication) for details.

authentication.mdx

---
title: "Authentication"
description: "How to authenticate API requests"
---

{Content based on securitySchemes}

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/import-api-specification-mmio721h/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/import-api-specification-mmio721h' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/import-api-specification-mmio721h/download' --output '.skill-downloads/import-api-specification-mmio721h/SKILL.md.part' && mv '.skill-downloads/import-api-specification-mmio721h/SKILL.md.part' '.skill-downloads/import-api-specification-mmio721h/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && test -s '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/import-api-spec' && cp -R '.skill-downloads/import-api-specification-mmio721h' '.claude/skills/import-api-spec'

Cursor
test -f '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && test -s '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/import-api-spec' && cp -R '.skill-downloads/import-api-specification-mmio721h' '.cursor/skills/import-api-spec'

Codex
test -f '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && test -s '.skill-downloads/import-api-specification-mmio721h/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/import-api-spec' && cp -R '.skill-downloads/import-api-specification-mmio721h' '.agents/skills/import-api-spec'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/import-api-specification-mmio721h'

openskills read 'import-api-specification-mmio721h'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/import-api-specification-mmio721h/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills