go-style SKILL.md skillA
go-style from bitwise-media-group/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bitwise-media-group/skills/go-style@git:20260701.20789e5Pins git:20260701.20789e5 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bitwise-media-group/skills
- Path
plugins/golang/skills/go-style/SKILL.md- Versions recorded
- 4
- Latest version
- git:20260701.20789e5, committed Jul 1, 2026
- First version recorded
- Jun 10, 2026
- Size
- 8,964 bytes
- Repository stars
- 3
- License
- MIT
Modern Go code style for stdlib-first programs — error wrapping with %w, sentinel errors, structured logging with log/slog, context threading, consumer-defined interfaces, nil-safe constructors, net/http servers with method-pattern routing, flag/env configuration for services, and cobra commands with viper configuration for CLI tools. Use when writing, reviewing, or refactoring any Go code (.go files, packages, services, CLIs): handling or wrapping errors in Go, adding structured logging to a…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Go style conventions
Stdlib-first conventions for modern Go (1.22+). Apply them to new code and match them when editing
existing code; reach for a third-party dependency only when the standard library genuinely cannot
do the job. For the rationale behind each rule and extended examples, see
[reference.md](reference.md).
## 1. Wrap errors with `%w` and the failing operation, exactly once
Name the operation lowercase, no "failed to", no trailing punctuation. Wrap where context is
added; pass through errors that are already contextual:
```go
if err := v.BindPFlags(fs); err != nil {
return nil, fmt.Errorf("bind flags: %w", err)
}
if err := cfg.Validate(); err != nil {
return nil, err // Validate's message already says what failed — don't double-wrap
}
```
`%w` keeps the chain inspectable with `errors.Is`/`errors.As`; a `%v` wrap severs it.
## 2. Sentinel errors for conditions callers branch on
Declare package-level sentinels with `errors.New`; expose structured failures as error types.
Callers match with `errors.Is` (sentinels) or `errors.As` (types) — never by comparing message
strings.
```go
var ErrUnknownClient = errors.New("unknown client")
```
…Read the whole file at its exact version.
How to install
mdr add bitwise-media-group/skills/go-style@sha256:535ef253ce1402aaThe line at the top of this page pins the label git:20260701.20789e5, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_qcfnqj3d373jel6m)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Jun 10, 2026 and Jul 1, 2026, about one every 7 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260701.20789e5 latest | 2026-07-01 | 20789e5 | 8,964 B | A | view · diff |
| git:20260612.93048ee | 2026-06-12 | 93048ee | 8,131 B | A | view · diff |
| git:20260610.66c55f0 | 2026-06-10 | 66c55f0 | 5,968 B | A | view · diff |
| git:20260610.3a4cd11 | 2026-06-10 | 3a4cd11 | 4,513 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (8964 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bitwise-media-group/skills · 3 stars · license MIT · pushed 2026-10-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_qcfnqj3d373jel6m GET https://markdownregistry.com/api/v1/resolve?ref=bitwise-media-group/skills/go-style GET https://markdownregistry.com/api/v1/blob/535ef253ce1402aa7705d766c4ef25348067007b578bbb534b9c0ed0c3bf6593
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.