pn-go-scaffolding

pn-go-scaffolding is a skill for Cursor from perniemann/pnCore. It costs 51 tokens per session (1,309 once invoked), scanned A, original, MIT.

A starting structure for Go web APIs and handlers using frameworks such as Gin, Fiber, Echo, or Chi.

In plain words
What is it for?
Use it when creating a Go API, adding routes or domain modules, or setting up a new Go backend.
Why use it?
It prevents new Go services from becoming disorganised by setting conventions for folders, configuration, errors, secrets, and database access.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it when creating a Go API, adding routes or domain modules, or setting up a new Go backend.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-go-scaffolding
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 perniemann/pnCore --skill pn-go-scaffolding
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-go-scaffolding

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-go-scaffolding"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-go-scaffolding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,309 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.00051 $0.01309
Opus 5 $0.00026 $0.00655
Sonnet 5 $0.00010 $0.00262
Haiku 4.5 $0.00005 $0.00131

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

Security

Grade A, and why

pn-go-scaffolding 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 7d 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.

packages/pn-core-mcp/content/skills/backend/pn-go-scaffolding/SKILL.md · 212 lines

How it starts

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

Go backend scaffolding

When to use

  • Starting a new Go API project.
  • Adding a new handler, route group, or domain package.
  • Establishing project structure from scratch.

Project structure

# Standard Go layout
cmd/
  server/
    main.go           # Entry point: init config, DB, router, start server
internal/
  users/
    handler.go        # HTTP handlers for the users domain
    service.go        # Business logic
    repository.go     # DB queries for users
    model.go          # User struct + domain types
  orders/
    handler.go
    service.go
    repository.go
  middleware/
    auth.go
    logger.go
    recover.go
  config/
    config.go         # Typed config from env vars
  db/
    db.go             # DB connection pool setup
  apierr/
    errors.go         # Sentinel errors + HTTP mapping
go.mod
go.sum
.env.example
  • cmd/ for binary entry points.
  • internal/ for everything that is not a public library. Prevents external packages from importing your internals.
  • Never put business logic in main.go.

Gin scaffold

// internal/users/handler.go
package users

import (
	"net/http"
	"strconv"

	"github.com/gin-gonic/gin"
	"yourmodule/internal/apierr"
)

type Handler struct {
	svc *Service
}

func NewHandler(svc *Service) *Handler {
	return &Handler{svc: svc}
}

func (h *Handler) RegisterRoutes(rg *gin.RouterGroup) {
	rg.POST("", h.Create)
	rg.GET("/:id", h.GetByID)
}

func (h *Handler) Create(c *gin.Context) {
	var req CreateUserRequest
	if err := c.ShouldBindJSON(&req); err != nil {
		c.JSON(http.StatusBadRequest, gin.H{"error": gin.H{"code": "BAD_REQUEST", "message": err.Error()}})
		return
	}
	user, err := h.svc.Create(c.Request.Context(), req)
	if err != nil {
		apierr.Respond(c, err)
		return
	}
	c.JSON(http.StatusCreated, gin.H{"data": user})
}

func (h *Handler) GetByID(c *gin.Context) {
	id, err := strconv.ParseInt(c.Param("id"), 10, 64)
	if err != nil {
		c.JSON(http.StatusBadRequest, gin.H{"error": gin.H{"code": "BAD_REQUEST", "message": "Invalid ID"}})
		return
	}
	user, err := h.svc.GetByID(c.Request.Context(), id)
	if err != nil {
		apierr.Respond(c, err)
		return
	}
	c.JSON(http.StatusOK, gin.H{"data": user})
}

Read the full file on GitHub · 212 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. 7d ago First seen · 212 lines · 51 tokens per session scan A 310626622528

Subscribe to this mod's changes

pn-go-scaffolding is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 1,309 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-09-03.