English | 简体中文
This is an Agent Skill containing structured knowledge and patterns for AI coding assistants to help developers work effectively with the go-zero framework.
Skills are folders of instructions, scripts, and resources that AI agents discover and load dynamically to perform better at specific tasks. This skill teaches AI agents how to generate production-ready go-zero microservices code.
This skill enables AI agents (Claude, GitHub Copilot, Cursor, etc.) to:
- Generate accurate go-zero code following framework conventions
- Understand the three-layer architecture (Handler → Logic → Model)
- Apply best practices for microservices development
- Troubleshoot common issues efficiently
- Build production-ready applications
Just ask your AI agent:
Install zero-skills from https://github.com/zeromicro/zero-skills
Or manually:
# Project-level (recommended)
git clone https://github.com/zeromicro/zero-skills.git .claude/skills/zero-skills
# Personal-level (all projects)
git clone https://github.com/zeromicro/zero-skills.git ~/.claude/skills/zero-skillsFollowing the Agent Skills Spec and Claude Code skills documentation:
zero-skills/
├── SKILL.md # Entry point with YAML frontmatter
├── getting-started/ # Getting started guides
│ ├── README.md # Tool comparison overview
│ ├── claude-code-guide.md # Claude Code (recommended)
│ ├── cursor-guide.md # Cursor IDE
│ ├── copilot-guide.md # GitHub Copilot
│ └── windsurf-guide.md # Windsurf IDE
├── references/ # Detailed pattern documentation
│ ├── rest-api-patterns.md # REST API development patterns
│ ├── rpc-patterns.md # gRPC service patterns
│ ├── database-patterns.md # Database operations
│ └── resilience-patterns.md # Resilience and fault tolerance
├── best-practices/ # Production recommendations
├── troubleshooting/ # Common issues and solutions
├── skill-patterns/ # Advanced skill examples (templates)
│ ├── analyze-project.md # Explore agent example
│ ├── generate-service.md # Argument passing example
│ └── plan-architecture.md # Plan agent example
└── examples/ # Demo projects and verification
Claude Code natively supports the Agent Skills specification. This skill is optimized for Claude Code with advanced features:
Add zero-skills to your project for automatic discovery:
# Add as git submodule
git submodule add https://github.com/zeromicro/zero-skills.git .claude/skills/zero-skills
# Or clone directly
git clone https://github.com/zeromicro/zero-skills.git .claude/skills/zero-skillsClaude Code automatically discovers skills in .claude/skills/ directories.
To use across all your projects, install to your personal skills directory:
## Clone to personal skills directory
git clone https://github.com/zeromicro/zero-skills.git ~/.claude/skills/zero-skills- Automatic: Claude loads the skill when you work with go-zero files (
.api,.proto,go.modwith go-zero) - Manual: Type
/zero-skillsto invoke directly for go-zero guidance - With arguments:
/zero-skills Create a user management APIfor specific tasks - Check availability: Ask "What skills are available?" to see if it's loaded
- Dynamic context: Skills can execute shell commands to gather live project data
- Subagents: Use
context: forkfor isolated analysis or planning tasks - Tool restrictions:
allowed-toolsensures safe, read-only operations - See skill-patterns/ for advanced patterns and templates
Add to claude_desktop_config.json:
{
"mcpServers": {
"zero-skills": {
"command": "node",
"args": ["/path/to/skill-server.js", "/path/to/zero-skills"]
}
}
}See copilot-guide.md for detailed setup. Quick start:
git clone https://github.com/zeromicro/zero-skills.git .ai-context/zero-skillsThen create .github/copilot-instructions.md referencing the patterns.
See cursor-guide.md for detailed setup. Quick start:
git clone https://github.com/zeromicro/zero-skills.git .ai-context/zero-skillsThen create .cursorrules referencing the patterns.
See windsurf-guide.md for detailed setup. Quick start:
git clone https://github.com/zeromicro/zero-skills.git .ai-context/zero-skillsThen create .windsurfrules referencing the patterns.
zero-skills is part of a three-tool ecosystem for AI-assisted go-zero development:
| Tool | Purpose | Size | Best For |
|---|---|---|---|
| ai-context | Workflow instructions and decision trees | ~5KB | GitHub Copilot, Cursor, Windsurf |
| zero-skills (this repo) | Comprehensive knowledge base | ~40KB | Claude Code, deep learning, reference |
| mcp-zero | Runtime tools (execute goctl commands) | MCP Server | Claude Desktop/Code for code generation |
┌─────────────────────────────────────────────────────────────┐
│ AI Assistant │
│ (Claude Code, GitHub Copilot, Cursor, etc.) │
└────────────┬─────────────────────┬──────────────────────────┘
│ │
├─ Workflow Layer ────┤
│ ai-context │ "What to do" - Quick decisions
│ (~5KB) │ Loaded for every interaction
│ │
├─ Knowledge Layer ───┤
│ zero-skills │ "How & Why" - Detailed patterns
│ (~40KB) │ Loaded when needed
│ │
└─ Execution Layer ───┘
mcp-zero "Do it" - Run goctl commands
(MCP Server) Generate actual code files
Scenario 1: GitHub Copilot User
- Uses:
ai-context(loaded via.github/copilot-instructions.md) - Benefits: Quick inline suggestions, workflow guidance
- Limitation: No code execution, manual goctl commands
Scenario 2: Claude Code User (Best Experience)
- Uses:
zero-skills(this repo) +mcp-zerotools - Benefits:
- Deep knowledge from pattern guides
- Automatic code generation via goctl
- Dynamic context with live project data
- Subagent workflows for complex tasks
- Invocation:
/zero-skillsor automatic when working with go-zero
Scenario 3: Cursor/Windsurf User
- Uses:
ai-context(in project rules) + links tozero-skills - Benefits: IDE-native experience with go-zero guidance
See Getting Started Guides for detailed integration instructions for each tool.
Skill Documentation:
- 📖 SKILL.md - Main skill entry point and navigation
- 📚 go-zero Quick Start - Official go-zero framework tutorial
- 🎯 Advanced Examples - Subagents, dynamic context, etc.
Getting Started Guides:
- 💡 Claude Code - Full features, subagents (recommended)
- 🖱️ Cursor - IDE integration with .cursorrules
- 🤖 GitHub Copilot - VS Code inline suggestions
- 🏄 Windsurf - Cascade AI integration
- 📋 Tool Comparison - Compare all tools
Contributions are welcome! Please ensure:
- Examples are complete and tested
- Patterns follow official go-zero conventions
- Content is structured for AI consumption
- Include both correct (✅) and incorrect (❌) examples
- Follow the Agent Skills specification
MIT License - Same as go-zero framework