golang

golang is a skill for Claude Code, Codex from JanDeDobbeleer/oh-my-posh. It costs 31 tokens per session (678 once invoked), scanned A, original, MIT.

A set of coding standards for Go, a programming language commonly used for backend tools and services. It covers code structure, naming, errors, documentation, and use of Go modules for dependencies.

In plain words
What is it for?
It is for writing, reviewing, or refactoring Go source files. It guides package names, exported documentation, error messages, control flow, and typed collections.
Why use it?
It helps keep Go code clear, predictable, and consistent with established community practices. It reduces avoidable review issues caused by confusing style or unnecessary complexity.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It is for writing, reviewing, or refactoring Go source files. It guides package names, exported documentation, error messages, control flow, and typed collections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jandedobbeleer/oh-my-posh/golang
About the project

oh-my-posh is a customizable prompt theme engine that renders command-line prompts across shells and platforms. Developers and terminal users use it to configure primary, secondary, right, and transient prompts in shells such as PowerShell, zsh, Bash, and cmd. The catalogue entries provide skills, instructions, agents, and an MCP integration for working with oh-my-posh.

JanDeDobbeleer/oh-my-posh · 23,655 stars · on GitHub · ohmyposh.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JanDeDobbeleer/oh-my-posh --skill golang
Clone the repo
git clone --depth 1 https://github.com/JanDeDobbeleer/oh-my-posh

Made for: Claude Code, Codex.

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 golang

README.md
[![agentmods](https://agentmods.dev/badge/skills/jandedobbeleer/oh-my-posh/golang/github.svg)](https://agentmods.dev/skills/jandedobbeleer/oh-my-posh/golang)
Your own site
<a href="https://agentmods.dev/skills/jandedobbeleer/oh-my-posh/golang"><img src="https://agentmods.dev/badge/skills/jandedobbeleer/oh-my-posh/golang/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 golang

Your own site · 80×15
<a href="https://agentmods.dev/skills/jandedobbeleer/oh-my-posh/golang"><img src="https://agentmods.dev/badge/skills/jandedobbeleer/oh-my-posh/golang.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 678 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. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00031 $0.00678
Opus 5.5 $0.00012 $0.00271
Sonnet 5.5 $0.00006 $0.00136
Haiku 4.5 $0.00003 $0.00068

Measured 6d ago against content hash d08734fd8fbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

golang 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.

.agents/skills/golang/SKILL.md · 65 lines

How it starts

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

Go conventions

Standard idiomatic Go applies. These are the rules that differ or that agents keep breaking.

Code

  • Never use else, in tests too. Return early, continue, break, or use a switch.
  • Comments explain a why the code cannot express: a hidden constraint, a workaround, a surprising invariant. No doc comments that restate a name or signature, exported symbols included.
  • Use named fields in every struct literal, never positional ones: fixing fieldalignment findings reorders struct fields.
  • Keep lines under 180 characters (lll).
  • When a standard library package collides with an existing import, alias it lib<name>, for example libtime.
  • Start error strings lowercase, without trailing punctuation.
  • Ask before adding a dependency.

Tests

  • Assert with testify (assert, require).

  • Write table-driven tests: one behavior is one test function with a table. Per-case fixtures, mock returns, and expected errors are table fields, not reasons for a new function. Extend an existing table instead of adding a function. Split when the API under test or the setup and assertion flow differs, and for no other reason.

  • Test behavior, not the patch. Name the behavior a test proves, then ask:

    1. Could the original bug still occur while this test passes?
    2. Could a correct refactor make it fail?

    If either answer is yes, redesign or drop the test. Never assert on source text, embedded scripts, or statement order; assert on text when the emitted text is itself the contract (generated shell code, escaping, serialization). When the behavior cannot be exercised, say so instead of adding a proxy test.

  • A test that mutates package-level state saves the original value and restores it with t.Cleanup, never a hardcoded value.

Before committing

Run from the module root and fix every finding:

modernize -fix ./...
fieldalignment ./...
golangci-lint run
  • Never run fieldalignment -fix: it drops the comments of the fields it reorders. Reorder by hand.
  • Commit the modernize rewrites with the change that triggered them.
  • After touching a _windows.go, _unix.go, _darwin.go, _linux.go, or //go:build file, also run go build ./..., golangci-lint run, modernize ./..., and fieldalignment ./... with GOOS set to another platform. The host toolchain skips other platforms' files, so their errors otherwise surface in CI.
  • dupl on near-identical tests: merge them into one table. Reserve //nolint:dupl, with a reason, for tests that must stay separate. goconst: extract a string literal used three or more times into a constant.

Read the full file on GitHub · 65 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 Changed · +1 lines d08734fd8fbb
  2. 16d ago Changed · -449 lines · +5 tokens per session 9ca1d5c2a275
  3. 1mo ago First seen · 513 lines · 26 tokens per session scan A 27e6905b4fa8

Subscribe to this mod's changes

golang is a skill published in the GitHub repository JanDeDobbeleer/oh-my-posh (23,655 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 678 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

golang-style

Go conventions specific to this author. Use before writing or editing any Go (.go) file.

fredrikaverpil/dotfiles · 23 tokens

scaffold-go

Scaffold a complete Go project with CI/CD, release pipeline, Makefile, sr.yaml, .envrc, and standard files. Uses go toolchain and make as the native build system. Loads on top of scaffold-project (run that first for cross-language standard files). Use when creating a new Go CLI, service, or module, or when the user…

urmzd/dotfiles · 116 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens