Source profileQuality 91/100Review permissions

johnqtcg/awesome-skills/skills/go-error-review/SKILL.md

go-error-review

Review Go code for error handling correctness, nil safety, and failure-path integrity including ignored errors, missing wrapping, panic misuse, SQL/HTTP resource lifecycle, and transaction patterns. Trigger when code contains error returns, panic calls, sql.Rows, transactions, HTTP client/server code, or nil-sensitive pointer operations. Use for error-handling and correctness-focused review.

Source repository stars
30
Declared platforms
0
Static risk flags
2
Last source update
2026-08-22
Source checked
2026-08-25

Decision brief

What it does: where it fits

Review Go code for error handling correctness, nil safety, and failure-path integrity including ignored errors, missing wrapping, panic misuse, SQL/HTTP resource lifecycle, and transaction patterns. Trigger when code contains error returns, panic calls, sql.

Best for

  • Code contains error return values
  • Code uses panic / recover
  • Code involves sql.Rows, transactions, connection pools

Not for

  • Security vulnerabilities → go-security-review
  • Concurrency safety → go-concurrency-review

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-error-review"
Safe inspection promptEditorial

Inspect the Agent Skill "go-error-review" from https://github.com/johnqtcg/awesome-skills/blob/d63cf368c1b106871b56454bd73c293701bef500/skills/go-error-review/SKILL.md at commit d63cf368c1b106871b56454bd73c293701bef500. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Define scope — files/diff under review. Apply Generated Code Exclusion Gate. 2. Gather evidence — read changed files, identify error-handling patterns: if err != nil, =, panic(, sql.Rows, tx., resp.Body, []T. 3. Load references — always load go-error-and-quality.md (error sec…

    Define scope — files/diff under review. Apply Generated Code Exclusion Gate.Gather evidence — read changed files, identify error-handling patterns: if err != nil, =, panic(, sql.Rows, tx., resp.Body, []T.Load references — always load go-error-and-quality.md (error sections); load go-api-http-checklist.md when net/http code present; load go-database-patterns.md when database code present.
  2. 02

    Review Discipline

    Error handling, nil safety, failure-path integrity only — not security, concurrency, performance, style, tests, or logic

    Error handling, nil safety, failure-path integrity only — not security, concurrency, performance, style, tests, or logicFor every function call: "what happens when it fails?"Execute ALL 12 checklist items without skipping
  3. 03

    Purpose

    Audit Go code for error handling correctness, nil safety, and failure-path integrity. Core question for every function call: "What happens when it fails?"

    Audit Go code for error handling correctness, nil safety, and failure-path integrity. Core question for every function call: "What happens when it fails?"This skill merges error handling + API request/response correctness + database operation correctness because they share one review lens: "does this code handle failure correctly?"This skill does NOT cover: security vulnerabilities, concurrency safety, performance, code style, test quality, or business logic — those belong to sibling vertical skills.
  4. 04

    When To Use

    Code contains error return values

    Code contains error return valuesCode uses panic / recoverCode involves sql.Rows, transactions, connection pools
  5. 05

    When NOT To Use

    Security vulnerabilities → go-security-review

    Security vulnerabilities → go-security-reviewConcurrency safety → go-concurrency-reviewPerformance optimization → go-performance-review

Permission review

Static risk signals and limitations

Runs scripts

medium · line 28

The documentation asks the agent to run terminal commands or scripts.

Never claim tests ran unless they actually did. If not run: state reason + exact command.

Reads files

low · line 44

The documentation asks the agent to read local files, directories, or repositories.

**"defer f.Close() ignoring error"** — acceptable for **read-only** file opens. Flag only for **write** operations where Close flushes buffered data.

Runs scripts

medium · line 135

The documentation asks the agent to run terminal commands or scripts.

`go test`: PASS | FAIL | Not run (reason + command)

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars30SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
johnqtcg/awesome-skills
Skill path
skills/go-error-review/SKILL.md
Commit
d63cf368c1b106871b56454bd73c293701bef500
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Go Error Review

Purpose

Audit Go code for error handling correctness, nil safety, and failure-path integrity. Core question for every function call: "What happens when it fails?"

This skill merges error handling + API request/response correctness + database operation correctness because they share one review lens: "does this code handle failure correctly?"

This skill does NOT cover: security vulnerabilities, concurrency safety, performance, code style, test quality, or business logic — those belong to sibling vertical skills.

When To Use

  • Code contains error return values
  • Code uses panic / recover
  • Code involves sql.Rows, transactions, connection pools
  • Code involves HTTP request/response body handling
  • Code operates on []*T pointer slices

When NOT To Use

  • Security vulnerabilities → go-security-review
  • Concurrency safety → go-concurrency-review
  • Performance optimization → go-performance-review
  • Code style → go-quality-review
  • Business logic → go-logic-review

Mandatory Gates

1) Execution Integrity Gate

Never claim tests ran unless they actually did. If not run: state reason + exact command.

2) Go Version Gate

Read go.mod. Key features:

  • errors.Is / errors.As (Go 1.13+)
  • errors.Join (Go 1.20+)
  • fmt.Errorf with multiple %w (Go 1.20+)

3) Anti-Example Suppression Gate

MUST quote specific code evidence. Category match alone insufficient.

Embedded anti-examples:

  • "Missing error handling on json.Marshal" — when marshaling known-safe struct with only primitive fields (string, int, bool, no interface fields). json.Marshal on such structs always returns nil error.
  • "Missing error wrapping" — when caller already wraps; adding another layer creates redundant context like "create user: insert user: insert row: ...". Cite the caller's wrapping code.
  • "Speculative nil dereference" — when caller is internal and always passes non-nil. Cite the caller code proving it never passes nil.
  • "Should use errors.Is instead of ==" — direct == against sentinel from the same package is acceptable. Cross-package comparison must use errors.Is.
  • "defer f.Close() ignoring error" — acceptable for read-only file opens. Flag only for write operations where Close flushes buffered data.

4) Generated Code Exclusion Gate

Exclude: *.pb.go, *_gen.go, mock_*.go. Note excluded files in Execution Status.

Workflow

  1. Define scope — files/diff under review. Apply Generated Code Exclusion Gate.
  2. Gather evidence — read changed files, identify error-handling patterns: if err != nil, _ =, panic(, sql.Rows, tx., resp.Body, []*T.
  3. Load references — always load go-error-and-quality.md (error sections); load go-api-http-checklist.md when net/http code present; load go-database-patterns.md when database code present.
  4. Evaluate ALL 12 checklist items — for each function call, ask "what happens on failure?"
  5. Apply suppression → format output.

Grep-Gated Execution Protocol

This skill uses mechanical grep pre-scanning to guarantee zero missed checklist items. The model's attention is reserved for semantic judgment on grep hits and semantic-only items.

Execution Order

  1. Identify target files (from dispatch prompt, or write raw snippet to $TMPDIR/review_snippet.go)
  2. Run grep for ALL 12 checklist items against target files
  3. HIT → run semantic analysis to confirm or reject (true positive vs false positive)
  4. MISS → auto-mark NOT FOUND, skip semantic analysis for that item
  5. For compound patterns (item 12): run both grep patterns, apply AND logic
  6. Report only FOUND items (grep-confirmed + semantic-confirmed)

Grep Audit Line

Include in Execution Status: Grep pre-scan: X/12 items hit, Z confirmed as findings

Compound Pattern Protocol

Some items require two grep patterns. Run both:

  • Item 12 (Log-and-return): TRIGGER when log\.\|slog\. HIT AND return.*err HIT in same file

Error Checklist (12 Items)

Error Handling (High)

#ItemCode Pattern TriggersGrep Pattern
1Ignored error_ = or _ := on error-returning calls. Acceptable only for hash.Write, known-safe fmt.Fprintf to buffer_\s*[:=]=
2Missing error wrappingreturn err without fmt.Errorf("context: %w", err) at abstraction boundaryreturn\s+(nil,\s*)?err\b
3Panic misusepanic() for recoverable errors. Acceptable only in init() or unrecoverable invariant violationpanic\(
4Missing errors.Is/AsDirect == on error for cross-package sentinel; type switch instead of errors.Aserr\s*[!=]=\s*|[!=]=\s*err
5Pointer slice nil guard[]*T elements accessed without nil check before field/method access\[\]\*\w

API/HTTP Correctness (High)

#ItemCode Pattern TriggersGrep Pattern
6Unbounded server bodyMissing http.MaxBytesReader / io.LimitReader on body decode. Do NOT require r.Body.Close() — framework handles itr\.Body|Request\.Body|ReadAll
7Client response body leakresp.Body not closed on ALL paths including error path — prevents connection reuseresp\.Body|Response\.Body
8HTTP status code mismatch200 for creation (should be 201), 500 for not-found (should be 404)WriteHeader|StatusCode|http\.Status

Database Correctness (High)

#ItemCode Pattern TriggersGrep Pattern
9Unclosed sql.RowsMissing defer rows.Close() AFTER error check; missing rows.Err() after iteration loop\.Query[^R]|\.QueryRow|sql\.Rows
10Wrong transaction rollback patternMissing defer tx.Rollback() + Commit override pattern\.Begin\(|tx\.
11sql.ErrNoRows mishandledTreating as server error (500) instead of domain "not found" (404)ErrNoRows
12Log-and-return double reportingLogging error AND returning it — causes duplicate log entries upstreamlog\.|slog\. (compound: ALSO check return.*err in same file)

Severity Rubric

High — Resource leak, crash, silent failure, data inconsistency.

Medium — Suboptimal error handling that makes debugging harder but no immediate failure.

Evidence Rules

  • For each finding: explain what happens on the failure path
  • For resource leaks: show the code path where Close/Rollback is missed
  • For body leaks: show the error-path branch that skips Close
  • Merge rule: same issue at ≥3 locations → one finding with location list

Output Format

Findings

[High|Medium] Short Title

  • ID: ERR-NNN
  • Location: path:line
  • Impact: What happens when this code path fails
  • Evidence: The missing error check / resource close / wrapping
  • Recommendation: Specific fix
  • Action: must-fix | follow-up

Suppressed Items

[Suppressed] Short Title

  • Reason: Anti-example matched + evidence cited

Execution Status

  • Go version: X.Y
  • Grep pre-scan: X/12 items hit, Z confirmed as findings
  • go test: PASS | FAIL | Not run (reason + command)
  • Excluded (generated): list or None
  • References loaded: list

Summary

1-2 lines with finding count.

Example Output

### Findings

#### [High] Response Body Leak in HTTP Client
- **ID:** ERR-001
- **Location:** `internal/client/api.go:45`
- **Impact:** Connection pool exhaustion — resp.Body not closed on error path
- **Evidence:** `resp, err := client.Do(req)` at L42; if `resp.StatusCode != 200` at L44, function returns error at L46 without closing resp.Body. Body only closed on happy path at L52.
- **Recommendation:** Move defer immediately after nil-error check:
  ```go
  resp, err := client.Do(req)
  if err != nil { return err }
  defer resp.Body.Close()
  • Action: must-fix

[High] Missing rows.Err() After Iteration

  • ID: ERR-002
  • Location: internal/repo/order.go:78
  • Impact: Silent data truncation — if iteration breaks due to network error, partial results returned without error
  • Evidence: for rows.Next() { ... } loop at L73-80 exits without checking rows.Err()
  • Recommendation: Add after loop: if err := rows.Err(); err != nil { return nil, fmt.Errorf("iterating orders: %w", err) }
  • Action: must-fix

Suppressed Items

[Suppressed] json.Marshal Error Ignored

  • Reason: json.Marshal(config) at config.go:30 — config is AppConfig struct with only primitive fields. Anti-example: "known-safe struct with no interface fields"

Execution Status

  • Go version: 1.21
  • Grep pre-scan: 5/12 items hit, 2 confirmed as findings
  • go test: PASS
  • Excluded (generated): None
  • References loaded: go-error-and-quality.md, go-api-http-checklist.md, go-database-patterns.md

Summary

2 High findings (response body leak, missing rows.Err). No Medium findings.


## No-Finding Case
If no issues found: state `No error handling findings identified.` Still output Execution Status.

## Load References Selectively

| Reference | Load When |
|-----------|-----------|
| `references/go-error-and-quality.md` | Always (error handling sections) |
| `references/go-api-http-checklist.md` | Code involves net/http, handlers, gin/echo/chi, gRPC |
| `references/go-database-patterns.md` | Code involves database/sql, pgx, sqlx, gorm, ent |
| `references/go-review-anti-examples.md` | Always |

## Review Discipline
- **Error handling, nil safety, failure-path integrity only** — not security, concurrency, performance, style, tests, or logic
- For every function call: **"what happens when it fails?"**
- Execute ALL 12 checklist items without skipping
- Server handler `r.Body`: do NOT require manual Close (framework handles it)
- Client `resp.Body`: MUST be closed on all paths

Frequently asked questions

What to verify before installation and use

What does the go-error-review source document cover?

Review Go code for error handling correctness, nil safety, and failure-path integrity including ignored errors, missing wrapping, panic misuse, SQL/HTTP resource lifecycle, and transaction patterns. Trigger when code contains error returns, panic calls, sql.

How do I install go-error-review?

The source record exposes this install command: npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-error-review". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script, read-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 9834,322

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.

Computed 9815

getcargohq/cargo-skills

cargo-orchestration

Make Cargo actually run something, or show what it would run — execute one connector action, run a multi-step workflow, trigger a batch across a whole segment or model, message an AI agent, build or edit a node graph, draw a workflow, tool or play as a diagram, and query the runtime tables (runs, batches, spans, records) with SQL. Triggers: "run this on all my contacts", "execute the action", "kick off a batch", "build a workflow", "schedule a play", "make it run every morning", "ask the agent",

Computed 973,093

NVIDIA/skills

vss-deploy-detection-tracking-2d

Use this skill when the user wants to deploy, run, debug, tear down, or call the REST API of the RTVI-CV 2D detection / tracking microservice. Trigger when the user says things like 'deploy rtvi-cv', 'start warehouse 2d', 'add a stream', 'check rtvi-cv health', or 'stop the perception container'. Not for VLM, embedding, or analytics — use the matching vss-* skill.

Computed 97149

UiPath/skills

uipath-coded-apps

UiPath Coded Apps — scaffold, build, run, and deploy Coded Web Apps and Coded Action Apps: React/TypeScript apps that call UiPath Cloud APIs via the `@uipath/uipath-typescript` SDK and ship to Automation Cloud (push/pull to Studio Web, pack, publish, deploy, OAuth-PKCE). Also generates live analytics & governance dashboards from a plain-language request, wired to tenant data via the Insights real-time API, with edit and deploy flows. For RPA→uipath-rpa, Python agents→uipath-agents, Maestro flows