with one click
new-rpc
在已有 go-zero 服务里新增一个 RPC 方法。当用户说加 rpc 方法、新增 grpc、新加 proto 接口时触发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
在已有 go-zero 服务里新增一个 RPC 方法。当用户说加 rpc 方法、新增 grpc、新加 proto 接口时触发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
给 web/ 前端组件接入多语言(中英)。当用户说加多语言、国际化、i18n、翻译、某页面没翻译、硬编码中文时触发。
恢复上下文。在 /clear 后或新 session 开始时使用。当用户说恢复上下文、继续之前的工作、catchup 时触发。
审查当前 git diff 中的 Go 代码。当用户说审查 Go 代码、review Go、检查代码时触发。
运行 Go 测试并分析结果。当用户说跑测试、运行测试、go test 时触发。
在已有 go-zero 服务里新增一个 HTTP 接口。当用户说加接口、新增 api、加路由时触发。
新增数据库模型/表。当用户说加表、新增 model、加数据库字段时触发。
| name | new-rpc |
| description | 在已有 go-zero 服务里新增一个 RPC 方法。当用户说加 rpc 方法、新增 grpc、新加 proto 接口时触发。 |
在 apps/<svc>/rpc 里新增 gRPC 方法。
GetUserByPhone).proto编辑 apps/<svc>/rpc/<svc>.proto:
// deprecated,不要删cd apps/<svc>/rpc && goctl rpc protoc ./<svc>.proto --go_out=. --go-grpc_out=. --zrpc_out=.
会生成 internal/logic/<xxx>logic.go 骨架。已存在的方法不会被覆盖。
internal/logic/<xxx>logic.go:
models/,优先 GORM(go-backend.md)database-model.md)pkg/xerr被调服务的 <svc>client 已生成在 apps/<svc>/rpc/<svc>client/。在调用方:
XxxRpc zrpc.RpcClientConfinternal/svc/servicecontext.go 里 XxxRpc: <svc>.New<Svc>(zrpc.MustNewClient(c.XxxRpc))internal/config/config.go 加字段internal/logic/*_test.go 用 table-drivengit diff 检查 *_grpc.pb.go 是否引入意外破坏性变更