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-service/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-service)<a href="https://agentmods.dev/skills/iceymoss/go-hichat-api/new-service"><img src="https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/new-service/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-service"><img src="https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/new-service.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.00038 | $0.00791 |
| Opus 5 | $0.00019 | $0.00396 |
| Sonnet 5 | $0.00008 | $0.00158 |
| Haiku 4.5 | $0.00004 | $0.00079 |
Grade A, and why
new-service 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
按 go-hichat-api 的约定脚手架一个新微服务。不假设需求,先访谈再生成。
步骤
1. 访谈(用 AskUserQuestion,逐个问)
- 服务名(小写单词,如
payment、notify) - 需要哪几层:
rpc/api/ws/mq/cron(多选) - 主要数据存在哪里:MySQL / MongoDB / Redis / 多种
- 是否需要被其它服务通过 RPC 调用(决定要不要 .proto + etcd 注册)
- 对外暴露 HTTP 路径前缀(如
v1/<svc>)
2. 参考已有服务
读 apps/user/ 或 apps/trend/ 作为模板:
<svc>.proto/<svc>.api的写法etc/*-sample.yaml的字段internal/{config,handler,logic,svc,types}目录骨架
3. 创建文件骨架
按 go-zero 约定,用 goctl 生成,不要手写骨架:
# 1) 创建 .proto / .api
mkdir -p apps/<svc>/{rpc,api,models}
# 写 apps/<svc>/rpc/<svc>.proto 和 apps/<svc>/api/<svc>.api(参考同类服务)
# 2) 生成 RPC
cd apps/<svc>/rpc && goctl rpc protoc ./<svc>.proto --go_out=. --go-grpc_out=. --zrpc_out=.
# 3) 生成 API
cd apps/<svc>/api && goctl api go -api <svc>.api -dir . -style gozero
# 4) 生成 model(如有 SQL)
goctl model mysql ddl -src=./deploy/sql/<svc>.sql -dir=./apps/<svc>/models/ -c
4. 注册到启动脚本
在 hichat2.sh 的 SERVICES=(...) 里加上:
"rpc <svc>"
"api <svc>"
5. 写最小 sample yaml
apps/<svc>/rpc/etc/<svc>-sample.yaml(含 etcd 注册)apps/<svc>/api/etc/<svc>-sample.yaml(含 JWT 配置 + 上游 RPC 地址)- 参考其它服务,端口必须不冲突(grep 现有 yaml 找空闲端口)
6. 跨服务调用
如果该服务要调其它服务,按 .claude/rules/rpc-client.md 的方式注入对方 xxxclient,不要直连数据库。
7. 收尾
- 跑
go build ./...确认无编译错误 - 跑
./hichat2.sh确认服务起得来 - 提示用户去
/spec写第一个具体功能
严格约束
- 不要绕过 goctl 手写 handler / logic 骨架
- 不要直接读其它服务的数据库表
- 不要为了 demo 把端口写死成已有服务的端口
- 新增 schema 必须先与用户确认(
database-model.md)
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 · 67 lines · 38 tokens per session scan A eb24a83b7329
new-service is a skill published in the GitHub repository iceymoss/go-hichat-api (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 791 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…