content-negotiation

Community

Automatically negotiate API response formats

AuthorFaysilAlshareef
Version1.0.0
Installs0

System Documentation

What problem does it solve?

APIs often return the wrong content type or fail to support client preferences, causing integration friction and brittle clients; this skill ensures responses match client Accept headers and supported formatters for consistent interoperability.

Core Features & Use Cases

  • Respect Accept headers: Choose response format (JSON, XML, CSV, etc.) based on client preferences and registered formatters.
  • Consistent error reporting: Produce RFC-compliant application/problem+json responses via ProblemDetails middleware.
  • Extensible formatters: Add custom output formatters for CSV, PDF, or other export formats and map URL/query-based format selections.
  • Use Case: Enable an ASP.NET Core API to serve legacy XML consumers, modern JSON clients, and CSV exports for reporting while returning standardized ProblemDetails for errors.

Quick Start

Configure your API to register JSON and XML formatters, add ProblemDetails, and register any custom output formatter so endpoints respond correctly to Accept headers.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: content-negotiation
Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#content-negotiation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.