Logging Observability
getsentry/toolkit
Review code for correct logging and error handling patterns.
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog…
$ npx skills add unxed/f4 --skill golang-error-handling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install unxed/f4 golang-error-handling --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/golang-error-handling .claude/skills/golang-error-handling && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .claude/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handlingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add unxed/f4 --skill golang-error-handling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install unxed/f4 golang-error-handling --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/golang-error-handling .agents/skills/golang-error-handling && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .agents/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add unxed/f4 --skill golang-error-handling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install unxed/f4 golang-error-handling --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/golang-error-handling .cursor/skills/golang-error-handling && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .cursor/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/unxed/f4.git --path .agents/skills/golang-error-handling--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add unxed/f4 --skill golang-error-handling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install unxed/f4 golang-error-handling --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/golang-error-handling .gemini/skills/golang-error-handling && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .gemini/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install unxed/f4 golang-error-handlingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add unxed/f4 --skill golang-error-handling -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/golang-error-handling .github/skills/golang-error-handling && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .github/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add unxed/f4 --skill golang-error-handling -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install unxed/f4 golang-error-handling --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/golang-error-handling .opencode/skills/golang-error-handling && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "golang-error-handling" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/golang-error-handling into .opencode/skills/golang-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-error-handling", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
golang-error-handlingIdiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog…
Golang Error Handling is an agent skill from unxed/f4. Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See samber/cc-skills-golang@golang-samber-oops skill; for slog handler…
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/evals.json`, `references/error-creation.md` and `references/error-handling.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in DevOps & Cloud, covering Observability and Error handling. It works with Go. The repository describes itself as: dual pane like a charm. The licence is MIT.
12 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 772edc7. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteGlobGrepBash(go:*)Bash(golangci-lint:*)Bash(git:*)AgentFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.compkg.go.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
From compatibility in the SKILL.md frontmatter.
Golang Error Handling loads about 1.8k tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 151 tokens; SKILL.md has 720 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from unxed/f4 at commit 772edc7, republished under its MIT licence (© unxed). 720 words, ~1,828 tokens.
.claude/skills/golang-error-handling/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Persona: You are a Go reliability engineer. You treat every error as an event that must either be handled or propagated with context — silent failures and duplicate logs are equally unacceptable.
Orchestration mode: Fan out the five category sub-agents described in the "Parallelizing Error Handling Audits" section (creation, wrapping, single-handling rule, panic/recover, structured logging) for auditing error handling across a large codebase, and consolidate their findings. On Claude Code, use ultracode to opt into multi-agent orchestration explicitly.
Modes:
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-error-handlingskill takes precedence.
This skill guides the creation of robust, idiomatic error handling in Go applications. Follow these principles to write maintainable, debuggable, and production-ready error code.
_fmt.Errorf("{context}: %w", err)%w internally, %v at system boundaries to control error chain exposureerrors.Is for sentinel matching and errors.As/errors.AsType for typed chain inspection instead of direct comparison or bare type assertions. For Go 1.26+, prefer errors.AsType[T](err) when T implements error; use errors.As(err, &target) for Go <1.26 or for non-error interface targets.errors.Join (Go 1.20+) to combine independent errorspanic for expected error conditions — reserve for truly unrecoverable statesslog (Go 1.21+) for structured error logging — not fmt.Println or log.Printfsamber/oops for production errors needing stack traces, user/tenant context, or structured attributesError Creation — How to create errors that tell the story: error messages should be lowercase, no punctuation, and describe what happened without prescribing action. Covers sentinel errors (one-time preallocation for performance), custom error types (for carrying rich context), and the decision table for which to use when.
Error Wrapping and Inspection — Why fmt.Errorf("{context}: %w", err) beats fmt.Errorf("{context}: %v", err) (chains vs concatenation). How to inspect chains with errors.Is, errors.As, and Go 1.26+ errors.AsType for type-safe error handling, and errors.Join for combining independent errors.
Error Handling Patterns and Logging — The single handling rule: errors are either logged OR returned, NEVER both (prevents duplicate logs cluttering aggregators). Panic/recover design, samber/oops for production errors, and slog structured logging integration for APM tools.
When auditing error handling across a large codebase, use up to 5 parallel sub-agents — each targets an independent error category:
errors.New/fmt.Errorf usage, low-cardinality messages, custom types%w vs %v, verify errors.Is/errors.As patterns_)panic usage, verify recovery at goroutine boundariesslog usage at error sites, check for PII in error messagessamber/cc-skills-golang@golang-samber-oops for full samber/oops API, builder patterns, and logger integrationsamber/cc-skills-golang@golang-observability for structured logging setup, log levels, and request logging middlewaresamber/cc-skills-golang@golang-safety for nil interface trap and nil error comparison pitfallssamber/cc-skills-golang@golang-naming for error naming conventions (ErrNotFound, PathError)samber/cc-skills-golang@golang-continuous-integration skill for automated AI-driven code review in CI using these guidelines© unxed, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in .agents/skills/golang-error-handling of unxed/f4.
Open the folder on GitHubat commit 772edc7
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in unxed/f4, which our catalogue first saw on October 7, 2026.
Golang Error Handling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Golang Error Handling this skillunxed/f4 | 243 | 3 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Logging Observabilitygetsentry/toolkit | 920 | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| fp-go Logging PatternsIBM/fp-go | 2k | — | ~3.7k | Automated safety check: Pass | Apache-2.0 | |
| Crash Instrumentationnexus-labs-automation/mobile-observability | 116 | — | ~744 | Automated safety check: Pass | MIT | |
| Golang Samber Slogcontext-labs/whip | 1.1k | 2 repos | ~3k | Automated safety check: Pass | MIT | |
| Deploy Observabilityaliyun/alibabacloud-observability-mcp-server | 166 | — | ~2.6k | Automated safety check: Notes | None |
getsentry/toolkit
Review code for correct logging and error handling patterns.
IBM/fp-go
Adds logging to fp-go functional pipelines with Tap operators, entry and exit logs and error context, so that logging never changes the value or error flowing through.
nexus-labs-automation/mobile-observability
Set up crash instrumentation with actionable context. An agent skill from nexus-labs-automation/mobile-observability.
context-labs/whip
Structured logging extensions for Golang using samber/slog- — multi-handler pipelines, sampling, attribute formatting, HTTP middleware (gin, echo, fiber, chi), backend routing (datadog, sentry…
aliyun/alibabacloud-observability-mcp-server
Deploy, start, and update the Alibaba Cloud Observability MCP Server (阿里云可观测 MCP Server).
EliasOulkadi/shokunin
Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead…
unxed/f4
Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llms.txt.
unxed/f4
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt.
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
unxed/f4
Security audit checklist based on OWASP Top 10 and best practices.
unxed/f4
Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters/setters, functional options, acronyms, test functions, and…
unxed/f4
Golang concurrency design — goroutine lifecycle and leak prevention, channels and select, channel ownership and direction, sync.Mutex/RWMutex/sync.Map/sync.Once/atomics, errgroup, singleflight…
Works with
Categories
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog…. Golang Error Handling is an agent skill from unxed/f4.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors.
Golang Error Handling fits situations like: tasks that involve Observability; tasks that involve Error handling.
Run `npx skills add unxed/f4 --skill golang-error-handling -a claude-code`. Or copy the skill folder (.agents/skills/golang-error-handling in unxed/f4) into .claude/skills/golang-error-handling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add unxed/f4 --skill golang-error-handling -a codex`. Or copy the skill folder (.agents/skills/golang-error-handling in unxed/f4) into .agents/skills/golang-error-handling in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add unxed/f4 --skill golang-error-handling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-error-handling, .gemini/skills/golang-error-handling, .github/skills/golang-error-handling and .opencode/skills/golang-error-handling in your project.
SKILL.md names no scripts, command-line tools or credentials: Golang Error Handling is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..
SKILL.md names 2 domains. As links in the text: github.com and pkg.go.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Golang Error Handling is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Error Handling: Logging Observability (getsentry/toolkit, 920 stars), fp-go Logging Patterns (IBM/fp-go, 2k stars), Crash Instrumentation (nexus-labs-automation/mobile-observability, 116 stars) and Golang Samber Slog (context-labs/whip, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
unxed (a GitHub user) maintains it in unxed/f4, which has 243 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 10, 2026.
Source: unxed/f4 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.