---
name: "connect-go-grpc-web-browser"
description: "Call gRPC and Connect services directly from web browsers and curl with zero Envoy proxies."
metadata:
  author: "Buf"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup connect-go server"
  - "call grpc from browser connect"
  - "buf generate connect-go"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Connect-Go Browser-Compatible gRPC & Multi-Protocol RPC

Implements Buf Connect-Go: generating type-safe handlers, supporting gRPC, gRPC-Web, and Connect protocol over standard HTTP/1.1 and HTTP/2, streaming support, and TypeScript client integration.

## When to Invoke
Invoke this skill whenever you need to:
- setup connect-go server
- call grpc from browser connect
- buf generate connect-go

## Execution SOP & Rules
1. Manage schemas with buf.gen.yaml using protoc-gen-connect-go.
2. Implement service: type GreetServer struct{}; func (s *GreetServer) Greet(...) (*connect.Response[...], error) { ... }.
3. Mount to standard net/http mux: path, handler := greetv1connect.NewGreetServiceHandler(&GreetServer{}).
4. Query from terminal: curl -X POST -H 'Content-Type: application/json' -d '{"name":"Alex"}' http://localhost:8080/greet.v1.GreetService/Greet.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
