Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

ngamuxngamux 效率

Agent Skill

ngamux 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

18,957

周安装

806

GitHub Stars

公开资料未说明

下载量

6,641
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ngamux(ngamux 效率)
来源仓库:https://github.com/hadihammurabi/ngamux
安装命令:
openclaw skills install ngamux
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ngamux

简介

使用 Ngamux 在 Go 中构建和修改 HTTP 路由和中间件,支持动态路径、请求解析、JSON/表单处理和流畅的响应编写。

SKILL.md

name
ngamux
description
Build and modify web services using ngamux, a simple HTTP router for Go. Define routes, apply middleware, handle requests, and send responses efficiently.

When to use this skill

Use this skill when the user needs to:

  • Define HTTP endpoints: Create new routes for various HTTP methods (e.g., mux.Get("/users/:id", getUserHandler)) including dynamic path segments (/users/{id}) and wildcards (/files/*filePath).
  • Implement request preprocessing/postprocessing: Add global middlewares (e.g., for authentication, logging, CORS) or group-specific middlewares to handle requests before they reach the main handler or after they are processed. For example, mux.Use(authMiddleware) or apiGroup.Use(loggingMiddleware).
  • Extract incoming data from requests:

- URL Parameters: Retrieve values from dynamic path segments (e.g., req.Params("id")). - Query Parameters: Access query string values (e.g., req.Query("name", "Guest")). - Form Data: Parse application/x-www-form-urlencoded or multipart/form-data (e.g., req.FormValue("username"), req.FormFile("image")). - JSON Payloads: Decode application/json request bodies into Go structs (e.g., req.JSON(&user)).

  • Construct and send various response types:

- JSON Responses: Send structured data as JSON (e.g., ngamux.Res(rw).Status(http.StatusOK).Json(data)). - Text Responses: Send plain text (e.g., ngamux.Res(rw).Status(http.StatusOK).Text("Hello, World!")). - HTML Responses: Render HTML templates (e.g., ngamux.Res(rw).Status(http.StatusOK).HTML("template.html", data)). - Custom Status Codes: Set specific HTTP status codes for responses.

  • Configure router behavior: Adjust global settings like automatically removing trailing slashes (ngamux.WithTrailingSlash()), setting the logging verbosity (ngamux.WithLogLevel(slog.LevelDebug)), or providing custom json.Marshal/json.Unmarshal functions for specific serialization needs.
  • Organize routes with grouping: Create nested route groups to apply common path prefixes and middlewares to a set of routes (e.g., /api/v1).
  • Debug routing or handler issues: Inspect route definitions, middleware chains, request context, and logging output to diagnose and resolve problems.

Key Functionality

  • Route Definition: 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.
  • Middleware Application: The 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 Handling: The 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 Handling: The 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.

  • Configuration: Global Config options are set via ngamux.New() and functional options like ngamux.WithTrailingSlash() and ngamux.WithLogLevel(). Custom JSON marshalling/unmarshalling can be provided.
  • Route Grouping: The 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.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

76.43%
按下载量换算5,076

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills