zero-skills
БесплатноБез исполняемых скриптовНе проверенUse when building, reviewing, or troubleshooting go-zero services, including REST and RPC code generation, middleware, service discovery, database models…
от zeromicro★ 94 звезды на GitHubОб этом скилле
go-zero Skills for AI Agents
This skill provides comprehensive go-zero microservices framework knowledge, optimized for AI agents helping developers build production-ready services. It covers REST APIs, RPC services, database operations, resilience patterns, high-performance data structures, and troubleshooting.
🎯 When to Use This Skill
Invoke this skill when working with go-zero:
- Creating services: REST APIs, gRPC services, or microservices architectures
- Database integration: SQL, MongoDB, Redis, or connection pooling
- Data structures: LRU Cache, Ring Buffer, TimingWheel, or concurrent maps
- Production hardening: Circuit breakers, rate limiting, or error handling
- Debugging: Understanding errors, fixing configuration, or resolving issues
- Learning: Understanding go-zero patterns and best practices
📚 Knowledge Structure
This skill organizes go-zero knowledge into focused modules. Load specific guides as needed rather than reading everything at once:
Quick Start Guide
Link: Official go-zero Documentation Contains: Installation, first API service, basic commands, hello-world examples (refer to official docs)
Pattern Guides (Detailed Reference)
1. REST API Patterns
File: references/rest-api-patterns.md When to load: Creating HTTP endpoints, implementing CRUD operations, adding middleware Contains:
- Handler → Logic → Context three-layer architecture
- Request/response handling with proper types
- Middleware (auth, logging, metrics, CORS)
- Error handling with
httpx.Error()andhttpx.OkJson() - Complete CRUD examples with ✅ correct vs ❌ incorrect patterns
2. RPC Service Patterns
File: references/rpc-patterns.md When to load: Building gRPC services, service-to-service communication Contains:
- Protocol Buffers definition and code generation
- Service discovery with etcd/consul/kubernetes
- Load balancing strategies
- Client configuration and interceptors
- Error handling in RPC contexts
3. Database Patterns
File: references/database-patterns.md When to load: Implementing data persistence, caching, or complex queries Contains:
- SQL operations with sqlx (CRUD, transactions, batch inserts)
- MongoDB integration patterns
- Redis caching strategies and cache-aside pattern
- Model generation with
goctl model - Connection pooling and performance tuning
4. Resilience Patterns
File: references/resilience-patterns.md When to load: Production hardening, handling failures, managing system load Contains:
- Circuit breaker configuration (Breaker)
- Rate limiting and API throttling
- Load shedding under pressure
- Timeout and retry strategies
- Graceful shutdown and degradation
5. Collection Patterns
File: references/collection-patterns.md When to load: Using high-performance data structures, local caching, timeout management Contains:
- LRU Cache for local hot data caching (O(1) operations)
- Ring Buffer for fixed-size circular buffers
- TimingWheel for efficient timer management (O(1) add/remove/execute)
- SafeMap for concurrent-safe map operations
- Memory management best practices and pitfalls
6. goctl Command Reference
File: references/goctl-commands.md When to load: Generating code with goctl, setting up new services, post-generation steps Contains:
- goctl installation and detection
- API/RPC/Model generation commands with exact flags
- Post-generation pipeline (mod tidy, import fixing, build verification)
- Config templates (API, RPC, production)
- Deployment templates (Dockerfile, Kubernetes, Docker Compose)
- Middleware and error handler templates
- API spec patterns (CRUD, JWT, mixed auth)
7. Swagger / OpenAPI Documentation
File: references/swagger-patterns.md
When to load: Generating Swagger/OpenAPI docs from .api files, adding API documentation annotations
Contains:
- Built-in
goctl api swaggercommand reference (goctl ≥ 1.8.4, no plugin needed) infoblock metadata: title, description, host, basePath, schemes, useDefinitions, wrapCodeMsg@servertags for Swagger UI grouping@docfor endpoint summary/description- Field tags:
example,options(enum),range,default,optional - Security definitions (
securityDefinitionsFromJson+authType) - Business error codes (
bizCodeEnumDescription) - Complete multi-file
.apistructure example with best practices
8. Distributed Transaction Patterns
File: references/distributed-transactions.md When to load: Cross-service data consistency, DTM integration, SAGA/TCC patterns Contains:
- Pattern-selection guidance for
Установить zero-skills в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobВложенные файлы
FAQ
Что делает скилл zero-skills?
Use when building, reviewing, or troubleshooting go-zero services, including REST and RPC code generation, middleware, service discovery, database models, collection data structures, resilience, observability, distributed transactions, and message queues. Trigger for goctl, .api or .proto files, or projects importing github.com/zeromicro/go-zero.
Как установить скилл zero-skills?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл zero-skills запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic