go-functions

go-functions is a skill for Claude Code from muratmirgun/gophers. It costs 83 tokens per session (1,551 once invoked), scanned A, original, MIT.

A set of guidelines for designing and arranging Go functions. It covers readable function signatures, return values, receiver choices, file ordering, and naming functions that accept formatted text.

In plain words
What is it for?
Use it when organizing a Go file, designing a function or method signature, choosing pointer or value receivers, handling boolean parameters, or writing Printf-style helpers.
Why use it?
It reduces hidden meaning in function calls and makes files and APIs easier to scan, use, and review.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; built for openclaw.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is Read [references/signatures.md](../../../skills/go-functions/references/signatures.md) for return-value styles, naked returns, function-as-parameter formatting,.

Part of the gophers plugin — 26 skills, 4 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add muratmirgun/gophers
Claude Code
/plugin install gophers

Made for: Claude Code.

Or install gophers, the plugin that ships this one along with the rest of its 26 skills, 4 agents.

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-functions

README.md
[![agentmods](https://agentmods.dev/badge/skills/muratmirgun/gophers/go-functions.svg)](https://agentmods.dev/skills/muratmirgun/gophers/go-functions)
Your own site
<a href="https://agentmods.dev/skills/muratmirgun/gophers/go-functions"><img src="https://agentmods.dev/badge/skills/muratmirgun/gophers/go-functions.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00083 $0.01551
Opus 5 $0.00042 $0.00776
Sonnet 5 $0.00017 $0.00310
Haiku 4.5 $0.00008 $0.00155

Measured 6d ago against content hash 8b369fe5f6f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

go-functions 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 6d ago.

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.

.claude-plugin/skills/go-functions/SKILL.md · 182 lines

How it starts

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

Go Function Design

A function's surface is read more often than its body. Optimize for the reader: predictable ordering in the file, signatures that scan, no hidden bool flags.

Core Rules

  1. Order by use, not alphabet. Types → constructors → exported methods → unexported → utilities.
  2. Keep signatures on one line when reasonable. When wrapping, every parameter on its own line with a trailing comma.
  3. Never pass *Interface. Pass the interface value; the underlying data can already be a pointer.
  4. Replace naked bool/int parameters with named types or add /* name */ comments at call sites.
  5. Printf-style functions end in f so go vet can check the format.
  6. Prefer %q over %s plus manual quoting when formatting strings for errors and logs.

File Ordering

type Server struct{ ... }

func NewServer(...) *Server { ... }     // constructor next to type

func (s *Server) Start(ctx context.Context) error { ... } // exported
func (s *Server) Stop() error           { ... }

func (s *Server) acceptLoop() { ... }   // unexported

func parseAddr(s string) (string, error) { ... } // file-local helper

Rules:

  1. Types and their constructors sit together at the top.
  2. Exported methods come before unexported ones.
  3. File-local helpers go at the bottom.
  4. Within a section, follow rough call order.

Signature Formatting

// Fits on one line — keep it on one line
func Sum(xs []int) int

// Too long — break with every param on its own line
func (r *Repo) SaveTransaction(
    ctx context.Context,
    userID string,
    tx Transaction,
    opts ...SaveOption,
) (string, error) {
    ...
}

The trailing comma is required and gofmt-stable.

Avoid Naked Bool/Int Parameters

// Bad — what does `true` mean?
NewServer(":8080", true, 30, false)

// Better — call-site comments
NewServer(":8080", true /* tls */, 30 /* maxConn */, false /* readonly */)

// Best — named types or options
NewServer(":8080", WithTLS(), WithMaxConn(30))

Read the full file on GitHub · 182 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. 6d ago First seen · 182 lines · 83 tokens per session scan A 8b369fe5f6f8

Subscribe to this mod's changes

go-functions is a skill published in the GitHub repository muratmirgun/gophers (8 stars, last pushed 25d ago), licensed MIT. It adds 83 tokens to every session and 1,551 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

go

Use when writing Go services, CLIs, or libraries. Covers idiomatic error wrapping, goroutine and context discipline, interface design, table-driven tests, and the race detector.

nimadorostkar/Claude-Skills-collection · 38 tokens

golang-pro

Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…

Jeffallan/claude-skills · 95 tokens

developing-genkit-go

Develop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working with Genkit Go code involving generation, prompts, streaming, tool calling, or model providers.

google/skills · 60 tokens

authoring-go-sdk-tasks

Writes Airflow task logic in Go using the Airflow Go SDK. Use when the user wants to implement Airflow tasks in Go, asks about BundleProvider/RegisterDags, the bundlev1 Registry/Dag interfaces, registering Go tasks (AddTask/AddTaskWithName), dependency injection by parameter type (context.Context, sdk.TIRunContext…

astronomer/agents · 165 tokens

loom-golang

Go language expertise for idiomatic, production-quality code.

cosmix/loom · 15 tokens

go-programming-expert

Expert-level skill for Go programming (Go 1.25+). Covers high-performance microservices, concurrency patterns, sqlc, net/http, Gin/Echo/Fiber, gRPC, and testing in English and Indonesian.

roedyrustam/vibes-plug · 51 tokens