echo
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Echo Go web framework assistance covering routing, middleware, data binding, and JSON validation. Use when developing high-performance, lightweight microservices in Go.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- simota/agent-skillstheir own version, first seen Oct 23, 2026
- CharTyr/Mai-Skill-Loadertheir own version, first seen Jun 25, 2026
- cwinvestments/memstacktheir own version, first seen Jun 22, 2026
- jasoncrawford/claude-skillstheir own version, first seen Apr 25, 2026
- vbrevik/claude_code_skillstheir own version, first seen Mar 14, 2026
- KailasMahavarkar/agentic-skillstheir own version, first seen Feb 24, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- cwinvestments/memstack★ 425same name
- simota/agent-skills★ 96same name
- CharTyr/Mai-Skill-Loader★ 4same name
- KailasMahavarkar/agentic-skills★ 2same name
- jasoncrawford/claude-skills★ 1same name
- jord0-cmd/jord0.skills★ 1same name
- vbrevik/claude_code_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 157
Create custom middleware and access via c.Get:
- Very specific: line 179
Use echo.Context.Request().Context() to propagate cancellation and deadlines to database operations.
- Very specific: line 186
Use standard log.Print in handlers.
- Very specific: line 187
Write to c.Response().Writer after returning an error from a handler.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Echo
Echo is a minimalist Go framework known for performance. v4 is stable and widely used for microservices.
When to Use
- High-Performance Go RESTful APIs: Developing low-latency web services and microservices with minimal allocation overhead.
- Microservices Requiring Middleware Pipelines: Utilizing built-in JWT authentication, CORS, rate limiting, and recover middleware.
- Robust Route Parameter Extraction & Binding: Automatically binding and validating JSON, XML, and form-data payloads.
- WebSocket & SSE Streaming Backends: Real-time push notification endpoints in Go.
Quick Start
package main
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
type User struct {
Name string `json:"name"`
Email string `json:"email"`
}
func main() {
e := echo.New()
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.GET("/api/health", func(c echo.Context) error {
return c.JSON(http.StatusOK, map[string]string{"status": "ok"})
})
e.Logger.Fatal(e.Start(":8080"))
}Core Concepts
Handler Registration & Parameter Extraction
Clean route grouping with context parameter extraction:
package main
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
type UserResponse struct {
ID string `json:"id"`
Username string `json:"username"`
}
func getUserHandler(c echo.Context) error {
id := c.Param("id")
queryFilter := c.QueryParam("include_details")
return c.JSON(http.StatusOK, UserResponse{
ID: id,
Username: "user_" + id + "_filter_" + queryFilter,
})
}
func main() {
e := echo.New()
e.Use(middleware.Logger())
e.Use(middleware.Recover())
api := e.Group("/api/v1")
api.GET("/users/:id", getUserHandler)
e.Logger.Fatal(e.Start(":8080"))
}Request Payload Binding & Validation
Validating incoming JSON payloads with go-playground validator:
package main
import (
"net/http"
"github.com/go-playground/validator/v10"
"github.com/labstack/echo/v4"
)
type CustomValidator struct {
validator *validator.Validate
}
func (cv *CustomValidator) Validate(i interface{}) error {
return cv.validator.Struct(i)
}
type CreateUserRequest struct {
Email string `json:"email" validate:"required,email"`
Age int `json:"age" validate:"gte=18,lte=120"`
}
func createUser(c echo.Context) error {
req := new(CreateUserRequest)
if err := c.Bind(req); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
}
if err := c.Validate(req); err != nil {
return echo.NewHTTPError(http.StatusUnprocessableEntity, err.Error())
}
return c.JSON(http.StatusCreated, req)
}Centralized Custom HTTP Error Handler
Uniform error responses conforming to RFC 7807:
func customHTTPErrorHandler(err error, c echo.Context) {
code := http.StatusInternalServerError
msg := "Internal Server Error"
if he, ok := err.(*echo.HTTPError); ok {
code = he.Code
msg = he.Message.(string)
}
if !c.Response().Committed {
_ = c.JSON(code, map[string]interface{}{
"error": true,
"code": code,
"detail": msg,
})
}
}Common Patterns
Custom Context and JWT Authentication Middleware
Problem: Extracting authenticated user identity into request context safely across handlers.
Solution:
Create custom middleware and access via c.Get:
func AuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
token := c.Request().Header.Get("Authorization")
if token != "Bearer valid-token" {
return echo.NewHTTPError(http.StatusUnauthorized, "Invalid token")
}
c.Set("userId", 42)
return next(c)
}
}
// In handler: userId := c.Get("userId").(int)Best Practices
Do:
- Attach
middleware.Recover()at the root router to prevent unhandled panics from crashing the HTTP server. - Use
echo.Context.Request().Context()to propagate cancellation and deadlines to database operations. - Configure timeouts (
ReadTimeout,WriteTimeout,IdleTimeout) on the underlyinghttp.Server. - Implement a custom validator and assign it to
e.Validator.
Don't:
- Store request-scoped data in global variables; store them in
c.Set(key, value). - Use standard
log.Printin handlers; usec.Logger()or structuredslog. - Write to
c.Response().Writerafter returning an error from a handler.
Troubleshooting
| Error | Cause | Solution |
code=400, message=Syntax error: unexpected end of JSON input | Empty request body passed to c.Bind(&struct). | Verify request body contains valid JSON before binding. |
http: superfluous response.WriteHeader call | Calling c.JSON() or c.String() twice in same handler flow. | Return immediately upon rendering response: return c.JSON(...). |
routing conflict: ... has conflicting route with ... | Overlapping route definitions with wildcard/param matchers. | Adjust route paths or separate route groups to remove parameter ambiguity. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

