gin

gin is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 33 tokens per session (1,268 once invoked), scanned A, original, MIT.

A Go web framework for routing requests, handling responses, and adding middleware. Middleware is shared code that runs around requests, such as logging or recovery from errors.

In plain words
What is it for?
Use it to build REST APIs and Go microservices with routes, JSON input handling, validation, logging, and recovery middleware.
Why use it?
It provides a ready-made structure for Go APIs, including request binding and tools for preventing one handler crash from stopping the whole service.

Skill for Claude CodeCodex

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

Good fit Use it to build REST APIs and Go microservices with routes, JSON input handling, validation, logging, and recovery middleware.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/g1joshi/agent-skills/gin
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 G1Joshi/Agent-Skills --skill gin
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-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 gin

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/gin"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/gin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,268 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.00033 $0.01268
Opus 5.5 $0.00013 $0.00507
Sonnet 5.5 $0.00007 $0.00254
Haiku 4.5 $0.00003 $0.00127

Measured 22d ago against content hash 2d86600fa5bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gin 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 22d 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.

skills/frameworks/gin/SKILL.md · 185 lines

How it starts

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

Gin

Gin is a high-performance HTTP web framework written in Go, featuring a fast radix-tree router, composable middleware chains, and structured request validation.

When to Use

  • High-Throughput Go Microservices: Building low-latency web services with martini-like API and fast radx tree routing.
  • JSON REST APIs: Serializing and deserializing payloads with strong validation and minimal allocation overhead.
  • Microservice Middleware Stacks: Implementing custom logging, auth, rate limiting, and recovery middleware.
  • File Upload & Static Asset Serving: Fast static asset handling and multipart streaming.

Quick Start

package main

import (
	"net/http"
	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()

	r.GET("/api/ping", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{"message": "pong"})
	})

	r.Run(":8080")
}

Core Concepts

Radix Tree Routing & Parameter Binding

Fast route matching with typed model binding:

package main

import (
	"net/http"
	"github.com/gin-gonic/gin"
)

type CreateAccountRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required,min=8"`
}

func main() {
	r := gin.New()
	r.Use(gin.Logger())
	r.Use(gin.Recovery())

	v1 := r.Group("/api/v1")
	{
		v1.GET("/health", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{"status": "UP"})
		})

		v1.POST("/accounts", func(c *gin.Context) {
			var req CreateAccountRequest
			if err := c.ShouldBindJSON(&req); err != nil {
				c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
				return
			}
			c.JSON(http.StatusCreated, gin.H{"email": req.Email, "id": 1001})
		})
	}

	_ = r.Run(":8080")
}

Custom Middleware Pipeline

Intercepting requests and calculating execution latency:

package main

import (
	"log"
	"time"
	"github.com/gin-gonic/gin"
)

func LatencyTracker() gin.HandlerFunc {
	return func(c *gin.Context) {
		start := time.Now()
		c.Next() // Process subsequent handlers

		latency := time.Since(start)
		status := c.Writer.Status()
		log.Printf("[GIN] %s %s | %d | %v", c.Request.Method, c.Request.URL.Path, status, latency)
	}
}

Read the full file on GitHub · 185 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. 22d ago Changed · +5 lines 2d86600fa5bc
  2. 26d ago Changed · +135 lines · +16 tokens per session 18a1e2ea15d1
  3. 1mo ago First seen · 45 lines · 17 tokens per session scan A 13fb57e6b0eb

Subscribe to this mod's changes

gin is a skill published in the GitHub repository G1Joshi/Agent-Skills (15 stars, last pushed 22d ago), licensed MIT. It adds 33 tokens to every session and 1,268 once invoked, about $0.0001 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

go-programming-expert

Expert-level skill for Go programming (Go 1.24+ / 1.25+). Covers Swiss Table maps, weak pointers, synctest concurrency testing, tool directives, sqlc, net/http, and microservices in English and Indonesian.

roedyrustam/vibes-plug · 57 tokens

grpc-golang

Build production-ready gRPC services in Go with mTLS, streaming, and observability. Use when designing Protobuf contracts with Buf or implementing secure service-to-service transport.

tmolavi/mcp-agent-skills-hub · 38 tokens

dbos-golang

Guide for building reliable, fault-tolerant Go applications with DBOS durable workflows. Use when adding DBOS to existing Go code, creating workflows and steps, or using queues for concurrency control.

tmolavi/mcp-agent-skills-hub · 44 tokens

golang-pro

Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices. Expert in the latest Go ecosystem including generics, workspaces, and cutting-edge frameworks. Use PROACTIVELY for Go development, architecture design, or performance optimization.

tmolavi/mcp-agent-skills-hub · 61 tokens

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmani/agent-skills · 49 tokens

golang-graphql

Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports github.com/99designs/gqlgen or github.com/graph-gophers/graphql-go.

samber/cc-skills-golang · 77 tokens