Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

scalar-api-reference

БесплатноБез исполняемых скриптовНе проверен

Install, configure, and troubleshoot Scalar API Reference in an application, including framework integrations, API description loading, authentication…

scalarот scalar★ 16 482 звезды на GitHub

Об этом скилле

Scalar API Reference

Add interactive API documentation to an existing application with the integration that matches its framework. Scalar renders an API description; preserve the application's existing description generator and API routes.

Choose the integration

Inspect the application's framework, package versions, routing conventions, and existing API description endpoint. Determine whether the user needs a standalone documentation route or a component embedded in the application layout.

Read the relevant entry in framework integrations, then consult its linked guide for options specific to that integration. Use the project's package manager. Match the installed version's exports and types instead of assuming every wrapper accepts the same option names.

For a plain HTML page, this is a minimal setup. Serve an API description at /openapi.json and serve the page over HTTP:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>API Reference</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module">
      import { createApiReference } from 'https://cdn.jsdelivr.net/npm/@scalar/api-reference/esm.js'

      createApiReference('#app', { url: '/openapi.json' })
    </script>
  </body>
</html>

For bundler-based JavaScript, import createApiReference from @scalar/api-reference. For Vue and React components, include the integration's stylesheet as shown in Vue and React styles.

Framework integrations

Read only the guide for the application's framework. These are routing hints and minimal entry points, not a replacement for the installed package's API. The linked guides live under documentation/integrations/ in the Scalar repository when local sources are available.

Application Package Entry point and guide
HTML or vanilla JavaScript @scalar/api-reference createApiReference('#app', { url }); HTML/JS
Vue @scalar/api-reference ApiReference component with a configuration prop; Vue
React @scalar/api-reference-react ApiReferenceReact with a configuration prop; React
Next.js standalone route @scalar/nextjs-api-reference ApiReference returns a route handler; Next.js
Nuxt @scalar/nuxt Nuxt module with scalar configuration; Nuxt
Express @scalar/express-api-reference app.use('/reference', Scalar({ url })); Express
Fastify @scalar/fastify-api-reference Register plugin with routePrefix and nested configuration; Fastify
Hono @scalar/hono-api-reference app.get('/scalar', Scalar({ url })); Hono
NestJS @scalar/nestjs-api-reference apiReference({ content: document }) with existing SwaggerModule output; NestJS
FastAPI scalar-fastapi add_scalar_reference(app) or get_scalar_api_reference; FastAPI
ASP.NET Core Scalar.AspNetCore app.MapScalarApiReference() alongside an OpenAPI document endpoint; ASP.NET Core

For other frameworks, find the matching guide in the integration catalog. Do not substitute a similarly named package without checking its framework support.

Vue and React styles

Vue:

<script setup lang="ts">
import { ApiReference } from '@scalar/api-reference'
import '@scalar/api-reference/style.css'
</script>

<template>
  <ApiReference :configuration="{ url: '/openapi.json' }" />
</template>

React:

import { ApiReferenceReact } from '@scalar/api-reference-react'
import '@scalar/api-reference-react/style.css'

export const Reference = () => (
  <ApiReferenceReact configuration={{ url: '/openapi.json' }} />
)

Next.js: choose a route or a page

For a standalone HTML document, create app/scalar/route.ts (under src/ if the application uses it):

import { ApiReference } from '@scalar/nextjs-api-reference'

export const GET = ApiReference({ url: '/openapi.json' })

This does not inherit the application's layout or React providers. For an embedded page, use the React component in a Client Component with 'use client', imported by the page. Define bro

Полный SKILL.md на GitHub

Установить scalar-api-reference в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл scalar-api-reference?

Install, configure, and troubleshoot Scalar API Reference in an application, including framework integrations, API description loading, authentication, themes, and migration from Swagger UI or Redoc. Use for the embedded or self-hosted reference, rather than hosted Scalar Docs site configuration or standalone API Client development.

Как установить скилл scalar-api-reference?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл scalar-api-reference запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить scalar-api-reference с