Go Package Builder skill for Claude and Codex
A compilable Go module skeleton: go.mod pinned to your Go version, an idiomatic package layout, a starter source file with doc comments, a README, and a…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when starting a new Go module or package from nothing and wanting go.mod, layout, starter code, README, and a first test that already pass go build and go test. Do not use for restructuring an existing Go codebase, or debugging a package that fails to compile. Related topics: coding, package.
What it will ask you for
- Module path (free text, e.g. "github.com/acme/ratelimit")
- Package name (free text, e.g. "ratelimit")
- What the package does (longer free text)
- Go version (choose one: 1.21, 1.22, 1.23, 1.24)
- License (choose one: MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, Unlicense)
- Dependencies (choose any: github.com/stretchr/testify, golang.org/x/sync, github.com/google/uuid, log/slog only, none)
- Kind of module (choose one: Library package only, Library with a cmd binary, CLI tool)
- Include an example test (choose one: Yes, No)
How it works
- Pick the directory layout from the module kind (library root, cmd directory, internal) so nothing importable leaks that should stay private.
- Write go.mod with the module path, go directive, and only the selected dependencies at current stable versions.
- Write the starter source file with a package doc comment, one exported type and constructor, and a doc comment on every exported identifier.
- Add the table-driven test and a compiling Example function when the test is enabled, using the selected test library.
- Write the README with install, a usage snippet that matches the real API, and the license, then confirm every file compiles together.
What you get
One markdown response with a file list, then each file as a path line followed by a fenced code block, ordered go.mod, source, test, README, and a license note.
What it watches out for
- Putting code in a pkg or src directory out of habit, which is not idiomatic and makes import paths longer for no gain.
- Writing a README usage snippet that calls a function the starter file never defines.
- Naming the package util or common, which says nothing to importers and collides with other modules.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.