go-structure

go-structure is a skill for Claude Code from sgaunet/claude-plugins. It costs 57 tokens per session (3,160 once invoked), scanned A, original, MIT.

A guide for organizing Go code according to the kind of project being built, such as a command-line tool, web API, library, or monorepo.

In plain words
What is it for?
Use it when starting or reviewing a Go project, moving from a flat layout to a clearer one, or setting up several Go services in one repository.
Why use it?
It helps avoid confusing package layouts, unnecessary nesting, generic dumping-ground packages, and circular dependencies. A monorepo is one repository containing multiple projects or services.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the go-specialist plugin — 11 skills, 1 agent shipped together

Good fit Use it when starting or reviewing a Go project, moving from a flat layout to a clearer one, or setting up several Go services in one repository.

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

Made for: Claude Code.

Or install go-specialist, the plugin that ships this one along with the rest of its 11 skills, 1 agent.

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-structure

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sgaunet/claude-plugins/go-structure"><img src="https://agentmods.dev/badge/skills/sgaunet/claude-plugins/go-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,160 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00057 $0.03160
Opus 5.5 $0.00023 $0.01264
Sonnet 5.5 $0.00011 $0.00632
Haiku 4.5 $0.00006 $0.00316

Measured 3mo ago against content hash 7ceff4e181ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-structure 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 3mo 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.

plugins/go-specialist/skills/go-structure/SKILL.md · 373 lines

How it starts

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

Go Project Structure

Recommend and scaffold idiomatic Go project layouts. Matches structure to project type and size — start simple, grow when needed.

When to Use

  • Initializing a new Go project or module
  • User asks about project layout or directory organization
  • Reviewing an existing project for structural anti-patterns
  • Migrating from flat layout to a more structured one
  • Setting up a monorepo with multiple services

Prerequisites

  1. go.mod exists or will be created: The project must be a Go module.
  2. Project type is known or inferrable: CLI tool, REST API, library, or monorepo.

Core Principle

Simplicity first, complexity when necessary. Do not impose structure upfront. Let it emerge from actual needs. A single main.go is a valid starting point.

Anti-Patterns to Flag

Anti-Pattern Problem Fix
Generic package names (utils, helpers, common, base) Become dumping grounds, convey no intent Rename to specific purpose: validator, auth, cache
Over-nesting (internal/services/user/handlers/http/v1/) Cognitive load, cumbersome imports Flatten to internal/user/handler.go
Circular dependencies (A imports B, B imports A) Compilation error, poor separation Extract shared types into a separate package or use interfaces
Business logic in HTTP handlers Couples domain to transport, hard to test Move to service layer, handlers only do HTTP concerns
The main.go monster (all logic in one file) Untestable, circular deps, impossible to maintain Extract into packages; main.go only wires deps and starts
Shared database across microservices Distributed monolith, schema changes break all services Each service owns its data; communicate via APIs
Using pkg/ for non-library code Misleading signal, unnecessary indirection Move to internal/ or project root
Premature cmd/ for single-binary projects Unnecessary nesting Keep main.go at root until multiple binaries are needed
Hardcoded DB credentials / config values Security risk, not deployable across environments Use env vars or config system; never commit secrets

Read the full file on GitHub · 373 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. 3mo ago First seen · 373 lines · 57 tokens per session scan A 7ceff4e181ed

Subscribe to this mod's changes

go-structure is a skill published in the GitHub repository sgaunet/claude-plugins (19 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 3,160 once invoked, about $0.0002 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-08-30.

Related

go-structure compared with skills from other repositories

go-structure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-structuresgaunet/claude-pluginsSkill191mo agoMITA57Claude Code
better-authsecondsky/claude-skillsSkill257todayMITA53Claude Code
hono-routingsecondsky/claude-skillsSkill257todayMITA41Claude Code
cloudflare-workers-multi-langsecondsky/claude-skillsSkill257todayMITA45Claude Code
dotnet-analyzersNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A45Claude Code
dotnet-testNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A35Claude Code
dotnet-dependencyNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A35Claude Code