add-api-endpoint

Generate and implement API endpoints for Go microservices with Kratos.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/microservices-agent-skills --skill add-api-endpoint-vesviet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-api-endpoint
Source: https://github.com/vesviet/microservices-agent-skills/tree/main/skills/add-api-endpoint
Command: npx skills add https://github.com/vesviet/microservices-agent-skills --skill add-api-endpoint-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding new API endpoints (REST/gRPC) to Go microservices, ensuring adherence to established patterns and best practices.

Core Features & Use Cases

  • Standardized Endpoint Creation: Follows Kratos and Clean Architecture patterns for consistency.
  • Full-Stack Implementation Guidance: Covers proto definition, code generation, business logic, data layer, and DI setup.
  • Use Case: When a new feature requires a new CRUD operation or a custom business action, this skill guides you through creating the necessary API endpoint from definition to implementation.

Quick Start

Use the add-api-endpoint skill to add a new 'GetProduct' endpoint to the 'product-service'.

Frequently Asked Questions about add-api-endpoint

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

FAQPage Schema
How do I add a new API endpoint to a Go microservice using Kratos?

To add a new API endpoint to a Go microservice using Kratos, you define the proto file, generate code, implement business logic and data layers, configure dependency injection, and register server routes following Clean Architecture principles.

Does Kratos support generating both REST and gRPC endpoints simultaneously?

Yes, Kratos supports generating both REST and gRPC endpoints. The Skill guides you through proto definitions and code generation to implement HTTP methods and gRPC routes while ensuring consistent Clean Architecture layering.

What is the correct way to structure business logic when creating a new gRPC route in Go?

Structuring business logic for a new gRPC route in Go involves separating concerns into business logic and data layers. This approach adheres to Clean Architecture, ensuring your microservice dependencies are injected correctly and routes are registered properly.

How do I handle errors when implementing REST APIs in a Kratos microservice?

Handling errors when implementing REST APIs in a Kratos microservice requires adhering to Kratos error handling patterns. The Skill ensures generated endpoints follow HTTP method conventions and standard error responses across your Go microservices architecture.

Can I use this approach to add CRUD operations to an existing Go microservice?

Yes, you can use this approach to add CRUD operations to an existing Go microservice. The Skill guides you through the full-stack implementation from proto definition and code generation to data layer setup and dependency injection configuration.

What are the limitations of generating API endpoints with Kratos and Clean Architecture?

Limitations of generating API endpoints with Kratos include strict adherence to Clean Architecture patterns and proto definitions. Deviating from standard HTTP method conventions or Kratos error handling patterns may require manual adjustments outside the generated code structure.