lokstra-api-specification

Generate OpenAPI-style API specifications for Lokstra modules.

8|1|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/primadi/lokstra --skill lokstra-api-specification
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lokstra-api-specification
Source: https://github.com/primadi/lokstra/tree/main/.github/skills/design-lokstra-api-specification
Command: npx skills add https://github.com/primadi/lokstra --skill lokstra-api-specification

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of OpenAPI-style API specifications for Lokstra modules, turning design decisions into formal contracts for frontend and backend teams.

Core Features & Use Cases

  • Complete endpoint definitions with methods, paths, authentication, and RBAC mappings
  • Request/Response schemas, validation rules, and standardized error codes
  • Lokstra integration guidance including @Handler, @Route, and @Inject mappings to enable code generation

Quick Start

Use this skill to generate the API specification for a Lokstra module once its requirements are approved and the module design is finalized.

Frequently Asked Questions about lokstra-api-specification

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

FAQPage Schema
How do I generate OpenAPI specifications for multi-tenant API modules?

To generate OpenAPI specifications for multi-tenant modules, you define endpoint paths, request/response schemas, and validation rules, which are then mapped to framework-specific handlers. This process enforces multi-tenant isolation and produces documentation-ready contracts for frontend and backend teams.

What's the best way to define API validation rules and error codes for Lokstra modules?

The best way to define API validation rules and error codes is by generating a formal OpenAPI-style specification. This standardizes request/response schemas and error handling, turning approved module designs into clear contracts that enable automated code generation.

When do I need an OpenAPI specification for my API module design?

You need an OpenAPI specification when your module requirements are approved and the design is finalized. It transforms design decisions into formal contracts with clear validation rules, RBAC mappings, and standardized error codes for frontend and backend integration.

Can I map OpenAPI endpoint definitions directly to Lokstra route handlers?

Yes, endpoint definitions can be mapped directly to Lokstra route handlers. The specification includes integration guidance for @Handler, @Route, and @Inject mappings, ensuring the generated OpenAPI documentation is suitable for direct code generation.

How does multi-tenant isolation work in generated API specifications?

Multi-tenant isolation is enforced within the API specification by defining strict endpoint boundaries, authentication rules, and RBAC mappings. This ensures the generated OpenAPI contracts maintain data separation across tenants for frontend and backend code generation.

Does the lokstra-api-specification skill handle standardized error codes and response schemas?

Yes, the lokstra-api-specification skill handles standardized error codes and response schemas. It creates complete endpoint definitions with validation rules, ensuring the resulting OpenAPI contracts are ready for documentation and automated code generation.