encore-go-api

Generate Go API endpoints from Encore annotations with typed parameters and validation.

26|5|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/encoredev/skills --skill encore-go-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: encore-go-api
Source: https://github.com/encoredev/skills/tree/main/encore/go-api
Command: npx skills add https://github.com/encoredev/skills --skill encore-go-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers can rapidly expose secure, well-typed HTTP endpoints using Encore's API annotations, reducing boilerplate and mistakes.

Core Features & Use Cases

  • Annotation-driven endpoints: define API surfaces with //encore:api annotations to generate handlers and routing.
  • Parameter binding: map path, query, and header parameters to strongly typed Go structs.
  • Error handling & responses: follow standard patterns for success and error responses with documented error codes.
  • Examples & patterns: supports common endpoint patterns such as GET, POST with request bodies, and raw endpoints when needed.

Quick Start

Annotate a Go function with //encore:api and run the Encore tool to generate a working endpoint.

Frequently Asked Questions about encore-go-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create type-safe Go API endpoints without writing boilerplate?

You can create type-safe Go API endpoints by annotating functions with //encore:api annotations. This generates handlers and routing automatically, reducing manual boilerplate and parameter binding mistakes.

How does parameter binding work for Go HTTP endpoints using Encore annotations?

Parameter binding maps path, query, and header parameters directly to strongly typed Go structs. This Encore annotation mechanism enforces strict validation and structured error handling for your HTTP endpoints.

Can I handle POST request bodies and raw endpoints in Encore Go services?

Yes, Encore supports common API patterns including GET requests, POST requests with structured bodies, and raw endpoints. These are defined using the standard //encore:api annotation on your Go functions.

What is the best way to structure error handling and responses in Go APIs?

The best way to structure error handling in Go APIs is using Encore's standard patterns for success and error responses. This approach utilizes documented error codes and conventional response structures.

Do I need external dependencies to expose HTTP endpoints in Go with Encore?

No external dependencies are required to expose HTTP endpoints. The Encore framework uses annotations and conventional error codes to generate routing and handle strict parameter validation natively.

When should I use raw endpoints instead of standard API annotations in Go?

You should use raw endpoints when standard API annotations for structured request bodies and strict parameter binding do not fit your specific HTTP endpoint requirements in Go services.