spikard-http-routing

Generate type-safe Rust API handlers and middleware stacks from OpenAPI, GraphQL, and Protobuf specifications.

115|8|Updated Mar 30, 2025
One-click install
npx skills add https://github.com/Goldziher/spikard --skill spikard-http-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spikard-http-routing
Source: https://github.com/Goldziher/spikard/tree/main/.ai-rulez/domains/http-framework/skills/spikard-http-routing
Command: npx skills add https://github.com/Goldziher/spikard --skill spikard-http-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of type-safe API handlers and middleware stacks for web services, streamlining development and ensuring consistency across different languages.

Core Features & Use Cases

  • Code Generation: Generates handlers from specifications like OpenAPI, GraphQL, and Protobuf.
  • Middleware Integration: Provides a Tower-HTTP middleware stack for robust server functionality.
  • Lifecycle Hooks: Supports custom logic execution at various stages of the request/response cycle.
  • Use Case: Develop a new microservice by defining its API in OpenAPI, then use Spikard to generate the Rust server code, including handlers and essential middleware.

Quick Start

Use the spikard-http-routing skill to generate Python handlers from the attached OpenAPI specification file 'api.yaml'.

Frequently Asked Questions about spikard-http-routing

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

FAQPage Schema
How do I generate type-safe Rust web service handlers from an OpenAPI specification?

You can generate type-safe Rust web service handlers by providing an OpenAPI, GraphQL, or Protobuf specification to this Skill. It outputs the server code and integrates Tower-HTTP middleware to ensure robust runtime functionality.

Can I use GraphQL or Protobuf schemas for Rust API generation instead of OpenAPI?

Yes, this Skill supports API generation from GraphQL and Protobuf schemas in addition to OpenAPI. You can supply any of these specification formats to generate the corresponding type-safe Rust server handlers.

Does the generated Rust server code integrate with Tower-HTTP for middleware?

Yes, the generated Rust server code integrates with Tower-HTTP to provide a middleware stack. It also supports custom lifecycle hooks for executing logic at various stages of the request and response cycle.

What is the best way to automate microservice development using Rust and API generation?

To automate microservice development in Rust, define your API in a specification like OpenAPI, then use this Skill to generate the type-safe Rust server code. This includes handlers and essential middleware for immediate use.

How do I add custom logic to the request and response cycle in generated Rust handlers?

You can add custom logic to the request and response cycle by utilizing the Skill's lifecycle hooks. This feature supports custom logic execution at various stages of the request/response cycle within the generated Rust handlers.