go-services

go-services is a skill for Claude Code, Codex from alivirgo/Major-AI-Skills. It costs 21 tokens per session (913 once invoked), scanned A, original, MIT.

A guide for building web services in Go, a programming language known for small compiled programs and built-in concurrency support.

In plain words
What is it for?
Use it to structure Go modules, write REST or JSON endpoints, add middleware, fix leaked background tasks, and test services with Go's testing tools.
Why use it?
It helps keep HTTP services predictable by handling cancellation, errors, shutdown, timeouts, and tests consistently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build -o bin/service ./cmd/service.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it to structure Go modules, write REST or JSON endpoints, add middleware, fix leaked background tasks, and test services with Go's testing tools.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills
agentmods
npx agentmods add skills/alivirgo/major-ai-skills/go-services

Made for: Claude Code, Codex.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-services

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/go-services/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/go-services)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/go-services"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/go-services/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-services

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/go-services"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/go-services.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 913 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00913
Opus 5 $0.00010 $0.00456
Sonnet 5 $0.00004 $0.00183
Haiku 4.5 $0.00002 $0.00091

Measured yesterday against content hash 3e8eb5e05eb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

go-services scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/go-services/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go HTTP Services AI Skill Guide

Overview & Engine Architecture

Go services are typically single static binaries with net/http (or a thin router), goroutines for concurrency, and context.Context for deadlines and cancellation. Agents keep packages small, return errors explicitly (no panic for control flow), propagate context into DB/HTTP clients, and use go test table-driven tests as the default quality gate.

main -> http.Server
          |
     mux / chi / echo
          |
   handlers -> services -> stores
          |
     context cancel / timeout

When to use this skill

  • Building REST/JSON backends in Go
  • Structuring modules (go.mod) and internal packages
  • Fixing leaked goroutines or ignored contexts
  • Hardening graceful shutdown

Operational directives

  1. Accept context.Context as the first parameter on I/O methods.
  2. Wrap errors with %w and handle at the edge with stable HTTP status mapping.
  3. Prefer stdlib net/http + small router unless the team already standardized.
  4. Run go vet and race detector on critical packages (go test -race).
  5. Set read/write/idle timeouts on http.Server - never listen with zero timeouts in prod.

Handler sketch

package main

import (
  "encoding/json"
  "net/http"
  "time"
)

type ItemIn struct {
  SKU string `json:"sku"`
  Qty int    `json:"qty"`
}

func createItem(w http.ResponseWriter, r *http.Request) {
  var in ItemIn
  if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 1<<20)).Decode(&in); err != nil {
    http.Error(w, "bad json", http.StatusBadRequest)
    return
  }
  if in.SKU == "" || in.Qty < 0 {
    http.Error(w, "invalid item", http.StatusBadRequest)
    return
  }
  w.Header().Set("content-type", "application/json")
  w.WriteHeader(http.StatusCreated)
  _ = json.NewEncoder(w).Encode(map[string]any{"id": 1, "sku": in.SKU, "qty": in.Qty})
}

func main() {
  mux := http.NewServeMux()
  mux.HandleFunc("POST /items", createItem)
  srv := &http.Server{
    Addr:              ":8080",
    Handler:           mux,
    ReadHeaderTimeout: 5 * time.Second,
  }
  _ = srv.ListenAndServe()
}

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -8 tokens per session 3e8eb5e05eb2
  2. 6d ago First seen · 123 lines · 29 tokens per session scan A 36170b97572b

Subscribe to this mod's changes

go-services is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 913 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.