Encore Go Api
Typed Encore Go endpoint definitions with path, query, header, and cookie params and error returns.
- CCM score
- 69 of 100
- skills.sh installs
- 630
- GitHub stars
- 31
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers typed request and response structs,
//encore:apioptions (method, path, public, private, auth, sensitive), and mapping of params from path, query, headers, and cookies - Includes status codes via the
encore:"httpstatus"tag, redaction of sensitive fields, anderrscodes such as NotFound, InvalidArgument, and PermissionDenied - Guides request params as a pointer to a struct and error as the final return value, with raw endpoints and webhooks deferred to
encore-go-webhook - Designed for Go services that expose typed JSON REST handlers and need request validation and HTTP error mapping
Install
$ npx -y skills add encoredev/skills --skill encore-go-api -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Encore Go API Endpoints
Instructions
When creating API endpoints with Encore Go, follow these patterns:
1. Basic API Endpoint
Use the //encore:api annotation above your function:
package user
import "context"
type GetUserParams struct {
ID string
}
type User struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
}
//encore:api public method=GET path=/users/:id
func GetUser(ctx context.Context, params *GetUserParams) (*User, error) {
// Implementation
return &User{ID: params.ID, Email: "user@example.com", Name: "John"}, nil
}
2. POST with Request Body
type CreateUserParams struct {
Email string `json:"email"`
Name string `json:"name"`
}
//encore:api public method=POST path=/users
func CreateUser(ctx context.Context, params *CreateUserParams) (*User, error) {
// Implementation
return &User{ID: "new-id", Email: params.Email, Name: params.Name}, nil
}
API Annotation Options
Details
- Repository
- github.com/encoredev/skills
- Categories
- Go, Backend & APIs
- First seen
- Jun 3, 2026
Questions
What does the encore-go-api skill do?
encore-go-api teaches an agent to define typed API endpoints in Encore Go using the //encore:api annotation. It covers typed request and response structs, path, query, header and cookie parameters, and error returns.
How do I install the encore-go-api skill?
Run npx -y skills add encoredev/skills --skill encore-go-api -y in your project. After that, encore-go-api lets the agent write Encore Go endpoints with typed request and response structs.
Where does encore-go-api rank in the Go category on Claude Marketplaces?
encore-go-api ranks in the top 100 of the Go category on Claude Marketplaces. Its neighbors in that category include golang-code-style, golang-testing and golang-error-handling, but encore-go-api focuses on Encore endpoints specifically.
Should I use encore-go-api for webhooks?
No, encore-go-api is for typed endpoints, not raw endpoints. For raw endpoints and inbound webhooks, encore-go-api points you to the separate encore-go-webhook skill.
Can encore-go-api handle authentication and sensitive data?
Yes, encore-go-api covers the auth option in the //encore:api annotation and the sensitive option, which redacts request and response payloads from traces. It also shows how to return custom HTTP status codes and standard errs error codes such as NotFound.
More from encoredev/skills
All 16Similar to Encore Go Api
More Goencore-apiencoredev/skills912 installsTyped Encore.ts endpoint definitions with request validation, typed params, and APIError responses.
encore-go-authencoredev/skills632 installsAuthentication and authorization for Encore Go endpoints via a single //encore:authhandler that validates callers.
go-api-developmentmindrally/skills773 installsGo API design guidance built on the standard library's net/http and Go 1.22+ ServeMux routing.
api-developmentmindrally/skills891 installsGuidelines for building APIs with Go's standard library and NestJS, covering validation, security, and modules.
golang-swaggersamber/cc-skills-golang39.8K installsGo API documentation toolkit for swaggo/swag covering annotations, code generation, and framework wiring.
api-endpoint-scaffolderonewave-ai/claude-skills329 installsREST endpoint scaffolding with Zod validation, typed errors, and status-code conventions for Next.js and Express.