agents/skills/go-project-setup/SKILL.md
Standardized setup for new Go (Golang) projects and services. Activate to ensure clean, idiomatic project structures (Standard Layout) and implement production-ready patterns (graceful shutdown, package separation) from day one.
npx skillsauth add googlecloudplatform/devrel-demos go-project-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides the creation of clean, idiomatic Go project structures.
cmd/, internal/).
pkg/ directory. (It is an anti-pattern common in Kubernetes but not idiomatic Go).cmd/ and internal/ when multiple binaries or private packages are needed.go.mod specifies the latest stable Go version (currently 1.24+).Ask the user: "Is this a simple tool, a library, or a multi-service repo?"
MANDATORY: You MUST read and use the templates provided in the assets/ directory. They establish idiomatic patterns like graceful shutdown, run functions, and package separation.
assets/cli-simple. Flat structure.assets/cli-cobra. For complex CLI tools.assets/library. Package in root, internal/ for hidden logic.assets/webservice.
cmd/app-name/main.go: Entry point using the run function pattern.internal/: Private application logic.assets/mcp-server.assets/game. Using Ebitengine.mkdir my-appgo mod init github.com/user/my-app.golangci.yml if the project requires rigorous style enforcement.assets/. Ensure module names are updated.go mod tidy and go build ./....references/project_layout.md: Official Go Module Layout guide.devops
Standardizes the creation of Sensitive Data Protection (DLP) templates for PII and credential redaction.
development
Implements the "Defense-in-Depth" integration pattern in Python (intercepting prompts, parsing filter results).
testing
Configures Model Armor security policies (Prompt Injection, Jailbreak, RAI filters).
tools
Assists developers in collecting and structuring a library of diverse examples ("Golden Dataset") required for data-driven evaluation, including tool trajectories.