Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design, build, test, and review production Go HTTP servers covering inbound adapters, modern ServeMux routing, middleware, strict bounded request decoding, response commitment, transparent ResponseWriter wrapping, server timeouts, health semantics, graceful shutdown, shared-state safety, and httptest verification. Use when implementing an HTTP service, API handler, middleware stack, server lifecycle, health endpoint, or inbound JSON boundary in Go.
.claude/skills/hashgraph-online-go-http-server-applications/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✓→✓ | = Same ✓ | 26% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 8% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 2% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -1% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 19% | 0% |
Keep handlers thin, bound untrusted input, configure the server explicitly, and make startup and shutdown part of the tested application contract.
| Task | Load | |---|---| | Build a server | guidelines.md, workflows/build-http-server.md | | Test handlers or lifecycle | workflows/test-http-server.md | | Review routing, middleware, JSON, or shutdown | references/http-server/rules.md | | Understand server and writer contracts | references/http-server/knowledge.md | | Review patterns | references/http-server/examples.md |
http.DefaultServeMux for application composition.ResponseWriter preserves optional capabilities.Guidance is transformed and paraphrased from Inanc Gumus, Go by Example: Programmer's Guide to Idiomatic and Testable Programs (Manning, 2025), Chapters 8-9. Examples are original.
Terminal-response control-flow and timeout guidance also incorporates transformed material from Teiva Harsanyi, 100 Go Mistakes and How to Avoid Them (Manning, 2022), Chapter 10.
Book: https://www.manning.com/books/go-by-example
Verify current routing and lifecycle behavior against https://pkg.go.dev/net/http and https://pkg.go.dev/net/http/httptest for the pinned Go version.
Other measured skills in the registry, with their headline benchmark lift.