scalar

Generates browsable HTML documentation for .NET 10 APIs and handles customizable routing and theming options.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill scalar-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scalar
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/scalar
Command: npx skills add https://github.com/Resgrid/Core --skill scalar-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scalar provides a modern, interactive API documentation UI for .NET 10 that reduces friction for developers testing and understanding OpenAPI endpoints.

Core Features & Use Cases

  • Scalar replaces Swagger UI: Generates fast, modern API docs with dark mode, code samples, and full OpenAPI 3.1 support, improving how teams present and consume APIs.
  • Development-first exposure: Recommends guarding API reference endpoints with IsDevelopment and adding authorization for production to reduce information leakage.
  • Secure and configurable “Try It”: Lets you disable the external proxy for sensitive APIs and align Scalar behavior with OpenAPI-defined security schemes, including auth prefill for development.
  • Multiple documents and routing: Supports multiple OpenAPI docs and configurable route prefixes so teams can publish versioned or separate API references cleanly.

Quick Start

Use the Scalar skill by mapping the OpenAPI endpoints and enabling Scalar only when app.Environment.IsDevelopment() so the API docs UI is available at /scalar/v1 during local development.

Frequently Asked Questions about scalar

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

FAQPage Schema
How do I replace Swagger UI with modern API documentation in ASP.NET Core?

You can replace Swagger UI by mapping OpenAPI endpoints and adding MapScalarApiReference to generate interactive API docs with dark mode, code samples, and full OpenAPI 3.1 support for .NET 10.

How do I secure interactive API docs so they are only available during development?

Secure interactive API docs by guarding the MapScalarApiReference endpoint with app.Environment.IsDevelopment() and adding authorization for production to prevent sensitive OpenAPI information leakage.

Can I configure multiple OpenAPI documents with custom route prefixes in Scalar?

Yes, Scalar supports configuring multiple OpenAPI documents with custom route prefixes, enabling teams to publish versioned or separate interactive API references cleanly using MapScalarApiReference alongside MapOpenApi.

How does authentication work with the Try It feature in Scalar API documentation?

Scalar's Try It feature relies on OpenAPI-defined security schemes rather than direct configuration, aligning auth behavior and enabling credential prefill for development while optionally disabling the external proxy via WithProxy(null).

Does Scalar work with .NET 10 OpenAPI services without extra dependencies?

Scalar works with .NET 10 OpenAPI services by using MapScalarApiReference with MapOpenApi, requiring no additional dependencies beyond the standard ASP.NET Core OpenAPI setup.

What are the limitations of using Scalar for API documentation in production environments?

In production, Scalar's API reference endpoints should be guarded with authorization because exposing interactive API docs risks information leakage, and the external proxy should be disabled via WithProxy(null) for sensitive APIs.