From go-backend-skills
External service client patterns for Go — HTTP client construction, generated clients, auth plumbing, and efficiency. Use when writing or reviewing code that integrates a third-party API or adds a new external service dependency.
How this skill is triggered — by the user, by Claude, or both
Slash command
/go-backend-skills:clientsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rules for building and using HTTP clients that talk to third-party services.
Rules for building and using HTTP clients that talk to third-party services.
| Rule | Do | Don't |
|---|---|---|
| HTTP client | Accept *http.Client in constructor; caller controls timeout/transport | Use http.DefaultClient — no timeout, blocks indefinitely |
| Generated clients | Prefer oapi-codegen from OpenAPI spec when one exists | Hand-roll HTTP calls for documented APIs |
| One client per package | Single client type with consistent auth pattern | Two parallel clients (generated + hand-rolled) in same package |
| Dead code | If a bridge/adapter exists but nothing calls it, wire it or delete it | Leave dead integration code "for later" |
| Rule | Do | Don't |
|---|---|---|
| Auth headers | Single pattern per package — RequestEditorFn, transport wrapper, or explicit param | Copy-paste auth/tenant/user-agent headers in every method |
| Shared auth client | Auth and service methods use the same injected *http.Client | Auth path on http.DefaultClient while service path uses injected client |
| Rule | Do | Don't |
|---|---|---|
| Repeated lookups | Resolve shared data once upstream, pass resolved values to methods | Call ListRoles per invite when inviting N users |
| Common headers | Extract buildRequest or use RequestEditorFn for shared headers | Copy-paste 4 req.Header.Set lines in every method |
oapi-codegen, filter to needed operations via config.baseURL string, client *http.Client at minimum.make generate target if using codegen.npx claudepluginhub klaidliadon/skillsSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.