go-hichat-api: Skill for Claude Code

.claude/skills/new-rpc/SKILL.md

new-rpc is a skill for Claude Code from iceymoss/go-hichat-api. It costs 32 tokens per session (575 once invoked), scanned A, original, Apache-2.0.

A procedure for adding a gRPC method to an existing go-zero service. gRPC is a way for applications to call typed methods across a network, and a protocol-buffer file defines the messages and methods shared by those applications.

In plain words
What is it for?
Use it to add a method, extend request or response messages, regenerate Go code, connect the client in another service, implement database-backed logic, and run unit or end-to-end tests.
Why use it?
It reduces compatibility mistakes when changing a service that other services already call. It also identifies the generated code, configuration, client wiring, business logic, and tests that must change together.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is iceymoss/go-hichat-api's own configuration. It tells Claude Code how to work on go-hichat-api itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything go-hichat-api configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/iceymoss/go-hichat-api/main/.claude/skills/new-rpc/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/iceymoss/go-hichat-api

Made for: Claude Code.

Wrote 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.

agentmods badge for new-rpc

README.md
[![agentmods](https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/new-rpc/github.svg)](https://agentmods.dev/skills/iceymoss/go-hichat-api/new-rpc)
Your own site
<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.

agentmods 80×15 button for new-rpc

Your own site · 80×15
<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>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 3e0a7d245b72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

.claude/skills/new-rpc/SKILL.md · 50 lines

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

5. 在调用方注入 client

被调服务的 <svc>client 已生成在 apps/<svc>/rpc/<svc>client/。在调用方:

  • 配置里加 XxxRpc zrpc.RpcClientConf
  • internal/svc/servicecontext.goXxxRpc: <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 是否引入意外破坏性变更
Changes

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.

  1. 10d ago First seen · 50 lines · 32 tokens per session scan A 3e0a7d245b72

Subscribe to this mod's changes

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.

Related

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.

samber/cc-skills-golang · 77 tokens

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…

samber/cc-skills-golang · 72 tokens

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…

Jeffallan/claude-skills · 95 tokens

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…

samber/cc-skills-golang · 146 tokens

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.

ardanlabs/service · 56 tokens

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…

mvanhorn/cli-printing-press · 86 tokens