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.
npx skills add saifoelloh/golang-best-practices-skill --skill error-handlinggit clone --depth 1 https://github.com/saifoelloh/golang-best-practices-skillWrote 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.
[](https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/error-handling)<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/error-handling"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/error-handling/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.
<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/error-handling"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00821 |
| Opus 5 | $0.00030 | $0.00411 |
| Sonnet 5 | $0.00012 | $0.00164 |
| Haiku 4.5 | $0.00006 | $0.00082 |
Grade A, and why
golang-fullstack-error-handling 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling (Unified Go & DB)
Expert-level review for error handling in Go services using GORM and PostgreSQL. Ensures errors are correctly identified, preserved via wrapping, mapped to domain errors, and retried where appropriate.
When to Apply
Use this skill when:
- Reviewing general Go error propagation and context usage
- Debugging database errors (e.g., duplicate keys, serialization failures)
- Auditing error wrapping with
%wvs%v - Ensuring correct use of
errors.Is/errors.As - Adding retry logic for serializable transactions or deadlocks
Rule Categories
| Priority | Count | Focus |
|---|---|---|
| CRITICAL | 6 | error chains, context leaks, PgError mapping, retries |
| HIGH | 6 | propagation, Is/As usage, RowsAffected, deadlock detection |
| MEDIUM | 2 | sentinel errors, structured logging |
Rules Covered (14 total)
Critical Issues (6)
critical-error-wrapping— Use%w, not%v, to preserve error chainscritical-context-leak— Alwaysdefer cancel()after context creationcritical-error-shadow— Don't shadowerrin nested scopescritical-errors-is-as— Useerrors.Is/Asfor DB and wrapped errorscritical-pg-error-mapping— Map Postgres codes to domain errors at repo boundarycritical-serialization-retry— Retry transactions on40001serialization failure
High-Impact Patterns (6)
high-context-propagation— Propagate context through the call chainhigh-error-is-as— Prescriptive rule for using Is/As over string matchinghigh-interface-nil— Check for nil in interfaces correctlyhigh-rows-affected— CheckRowsAffectedafter Update/Deletehigh-wrap-with-context— Wrap DB errors with operation contexthigh-deadlock-detection— Handle40P01deadlocks as retryable
Medium Improvements (2)
medium-sentinel-error-usage— Use sentinel errors for stable categoriesmedium-structured-logging— Log DB/Go errors with structured fields
Trigger Phrases
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- rules/critical-context-leak.md 7.2 KB
- rules/critical-error-shadow.md 7.8 KB
- rules/critical-error-wrapping.md 5.4 KB
- rules/critical-errors-is-as.md 2.6 KB
- rules/critical-pg-error-mapping.md 3.0 KB
- rules/critical-serialization-retry.md 2.5 KB
- rules/high-context-propagation.md 8.9 KB
- rules/high-deadlock-detection.md 2.3 KB
- rules/high-error-is-as.md 8.0 KB
- rules/high-interface-nil.md 948 B
- rules/high-rows-affected.md 2.2 KB
- rules/high-wrap-with-context.md 2.4 KB
- rules/medium-sentinel-error-usage.md 1.5 KB
- rules/medium-structured-logging.md 1.4 KB
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.
- 11d ago First seen · 88 lines · 60 tokens per session scan A 40a028094de1
golang-fullstack-error-handling is a skill published in the GitHub repository saifoelloh/golang-best-practices-skill (15 stars, last pushed 6mo ago), licensed MIT. It adds 60 tokens to every session and 821 once invoked, about $0.0003 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-30.
Other skills, from other repositories
go-add-migration
Create properly named PostgreSQL migration files for GOB microservices.
encore-go-database
Work with PostgreSQL in Encore Go using sqldb.NewDatabase from encore.dev/storage/sqldb — schema migrations and SQL queries.
mfd
A Go code generator that reads XML descriptions of a PostgreSQL schema and creates models, repositories, services, and test helpers. It is used through project Makefile commands.
golang-database
Comprehensive guide for Go database access. Covers parameterized queries, struct scanning, NULLable column handling, error patterns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use this skill whenever writing, reviewing, or debugging…
golang-samber-hot
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…