Install any skill in seconds. Free to start, no credit card required.
Get Started Free →You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.
.claude/skills/terminalskills-chi/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 219% | 0% |
| case-20 | ✓→✗ | ▼ Worse | 112% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 3% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 61% | 0% |
You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on net/http. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.
gopackage main import ( "encoding/json" "net/http" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/cors" ) func main() { r := chi.NewRouter() // Built-in middleware r.Use(middleware.Logger) r.Use(middleware.Recoverer) r.Use(middleware.RequestID) r.Use(middleware.RealIP) r.Use(middleware.Timeout(30 * time.Second)) r.Use(cors.Handler(cors.Options{ AllowedOrigins: []string{"https://app.example.com"}, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, })) // Public routes r.Get("/health", func(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(map[string]string{"status": "ok"}) }) // Protected routes r.Route("/api", func(r chi.Router) { r.Use(authMiddleware) r.Route("/users", func(r chi.Router) { r.Get("/", listUsers) r.Post("/", createUser) r.Route("/{userID}", func(r chi.Router) { r.Use(userCtx) // Load user into context r.Get("/", getUser) r.Put("/", updateUser) r.Delete("/", deleteUser) r.Get("/posts", getUserPosts) }) }) }) http.ListenAndServe(":3000", r) } // Context middleware — load resource once, use in all sub-routes func userCtx(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { userID := chi.URLParam(r, "userID") user, err := db.FindUser(userID) if err != nil { http.Error(w, "user not found", 404) return } ctx := context.WithValue(r.Context(), "user", user) next.ServeHTTP(w, r.WithContext(ctx)) }) } func getUser(w http.ResponseWriter, r *http.Request) { user := r.Context().Value("user").(*User) json.NewEncoder(w).Encode(user) } func listUsers(w http.ResponseWriter, r *http.Request) { page := r.URL.Query().Get("page") users, _ := db.ListUsers(page) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(users) }
bashgo get -u github.com/go-chi/chi/v5
http.HandlerFunc; use any net/http middleware without adaptersr.Route("/prefix", func(r chi.Router) {...}) for scoped middleware and routescontext.WithValue; DRY across sub-routeschi.URLParam(r, "id") to extract route parameters; type-safe, explicitr.Mount("/admin", adminRouter()); clean separationmiddleware.Timeout to prevent slow handlers from blocking; returns 504 on timeout| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,277 | 15,372 | +1% | 1 | 1 | 0% | 3,211 | 4,483 | +40% | 0 | 0 | — |
case-10 | pass→pass | 12,732 | 8,629 | -32% | 1 | 1 | 0% | 2,660 | 2,742 | +3% | 0 | 0 | — |
case-02 | fail→pass | 14,489 | 11,717 | -19% | 1 | 1 | 0% | 3,096 | 3,121 | +1% | 0 | 0 | — |
case-03 | pass→pass | 4,872 | 3,939 | -19% | 1 | 1 | 0% | 1,105 | 1,777 | +61% | 0 | 0 | — |
case-04 | pass→pass | 10,474 | 7,517 | -28% | 1 | 1 | 0% | 1,845 | 2,622 | +42% | 0 | 0 | — |
case-05 | pass→pass | 10,627 | 9,197 | -13% | 1 | 1 | 0% | 2,206 | 2,944 | +33% | 0 | 0 | — |
case-06 | pass→pass | 11,474 | 6,817 | -41% | 1 | 1 | 0% | 2,184 | 2,346 | +7% | 0 | 0 | — |
case-07 | fail→pass | 2,345 | 1,809 | -23% | 1 | 1 | 0% | 419 | 1,335 | +219% | 0 | 0 | — |
case-08 | pass→pass | 5,406 | 4,446 | -18% | 1 | 1 | 0% | 1,048 | 1,957 | +87% | 0 | 0 | — |
case-09 | pass→pass | 7,441 | 5,537 | -26% | 1 | 1 | 0% | 1,733 | 2,191 | +26% | 0 | 0 | — |
case-11 | pass→pass | 9,285 | 7,516 | -19% | 1 | 1 | 0% | 1,868 | 2,654 | +42% | 0 | 0 | — |
case-12 | pass→pass | 3,047 | 3,816 | +25% | 1 | 1 | 0% | 659 | 1,749 | +165% | 0 | 0 | — |
case-13 | pass→pass | 7,595 | 5,981 | -21% | 1 | 1 | 0% | 1,500 | 2,176 | +45% | 0 | 0 | — |
case-14 | pass→pass | 7,513 | 6,833 | -9% | 1 | 1 | 0% | 1,578 | 2,341 | +48% | 0 | 0 | — |
case-15 | pass→pass | 7,954 | 7,811 | -2% | 1 | 1 | 0% | 1,641 | 2,467 | +50% | 0 | 0 | — |
case-16 | pass→pass | 6,902 | 5,323 | -23% | 1 | 1 | 0% | 1,338 | 2,003 | +50% | 0 | 0 | — |
case-17 | pass→pass | 12,770 | 10,592 | -17% | 1 | 1 | 0% | 2,849 | 3,424 | +20% | 0 | 0 | — |
case-18 | pass→pass | 7,551 | 4,938 | -35% | 1 | 1 | 0% | 1,476 | 1,982 | +34% | 0 | 0 | — |
case-19 | pass→pass | 2,455 | 2,113 | -14% | 1 | 1 | 0% | 433 | 1,360 | +214% | 0 | 0 | — |
case-20 | pass→fail | 7,067 | 9,306 | +32% | 1 | 1 | 0% | 1,428 | 3,022 | +112% | 0 | 0 | — |
case-21 | pass→pass | 8,860 | 6,576 | -26% | 1 | 1 | 0% | 1,725 | 2,426 | +41% | 0 | 0 | — |
case-22 | pass→pass | 7,866 | 9,852 | +25% | 1 | 1 | 0% | 1,637 | 2,571 | +57% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.