skill-go-gin-api

skill-go-gin-api is a command for Claude Code from dewtech-technologies/dare-method. It costs 0 tokens per session (1,672 once invoked), scanned A, original, MIT.

A set of coding patterns for building REST APIs in Go, using Gin or Go’s standard HTTP package, PostgreSQL, and sqlc for generating database code.

In plain words
What is it for?
Use it to audit a Go API or scaffold features such as user endpoints, database queries, validation, and security middleware.
Why use it?
It gives an agent a consistent structure for API handlers, business logic, database access, validation, authentication, rate limits, and documentation.

Command for Claude Code

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.

agentmods
npx agentmods add commands/dewtech-technologies/dare-method/skill-go-gin-api
Clone the repo
git clone --depth 1 https://github.com/dewtech-technologies/dare-method

Made for: Claude Code.

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 skill-go-gin-api

README.md
[![agentmods](https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/skill-go-gin-api.svg)](https://agentmods.dev/commands/dewtech-technologies/dare-method/skill-go-gin-api)
Your own site
<a href="https://agentmods.dev/commands/dewtech-technologies/dare-method/skill-go-gin-api"><img src="https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/skill-go-gin-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01672
Opus 5 $0.00000 $0.00836
Sonnet 5 $0.00000 $0.00334
Haiku 4.5 $0.00000 $0.00167

Measured yesterday against content hash ba0de0fd3afe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-go-gin-api 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 yesterday.

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.

implementations/claude/.claude/commands/skill-go-gin-api.md · 233 lines

How it starts

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

/skill-go-gin-api

Padrões DARE para APIs REST em Go + Gin (ou stdlib net/http) + sqlc + PostgreSQL. Handlers, services, repositories, middleware, validador, JWT, rate limit, swag OpenAPI.

Como usar

/skill-go-gin-api                          # audita projeto Go
/skill-go-gin-api scaffold users           # gera handler + service + repo + sqlc query
/skill-go-gin-api migrate-validation       # extrai json.Unmarshal manual para binding tags

Stack canônica

  • Go 1.22+ (slog, errors.Is/As, generics)
  • Gin (preferido) ou stdlib net/http
  • sqlc (queries seguras geradas de SQL)
  • pgx v5
  • go-playground/validator (via Gin binding tags)
  • golang-jwt/jwt v5
  • swaggo/swag (OpenAPI)
  • testify + httptest
  • golangci-lint + govulncheck

Estrutura

cmd/server/main.go
internal/
├── handlers/       ← Handler
├── services/       ← Service
├── repositories/   ← Repository (sqlc)
├── domain/         ← Models + erros sentinela
├── middleware/
└── config/
db/
├── migrations/     ← golang-migrate
└── queries/        ← .sql para sqlc
sqlc.yaml

Handler

// @Summary Create user
// @Router /users [post]
func (h *UserHandler) Create(c *gin.Context) {
    var dto CreateUserDTO
    if err := c.ShouldBindJSON(&dto); err != nil {
        c.JSON(400, gin.H{"error": err.Error()})
        return
    }
    user, err := h.register.Execute(c.Request.Context(), dto.ToService())
    if err != nil {
        if errors.Is(err, domain.ErrUserAlreadyExists) {
            c.JSON(409, gin.H{"error": "USER_EXISTS"})
            return
        }
        c.JSON(500, gin.H{"error": "INTERNAL"})
        return
    }
    c.JSON(201, ToUserResponse(user))
}

DTO

type CreateUserDTO struct {
    Email    string `json:"email" binding:"required,email"`
    Name     string `json:"name" binding:"required,min=1,max=255"`
    Password string `json:"password" binding:"required,min=12"`
}

Service

type RegisterUser struct {
    repo *repositories.UserRepository
}

func (s *RegisterUser) Execute(ctx context.Context, in RegisterUserInput) (*domain.User, error) {
    exists, err := s.repo.ExistsByEmail(ctx, in.Email)
    if err != nil { return nil, err }
    if exists { return nil, domain.ErrUserAlreadyExists }
    return s.repo.Create(ctx, repositories.CreateUserParams{
        Email: in.Email,
        Name:  in.Name,
        PasswordHash: hashPassword(in.Password),
    })
}

Read the full file on GitHub · 233 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. yesterday First seen · 233 lines · 0 tokens per session scan A ba0de0fd3afe

Subscribe to this mod's changes

skill-go-gin-api is a command published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,672 tokens. 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.