go-hichat-api: Skill for Claude Code

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

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

A guided scaffold for creating a go-zero microservice, a small backend service built with the go-zero framework. It can set up RPC, HTTP API, model, WebSocket, message-queue, or scheduled-job layers.

In plain words
What is it for?
Use it to create a new service under apps/ with its interfaces, generated Go code, configuration sample, database models when needed, and startup registration.
Why use it?
It turns the project's service conventions into a repeatable starting structure. It first gathers the service requirements, then generates code and connects the service to the existing startup setup.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: names the AskUserQuestion tool.

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-service/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-service

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

agentmods 80×15 button for new-service

Your own site · 80×15
<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>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 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.00038 $0.00791
Opus 5 $0.00019 $0.00396
Sonnet 5 $0.00008 $0.00158
Haiku 4.5 $0.00004 $0.00079

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

Security

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.

.claude/skills/new-service/SKILL.md · 67 lines

What it actually says

按 go-hichat-api 的约定脚手架一个新微服务。不假设需求,先访谈再生成。

步骤

1. 访谈(用 AskUserQuestion,逐个问)

  • 服务名(小写单词,如 paymentnotify
  • 需要哪几层: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.shSERVICES=(...) 里加上:

"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
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 · 67 lines · 38 tokens per session scan A eb24a83b7329

Subscribe to this mod's changes

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.

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