go-strict

go-strict is a skill for Claude Code, Codex from 0xMassi/claude-skills. It costs 82 tokens per session (3,474 once invoked), scanned A, original, MIT.

A set of coding, security, and code-organization rules for Go programs. It covers adding context to errors, validating inputs, handling HTTP responses, managing concurrency, and using structured logs.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring Go services and applications, including programs built with Gin and zerolog.
Why use it?
It makes failures easier to trace and helps prevent ignored errors, unsafe input handling, leaked resources, and concurrency bugs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing, reviewing, or refactoring Go services and applications, including programs built with Gin and zerolog.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0xmassi/claude-skills/go-strict
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 0xMassi/claude-skills --skill go-strict
Clone the repo
git clone --depth 1 https://github.com/0xMassi/claude-skills

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 go-strict

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xmassi/claude-skills/go-strict/github.svg)](https://agentmods.dev/skills/0xmassi/claude-skills/go-strict)
Your own site
<a href="https://agentmods.dev/skills/0xmassi/claude-skills/go-strict"><img src="https://agentmods.dev/badge/skills/0xmassi/claude-skills/go-strict/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 go-strict

Your own site · 80×15
<a href="https://agentmods.dev/skills/0xmassi/claude-skills/go-strict"><img src="https://agentmods.dev/badge/skills/0xmassi/claude-skills/go-strict.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,474 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.
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.00082 $0.03474
Opus 5 $0.00041 $0.01737
Sonnet 5 $0.00016 $0.00695
Haiku 4.5 $0.00008 $0.00347

Measured 11d ago against content hash b1d12dad1d2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

go-strict 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.

go-strict/SKILL.md · 490 lines

How it starts

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

Go Strict Standard

Rules extracted from 2 production Go services.

CRITICAL: Error Handling

GO-01: Always wrap errors with context

// BAD: no context, impossible to trace
if err != nil {
    return err
}

// GOOD: fmt.Errorf with %w for wrapping
store, err := createStore(path)
if err != nil {
    return nil, fmt.Errorf("create store: %w", err)
}

// GOOD: multiple levels of context
session, err := validateToken(token)
if err != nil {
    return fmt.Errorf("validate session for user %s: %w", userID, err)
}

GO-02: Check errors immediately, never defer

// BAD: error ignored
json.Unmarshal(data, &result)

// GOOD
if err := json.Unmarshal(data, &result); err != nil {
    return fmt.Errorf("unmarshal response: %w", err)
}

GO-03: Drain response bodies for connection reuse

resp, err := http.Get(url)
if err != nil {
    return fmt.Errorf("request failed: %w", err)
}
defer resp.Body.Close()

if resp.StatusCode != http.StatusOK {
    io.Copy(io.Discard, resp.Body) // DRAIN before closing
    return fmt.Errorf("unexpected status: %d", resp.StatusCode)
}

GO-04: Typed errors for API responses

type APIError struct {
    Status  int    `json:"status"`
    Message string `json:"message"`
    Code    string `json:"code,omitempty"`
}

func (e *APIError) Error() string {
    return fmt.Sprintf("[%d] %s", e.Status, e.Message)
}

func SendError(c *gin.Context, status int, message string) {
    c.JSON(status, APIError{Status: status, Message: message})
}

CRITICAL: Package Organization

GO-05: internal/ for private, pkg/ for reusable

project/
├── cmd/
│   └── server/
│       └── main.go              # Entry point only: no logic
├── internal/
│   ├── handlers/                # HTTP handlers (Gin)
│   ├── middleware/              # Auth, rate limit, CORS, validation
│   ├── services/                # Business logic
│   ├── models/                  # Data structures
│   ├── config/                  # Env var loading
│   └── utils/                   # Helpers
├── pkg/
│   ├── redis/                   # Reusable Redis client
│   └── sqlite/                  # Reusable SQLite wrapper
├── go.mod
└── go.sum

Read the full file on GitHub · 490 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. 11d ago First seen · 490 lines · 82 tokens per session scan A b1d12dad1d2a

Subscribe to this mod's changes

go-strict is a skill published in the GitHub repository 0xMassi/claude-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 82 tokens to every session and 3,474 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

go-code-reviewer

Review Go code with a defect-first approach using repository policy (constitution.md first, then AGENTS.md fallback). Use for code review, PR review, quality checks, risk analysis, and regression detection.

johnqtcg/awesome-skills · 45 tokens

go-review-lead

Orchestrate a comprehensive Go code review by triaging code changes, dispatching vertical review skills (security, concurrency, error, logic, performance, quality, test, observability) as parallel agents, then consolidating results into a unified report. Use for full Go PR review or comprehensive code review. Replaces…

johnqtcg/awesome-skills · 80 tokens

go-concurrency-review

Review Go code for concurrency safety and goroutine lifecycle issues including race conditions, deadlocks, goroutine leaks, mutex misuse, and context propagation. Trigger when code contains go func, channels, sync primitives, WaitGroup, errgroup, or goroutine lifecycle management. Use for concurrency-focused review of…

johnqtcg/awesome-skills · 67 tokens

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…

johnqtcg/awesome-skills · 75 tokens

go-performance-review

Review Go code for performance issues including slice/map pre-allocation, string concatenation, N+1 queries, connection pool configuration, sync.Pool, memory alignment, lock scope, buffered I/O, and HTTP transport tuning. Trigger when code contains make(), loops, database queries, string building, sync primitives…

johnqtcg/awesome-skills · 80 tokens

go-quality-review

Review Go code for code quality, style, and modern Go practices including function length, nesting depth, naming, mutable globals, interface design, receiver consistency, modern Go idioms (slog, generics, typed atomics), and static analysis. Trigger when reviewing Go code structure, readability, or maintainability.…

johnqtcg/awesome-skills · 79 tokens