Agent skill

Higress Wasm Go Plugin

by higress-group in higress-group/higress

Develop Higress WASM plugins using Go 1.24+. An agent skill from higress-group/higress.

Apache-2.0Auto-check passedDatabases

Install Higress Wasm Go Plugin

skills CLI
$ npx skills add higress-group/higress --skill higress-wasm-go-plugin -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install higress-group/higress higress-wasm-go-plugin --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/higress-wasm-go-plugin .claude/skills/higress-wasm-go-plugin && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
higress-wasm-go-plugin
GitHub stars
9.5k
Token cost
~1.8k tokens
SKILL.md length
237 words
Files
5 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Develop Higress WASM plugins using Go 1.24+. An agent skill from higress-group/higress.

  • Works in 3 steps: init() - Register plugin with… → parseConfig - Parse YAML config… → HTTP processing phases - Handle…
  • Debugging Higress gateway plugins for HTTP request/response processing
  • SKILL.md covers Quick Start, Core Concepts, API Reference and Common Patterns, plus 3 more sections
  • Calls go

What it does

Higress Wasm Go Plugin is an agent skill from higress-group/higress. Develop Higress WASM plugins using Go 1.24+. Use when creating, modifying, or debugging Higress gateway plugins for HTTP request/response processing, external service calls, Redis integration, or custom gateway logic.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/advanced-patterns.md`, `references/http-client.md` and `references/local-testing.md`).

It sits in Databases. It works with WebAssembly and Redis. The repository describes itself as: 🤖 AI Gateway | AI Native API Gateway. The licence is Apache-2.0.

When your agent uses it

  • Debugging Higress gateway plugins for HTTP request/response processing
  • External service calls
  • Redis integration
  • Custom gateway logic

Example prompts

  • “/higress-wasm-go-plugin”

Requirements

  • Docker

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. init() - Register plugin with wrapper.SetCtx()
  2. parseConfig - Parse YAML config (auto-converted to JSON)
  3. HTTP processing phases - Handle requests/responses

What it can do on your machine

Read from SKILL.md and the folder at commit c74d7e2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Higress Wasm Go Plugin loads about 1.8k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 237 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from higress-group/higress at commit c74d7e2, republished under its Apache-2.0 licence (© higress-group). 237 words, ~1,842 tokens.

Download SKILL.mdSave it as .claude/skills/higress-wasm-go-plugin/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
higress-wasm-go-plugin
description
Develop Higress WASM plugins using Go 1.24+. Use when creating, modifying, or debugging Higress gateway plugins for HTTP request/response processing, external service calls, Redis integration, or custom gateway logic.

Higress WASM Go Plugin Development

Develop Higress gateway WASM plugins using Go language with the wasm-go SDK.

Quick Start

Project Setup
bash
# Create project directory
mkdir my-plugin && cd my-plugin

# Initialize Go module
go mod init my-plugin

# Set proxy (China)
go env -w GOPROXY=https://proxy.golang.com.cn,direct

# Download dependencies
go get github.com/higress-group/proxy-wasm-go-sdk@go-1.24
go get github.com/higress-group/wasm-go@main
go get github.com/tidwall/gjson
Minimal Plugin Template
go
package main

import (
    "github.com/higress-group/wasm-go/pkg/wrapper"
    "github.com/higress-group/proxy-wasm-go-sdk/proxywasm"
    "github.com/higress-group/proxy-wasm-go-sdk/proxywasm/types"
    "github.com/tidwall/gjson"
)

func main() {}

func init() {
    wrapper.SetCtx(
        "my-plugin",
        wrapper.ParseConfig(parseConfig),
        wrapper.ProcessRequestHeaders(onHttpRequestHeaders),
    )
}

type MyConfig struct {
    Enabled bool
}

func parseConfig(json gjson.Result, config *MyConfig) error {
    config.Enabled = json.Get("enabled").Bool()
    return nil
}

func onHttpRequestHeaders(ctx wrapper.HttpContext, config MyConfig) types.Action {
    if config.Enabled {
        proxywasm.AddHttpRequestHeader("x-my-header", "hello")
    }
    return types.HeaderContinue
}
Compile
bash
go mod tidy
GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o main.wasm ./

Core Concepts

Plugin Lifecycle
  1. init() - Register plugin with wrapper.SetCtx()
  2. parseConfig - Parse YAML config (auto-converted to JSON)
  3. HTTP processing phases - Handle requests/responses
HTTP Processing Phases
PhaseTriggerHandler
Request HeadersGateway receives client request headersProcessRequestHeaders
Request BodyGateway receives client request bodyProcessRequestBody
Response HeadersGateway receives backend response headersProcessResponseHeaders
Response BodyGateway receives backend response bodyProcessResponseBody
Stream DoneHTTP stream completesProcessStreamDone
Action Return Values
ActionBehavior
types.HeaderContinueContinue to next filter
types.HeaderStopIterationStop header processing, wait for body
types.HeaderStopAllIterationAndWatermarkStop all processing, buffer data, call proxywasm.ResumeHttpRequest/Response() to resume

API Reference

HttpContext Methods
go
// Request info (cached, safe to call in any phase)
ctx.Scheme()   // :scheme
ctx.Host()     // :authority
ctx.Path()     // :path
ctx.Method()   // :method

// Body handling
ctx.HasRequestBody()        // Check if request has body
ctx.HasResponseBody()       // Check if response has body
ctx.DontReadRequestBody()   // Skip reading request body
ctx.DontReadResponseBody()  // Skip reading response body
ctx.BufferRequestBody()     // Buffer instead of stream
ctx.BufferResponseBody()    // Buffer instead of stream

// Content detection
ctx.IsWebsocket()           // Check WebSocket upgrade
ctx.IsBinaryRequestBody()   // Check binary content
ctx.IsBinaryResponseBody()  // Check binary content

// Context storage
ctx.SetContext(key, value)
ctx.GetContext(key)
ctx.GetStringContext(key, defaultValue)
ctx.GetBoolContext(key, defaultValue)

// Custom logging
ctx.SetUserAttribute(key, value)
ctx.WriteUserAttributeToLog()
Header/Body Operations (proxywasm)
go
// Request headers
proxywasm.GetHttpRequestHeader(name)
proxywasm.AddHttpRequestHeader(name, value)
proxywasm.ReplaceHttpRequestHeader(name, value)
proxywasm.RemoveHttpRequestHeader(name)
proxywasm.GetHttpRequestHeaders()
proxywasm.ReplaceHttpRequestHeaders(headers)

// Response headers
proxywasm.GetHttpResponseHeader(name)
proxywasm.AddHttpResponseHeader(name, value)
proxywasm.ReplaceHttpResponseHeader(name, value)
proxywasm.RemoveHttpResponseHeader(name)
proxywasm.GetHttpResponseHeaders()
proxywasm.ReplaceHttpResponseHeaders(headers)

// Request body (only in body phase)
proxywasm.GetHttpRequestBody(start, size)
proxywasm.ReplaceHttpRequestBody(body)
proxywasm.AppendHttpRequestBody(data)
proxywasm.PrependHttpRequestBody(data)

// Response body (only in body phase)
proxywasm.GetHttpResponseBody(start, size)
proxywasm.ReplaceHttpResponseBody(body)
proxywasm.AppendHttpResponseBody(data)
proxywasm.PrependHttpResponseBody(data)

// Direct response
proxywasm.SendHttpResponse(statusCode, headers, body, grpcStatus)

// Flow control
proxywasm.ResumeHttpRequest()   // Resume paused request
proxywasm.ResumeHttpResponse()  // Resume paused response

Common Patterns

External HTTP Call

See references/http-client.md for complete HTTP client patterns.

go
func parseConfig(json gjson.Result, config *MyConfig) error {
    serviceName := json.Get("serviceName").String()
    servicePort := json.Get("servicePort").Int()
    config.client = wrapper.NewClusterClient(wrapper.FQDNCluster{
        FQDN: serviceName,
        Port: servicePort,
    })
    return nil
}

func onHttpRequestHeaders(ctx wrapper.HttpContext, config MyConfig) types.Action {
    err := config.client.Get("/api/check", nil, func(statusCode int, headers http.Header, body []byte) {
        if statusCode != 200 {
            proxywasm.SendHttpResponse(403, nil, []byte("Forbidden"), -1)
            return
        }
        proxywasm.ResumeHttpRequest()
    }, 3000) // timeout ms
    
    if err != nil {
        return types.HeaderContinue // fallback on error
    }
    return types.HeaderStopAllIterationAndWatermark
}
Redis Integration

See references/redis-client.md for complete Redis patterns.

go
func parseConfig(json gjson.Result, config *MyConfig) error {
    config.redis = wrapper.NewRedisClusterClient(wrapper.FQDNCluster{
        FQDN: json.Get("redisService").String(),
        Port: json.Get("redisPort").Int(),
    })
    return config.redis.Init(
        json.Get("username").String(),
        json.Get("password").String(),
        json.Get("timeout").Int(),
    )
}
Multi-level Config

插件配置支持在控制台不同级别设置:全局、域名级、路由级。控制面会自动处理配置的优先级和匹配逻辑,插件代码中通过 parseConfig 解析到的就是当前请求匹配到的配置。

Local Testing

See references/local-testing.md for Docker Compose setup.

Advanced Topics

See references/advanced-patterns.md for:

  • Streaming body processing
  • Route call pattern
  • Tick functions (periodic tasks)
  • Leader election
  • Memory management
  • Custom logging

Best Practices

  1. Never call Resume after SendHttpResponse - Response auto-resumes
  2. Check HasRequestBody() before returning HeaderStopIteration - Avoids blocking
  3. Use cached ctx methods - ctx.Path() works in any phase, GetHttpRequestHeader(":path") only in header phase
  4. Handle external call failures gracefully - Return HeaderContinue on error to avoid blocking
  5. Set appropriate timeouts - Default HTTP call timeout is 500ms

© higress-group, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .agents/skills/higress-wasm-go-plugin of higress-group/higress.

  • SKILL.md
  • references/advanced-patterns.md
  • references/http-client.md
  • references/local-testing.md
  • references/redis-client.md

Open the folder on GitHubat commit c74d7e2

Compare with similar skills

Higress Wasm Go Plugin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Higress Wasm Go Plugin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Higress Wasm Go Plugin this skillhigress-group/higress9.5k—~1.8kAutomated safety check: PassApache-2.0
Runtime Behavior Proberedis/node-redis18k—~4.4kAutomated safety check: PassMIT
Cognee Community Packagestopoteretes/cognee32k—~1.2kAutomated safety check: PassApache-2.0
Implement Commandredis/node-redis18k—~5kAutomated safety check: PassMIT
Redis Insight Pluginredis/RedisInsight8.9k—~3.5kAutomated safety check: PassMIT
Create Implementation Plan For Redis API Changeredis/jedis12k—~6.2kAutomated safety check: NotesMIT

Similar skills

  • Runtime Behavior Probe

    redis/node-redis

    Official

    Plan and execute runtime-behavior investigations with temporary TypeScript probe scripts, validation matrices, state controls, and findings-first reports.

    18k GitHub stars~4.4k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Cognee Community Packages

    topoteretes/cognee

    Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.

    32k GitHub stars~1.2k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Implement Command

    redis/node-redis

    Official

    Add a new Redis command (or command variant) to node-redis end-to-end — the <NAME.ts Command file, its registration with JSDoc in the package commands/index.ts, and a co-located <NAME.spec.ts with…

    18k GitHub stars~5k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Redis Insight Plugin

    redis/RedisInsight

    Official

    A skill your agent uses when creating, modifying, debugging, deploying, or testing Redis Insight Workbench visualization plugins, plugin manifests, package.json visualizations, activationMethod…

    8.9k GitHub stars~3.5k tokensUpdated 6 days ago
    DatabasesAuto-check passed
  • Produce Jedis's implementation plan for a Redis API change from a shared client HLD - one reviewed markdown file naming the public API to add, every file and surface to touch, the ordered steps, the…

    12k GitHub stars~6.2k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • Produce Lettuce's implementation plan for a Redis API change from a shared client HLD - one reviewed markdown file naming the public API to add, every file and flavor to touch, the ordered steps…

    5.8k GitHub stars~5.6k tokensUpdated today
    DatabasesAuto-check passed

More from higress-group/higress

All 11 skills in this repo
  • Higress Openclaw Integration

    higress-group/higress

    Deploy and configure Higress AI Gateway for OpenClaw integration.

    9.5k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Nginx To Higress Migration

    higress-group/higress

    Migrate from ingress-nginx to Higress in Kubernetes environments.

    9.5k GitHub stars~3.9k tokensUpdated 2 days ago
    Auto-check passed
  • Agent Session Monitor

    higress-group/higress

    Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.

    9.5k GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Higress Auto Router

    higress-group/higress

    Configure automatic model routing using the get-ai-gateway.sh CLI tool for Higress AI Gateway.

    9.5k GitHub stars~954 tokensUpdated 2 days ago
    Auto-check passed
  • Higress Daily Report

    higress-group/higress

    生成 Higress 项目每日报告,追踪 issue/PR 动态,沉淀问题处理经验,驱动社区问题闭环。用于生成日报、跟进 issue、记录解决方案。

    9.5k GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Higress Update Envoy Gateway

    higress-group/higress

    Update Higress Envoy binary and gateway image dependencies for e2e validation.

    9.5k GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Higress Wasm Go Plugin

What does Higress Wasm Go Plugin do?

Develop Higress WASM plugins using Go 1.24+. An agent skill from higress-group/higress. Higress Wasm Go Plugin is an agent skill from higress-group/higress.24+.

When should I use Higress Wasm Go Plugin?

Higress Wasm Go Plugin fits situations like: debugging Higress gateway plugins for HTTP request/response processing; external service calls; redis integration; custom gateway logic.

How do I install Higress Wasm Go Plugin in Claude Code?

Run `npx skills add higress-group/higress --skill higress-wasm-go-plugin -a claude-code`. Or copy the skill folder (.agents/skills/higress-wasm-go-plugin in higress-group/higress) into .claude/skills/higress-wasm-go-plugin in your project. Claude Code loads it when a task matches its description.

How do I install Higress Wasm Go Plugin in Codex?

Run `npx skills add higress-group/higress --skill higress-wasm-go-plugin -a codex`. Or copy the skill folder (.agents/skills/higress-wasm-go-plugin in higress-group/higress) into .agents/skills/higress-wasm-go-plugin in your project. Codex loads it when a task matches its description.

Can I use Higress Wasm Go Plugin in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add higress-group/higress --skill higress-wasm-go-plugin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/higress-wasm-go-plugin, .gemini/skills/higress-wasm-go-plugin, .github/skills/higress-wasm-go-plugin and .opencode/skills/higress-wasm-go-plugin in your project.

What does Higress Wasm Go Plugin need to run?

Going by SKILL.md and its folder, Higress Wasm Go Plugin needs the command-line tools its instructions call (go). Our summary lists: Docker.

Does Higress Wasm Go Plugin access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Higress Wasm Go Plugin safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Higress Wasm Go Plugin use?

Higress Wasm Go Plugin is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Higress Wasm Go Plugin use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.3k tokens, read only when the agent opens those files.

What are the alternatives to Higress Wasm Go Plugin?

Skills that share tags, products or a category with Higress Wasm Go Plugin: Runtime Behavior Probe (redis/node-redis, 18k stars), Cognee Community Packages (topoteretes/cognee, 32k stars), Implement Command (redis/node-redis, 18k stars) and Redis Insight Plugin (redis/RedisInsight, 8.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Higress Wasm Go Plugin?

higress-group (a GitHub organization) maintains it in higress-group/higress, which has 9,516 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: higress-group/higress on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.