Borrowing it
Nothing to install: this file belongs to iceymoss/go-hichat-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/iceymoss/go-hichat-api/main/.claude/skills/new-rpc/SKILL.mdgit clone --depth 1 https://github.com/iceymoss/go-hichat-apiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/iceymoss/go-hichat-api/new-rpc)<a href="https://agentmods.dev/skills/iceymoss/go-hichat-api/new-rpc"><img src="https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/new-rpc/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/iceymoss/go-hichat-api/new-rpc"><img src="https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/new-rpc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.00575 |
| Opus 5 | $0.00016 | $0.00287 |
| Sonnet 5 | $0.00006 | $0.00115 |
| Haiku 4.5 | $0.00003 | $0.00057 |
Grade A, and why
new-rpc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
在 apps/<svc>/rpc 里新增 gRPC 方法。
步骤
1. 确认输入
- 哪个服务
- 方法名(驼峰,如
GetUserByPhone) - 请求 / 响应消息字段
- 是否会被多个服务调用(影响以后的兼容性策略)
2. 修改 .proto
编辑 apps/<svc>/rpc/<svc>.proto:
- 新方法只能加在 service 末尾,不要插队(避免序号变动)
- 新字段在 message 末尾追加,并保留旧字段编号(向后兼容)
- 不要随意改字段编号或类型;废弃字段加
// deprecated,不要删
3. 重新生成
cd apps/<svc>/rpc && goctl rpc protoc ./<svc>.proto --go_out=. --go-grpc_out=. --zrpc_out=.
会生成 internal/logic/<xxx>logic.go 骨架。已存在的方法不会被覆盖。
4. 写 logic
internal/logic/<xxx>logic.go:
- DB 操作走
models/,优先 GORM(go-backend.md) - 原始 SQL 必须三库兼容(
database-model.md) - 错误用
pkg/xerr
5. 在调用方注入 client
被调服务的 <svc>client 已生成在 apps/<svc>/rpc/<svc>client/。在调用方:
- 配置里加
XxxRpc zrpc.RpcClientConf internal/svc/servicecontext.go里XxxRpc: <svc>.New<Svc>(zrpc.MustNewClient(c.XxxRpc))internal/config/config.go加字段
6. 测试
- RPC 单元测试:在
internal/logic/*_test.go用 table-driven - 集成:起 rpc + 调用方,跑端到端
严格约束
- proto 字段只追加,不重排不删除编号
- 废弃方法保留 stub,不要从 proto 直接删(外部可能仍在调)
- 重新生成 proto 后必须
git diff检查*_grpc.pb.go是否引入意外破坏性变更
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 50 lines · 32 tokens per session scan A 3e0a7d245b72
new-rpc is a skill published in the GitHub repository iceymoss/go-hichat-api (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 575 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
golang-graphql
Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports github.com/99designs/gqlgen or github.com/graph-gophers/graphql-go.
golang-grpc
Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or…
golang-pro
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…
golang-swagger
Golang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framework integrations (gin, echo, fiber, chi, net/http), security definitions (Bearer/JWT, OAuth2, API key), and struct tags (swaggertype, enums, example…
layered-architecture-types
Enforce primitive-at-edges / strong-types-in-Business layering and the toBus/fromBusResponse/toDB converter pattern. Use when writing, editing, or auditing Go files under app/, business/domain/, or .../stores/db.
printing-press
Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or Postman spec via the lean research -> generate -> build -> shipcheck loop. Use when the user says build a CLI, wrap this API, set up a new integration, add a connector, integrate with a…