ngamuxBuild and modify HTTP routes and middleware in Go with Ngamux, supporting dynamic paths, request parsing, JSON/form handling, and fluent response writing.
Install via ClawdBot CLI:
clawdbot install hadihammurabi/ngamuxUse this skill when the user needs to:
mux.Get("/users/:id", getUserHandler)) including dynamic path segments (/users/{id}) and wildcards (/files/*filePath).mux.Use(authMiddleware) or apiGroup.Use(loggingMiddleware).req.Params("id")).req.Query("name", "Guest")).application/x-www-form-urlencoded or multipart/form-data (e.g., req.FormValue("username"), req.FormFile("image")).application/json request bodies into Go structs (e.g., req.JSON(&user)).ngamux.Res(rw).Status(http.StatusOK).Json(data)).ngamux.Res(rw).Status(http.StatusOK).Text("Hello, World!")).ngamux.Res(rw).Status(http.StatusOK).HTML("template.html", data)).ngamux.WithTrailingSlash()), setting the logging verbosity (ngamux.WithLogLevel(slog.LevelDebug)), or providing custom json.Marshal/json.Unmarshal functions for specific serialization needs./api/v1).ngamux provides methods like mux.Get(), mux.Post(), mux.Put(), mux.Delete(), mux.Patch(), mux.Head(), and mux.All() to register http.HandlerFuncs for specific HTTP methods and paths. It supports path parameters (e.g., /{id}) and wildcards (/*filePath). Routes are efficiently stored and matched using a tree-like structure, leveraging the mapping package for optimized key-value storage.mux.Use() method allows global middleware registration, while mux.Group() and mux.With() enable group-specific middlewares. Middlewares are MiddlewareFunc types that wrap http.HandlerFuncs, allowing for a chain of responsibility pattern. The WithMiddlewares utility from common.go handles the functional chaining.Request struct (wrapped *http.Request) offers convenience methods:Req().Params(key string): Retrieves URL path parameters parsed during routing.Req().Query(key string, fallback ...string): Accesses URL query string parameters.Req().QueriesParser(data any): Automatically binds query parameters to a Go struct using query tags and reflection.Req().FormValue(key string): Gets form field values.Req().FormFile(key string, maxFileSize ...int64): Handles file uploads from multipart forms.Req().JSON(store any): Decodes JSON request bodies into a provided Go interface.Req().Locals(key any, value ...any): Manages request-scoped data in the context.Response struct (wrapped http.ResponseWriter) provides a fluent API for crafting responses:Res(rw).Status(code int): Sets the HTTP status code.Res(rw).Text(data string): Sends text/plain content.Res(rw).JSON(data any): Sends application/json content, using the configured JSON marshaller.Res(rw).HTML(path string, data any): Renders HTML templates using html/template.Config options are set via ngamux.New() and functional options like ngamux.WithTrailingSlash() and ngamux.WithLogLevel(). Custom JSON marshalling/unmarshalling can be provided.mux.Group(path string) and mux.GroupFunc(path string, router func(mux *Ngamux)) methods allow hierarchical organization of routes, where child groups inherit path prefixes and can apply their own set of middlewares, leading to cleaner code organization and shared logic.AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.