zero-skills

Generate go-zero microservices code following Handler, Logic, and Model architecture.

82|13|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/zeromicro/zero-skills --skill zero-skills-zeromicro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zero-skills
Source: https://github.com/zeromicro/zero-skills/tree/main
Command: npx skills add https://github.com/zeromicro/zero-skills --skill zero-skills-zeromicro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and skill-patterns (resource) and troubleshooting (resource) and best-practices (resource) and examples (resource) and getting-started (resource) components.

What problem does it solve?

This Skill provides comprehensive knowledge and patterns for the go-zero microservices framework, enabling AI agents to generate production-ready code efficiently and troubleshoot issues effectively.

Core Features & Use Cases

  • Code Generation: Generate accurate go-zero code following framework conventions.
  • Architecture Guidance: Understand and apply the Handler → Logic → Model architecture.
  • Best Practices: Implement microservices development best practices.
  • Troubleshooting: Resolve common go-zero issues and understand framework conventions.
  • Use Case: A developer needs to create a new REST API service using go-zero. They can ask the AI to generate the .api file, provide guidance on implementing the Handler, Logic, and Model layers, and ensure proper error handling and configuration.

Quick Start

Use the zero-skills skill to generate a new go-zero REST API service for user management.

Frequently Asked Questions about zero-skills

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

FAQPage Schema
How do I generate a go-zero REST API service for user management?

To generate a go-zero REST API service, define your endpoints in an `.api` file and use the framework's code generation to scaffold the Handler, Logic, and Model layers. This ensures proper architectural conventions, error handling, and configuration for user management features.

What is the Handler → Logic → Model architecture in go-zero microservices?

The go-zero architecture separates concerns: Handlers process HTTP requests, Logic contains business logic, and Models manage database operations. This structured pattern ensures maintainable microservices by isolating request handling, core logic, and data access layers.

How do I implement resilience patterns and error handling in go-zero RPC services?

Implementing resilience patterns in go-zero RPC services involves using built-in framework conventions for error handling and circuit breaking. The framework provides structured patterns to manage failures gracefully, ensuring robust communication between microservices.

Can I use AI to help troubleshoot common go-zero framework issues?

Yes, AI can troubleshoot common go-zero issues by leveraging a comprehensive knowledge base of framework conventions and structured troubleshooting patterns. This helps quickly resolve errors in REST APIs, RPC services, and database operations.

What are the best practices for go-zero microservices code generation?

Best practices for go-zero code generation include strictly following the framework's architectural patterns, properly defining API files, and applying structured guidance for REST APIs and RPC services to ensure production-ready and maintainable code.

Does go-zero support database operations and model generation out of the box?

Yes, go-zero supports database operations by generating Model layer code that handles data access. The framework provides structured patterns to integrate database operations seamlessly within the Handler → Logic → Model architecture.