boost-factory-grpc
Use when constructing a gRPC client or server in a Go service via github.com/xgodev/boost/factory/contrib/google.golang.org/grpc/v1 (with subdirs client/ and server/). Covers the canonical shapes shipped under client/examples/examplesvc and server/examples/{examplesvc,examplesvcautotls}, including TLS-enabled server wiring. Triggers on imports under factory/contrib/google.golang.org/grpc/, on questions about gRPC client dial options, server interceptors, or autoTLS in a boost service.
Works with
---
name: boost-factory-grpc
description: Use when constructing a gRPC client or server in a Go service via github.com/xgodev/boost/factory/contrib/google.golang.org/grpc/v1 (with subdirs client/ and server/). Covers the canonical shapes shipped under client/examples/examplesvc and server/examples/{examplesvc,examplesvcautotls}, including TLS-enabled server wiring. Triggers on imports under factory/contrib/google.golang.org/grpc/, on questions about gRPC client dial options, server interceptors, or autoTLS in a boost service.
license: MIT
---
**REQUIRED BACKGROUND:** `boost-start`, `boost-wrapper-config`.
## Canonical examples (ship with boost)
- `factory/contrib/google.golang.org/grpc/v1/client/examples/examplesvc/` — minimal client wiring
- `factory/contrib/google.golang.org/grpc/v1/server/examples/examplesvc/` — minimal server wiring
- `factory/contrib/google.golang.org/grpc/v1/server/examples/examplesvcautotls/` — server with auto-TLS
Read `examplesvcautotls` before enabling TLS on a new service — it shows the certificate-manager wiring boost expects.
## Two halves
| Path | When |
|---|---|
| `factory/contrib/google.golang.org/grpc/v1/client/` | Outbound gRPC calls — dial options, interceptors |
| `factory/contrib/google.golang.org/grpc/v1/server/` | Inbound gRPC service — listener, interceptors, TLS |
Configure under `boost.factory.grpc.client.*` and `boost.factory.grpc.server.*` (override with the matching `BOOST_FACTORY_GRPC_*` envs).
## GCP-tuned variant
For talking to GCP gRPC APIs (Pub/Sub, BigQuery, Firestore), the cloud-google factories compose `factory/contrib/cloud.google.com/grpc/v1` internally. You normally don't import it directly — you configure its keys at the per-service factory's `apiOptions` / `grpcOptions` namespace.
## Error → gRPC code (and custom errors)
The server converts errors to gRPC status via `server.Error(err)`, which resolves
the code through `model/errors.Classify` (`NotFound`→`codes.NotFound`,
`NotValid`/`BadRequest`→`InvalidArgument`, `Conflict`/`AlreadyExists`→
`AlreadyExists`, `Unauthorized`→`Unauthenticated`, `Forbidden`→`PermissionDenied`,
`ServiceUnavailable`→`Unavailable`, `NotImplemented`→`Unimplemented`,
`TooManyRequests`→`ResourceExhausted`, `Timeout`→`DeadlineExceeded`, else
`Internal`). To map an app-specific error to a code (or ignore it → returns
`nil`/OK), register it at boot — see `boost-model-errors`
(`Register`/`RegisterMatch`/`Ignore`). Don't edit `server.Error` by hand.
## Red flags
| Red flag | Fix |
|---|---|
| `grpc.Dial(...)` with hand-built dial options | Use the client factory so config + interceptors are wired |
| `grpc.NewServer()` without going through the server factory | Use the server factory so default interceptors (recovery, logging, tracing) are installed |
| TLS config hand-rolled instead of mirroring `examplesvcautotls` | Mirror the example shape — cert lifecycle is easy to get wrong |
| Forgetting `defer conn.Close()` (client) or `srv.GracefulStop()` (server) | Add them |More API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

