go
Expert Go programming skill authored by spf13 (former Go team lead, author of Cobra, Viper, Hugo, Afero).
Skill by PascaleBeier
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/pascalebeier-go
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, testing, sales
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/go
What's inside
- Skill name
go- Description
- Expert Go programming skill authored by spf13 (former Go team lead, author of Cobra, Viper, Hugo, Afero). Covers idiomatic Go — package design, error handling, interfaces, concurrency, testing, and project layout, current through Go 1.27. Use whenever Go code is written, reviewed, debugged, or refactored — any .go file, go.mod, CLI tool, or web service, and whenever the user mentions Go or golang, even if they don't ask for "idiomatic" code.
- License
- MIT
- Instructions
- 793 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 793 lines (spec recommends under 500)
Files (2)
- plugin.json · .claude-plugin/
- SKILL.md
SKILL.md (first lines)
# Idiomatic Go: The Go Way
Idiomatic Go patterns and best practices for building robust, efficient, and maintainable applications.
## When to Activate
- Writing new Go code
- Reviewing or auditing existing Go code
- Refactoring Go code (especially code that looks like Java/Spring Boot patterns in Go)
- Designing Go packages, modules, or APIs
- Choosing between stdlib and third-party libraries
- Any question about Go project structure, error handling, concurrency, or testing
## Core Principles
### 1. Clear is Better than Clever
Go favors readability and simplicity over abstraction and cleverness. Code should be obvious. If you have to read a function three times to understand its control flow, it needs to be rewritten.
```go
// Idiomatic: Direct, linear control flow. Note: no "Get" prefix — Go omits it.
func LookupUser(id string) (*User, error) {
user, err := db.FindUser(id)
if err != nil {
return nil, fmt.Errorf("finding user %s: %w", id, err)
}
return user, nil
}
```
### 2. Make the Zero Value Useful
Design types so their zero value is immediately usable without initialization. This eliminates boilerplate constructors. `sync.Mutex` and `bytes.Buffer` are the gold standard for this.
```go
// Idiomatic: Ready to use immediately
type Counter struct {
mu sync.Mutex
count int
}
func (c *Counter) Inc() {
c.mu.Lock()
c.count++
c.mu.Unlock()
}
```
### 3. Return Early, Keep the Happy Path Left
Handle errors and edge cases immediately and return. Do not use `else` blocks for the main logic. The "happy path" of your function should never be indented.
## Package Organization: Flat by Default
**Anti-Pattern:** Using deeply nested directory trees or relying heavily on an `internal/` folder by default to artificially enforce "Clean Architecture" layers. This leads to circular dependencies and difficult navigation.
### 1. The Single-Package Default
Start flat. If you are building a microservice or a simple tool, put everything in the root directory (or alongside your `main.go`). Only create a new package when you truly need a new namespace to clarify the code, or when you need to decouple a strictly independent domain.
### 2. The Proper Use of `internal/`
The `internal/` directory has a specific compiler enforcement: it prevents other modules from importing the code inside it.
- **For Applications:** If you are building an executable binary, nobody can import your code anyway. Using `internal/` here is usually just adding unnecessary path depth.
- **For Libraries:** Use `internal/` sparingly. It should be reserved for complex subsystems where you need to share exported types between your own packages, but absolutely must prevent end-users from relying on those types.
```
// Idiomatic: A flat, feature-focused library or simple app
myproject/
├── main.go # Entry point (if application)
├── server.go # Core logic
├── config.go # Configuration
├── parser.go # Domain specific parsing
├── parser_test.go
├── go.mod
└── go.sum
```
### 3. Domain Packages for Service Applications
When an application has genuinely distinct, independently-testable domains, give each its own top-level package. The rule is still **one level deep** — no `internal/` nesting, no Clean Architecture layers. Each package owns one concern. `main.go` wires them together.
The signal to create a package: can this domain be described in one sentence, and does it have no knowledge of the other packages? If yes, it earns its own package.
```
// Idiomatic: A web service with distinct domain packages
myservice/
├── main.go # wires everything together; no business logic here
├── config/ # Config struct, env loading
├── auth/ # identity verification, session middleware
├── db/ # data store client + all queries
├── storage/ # blob storage (S3, R2, GCS)
├── billing/ # payment provider + credit ledger
├── jobs/ # job lifecycle + queue dispatch + worker handler (same domain, one package)
├── web/ # HTTP handlers + HTML templates + static assets (tightly coupled by design)
├── transcribe/ # domain-specific processing — independent pure functions
├── Makefile
├── Dockerfile
└── .env.example
```
**Rules for domain packages:**
- Each package has **one clear purpose** — name it after what it does, not what layer it is (`jobs/`, not `service/`)
- Packages do not import each other sideways — cycles are a sign of wrong boundaries; `main` is the wiring point
- Related sub-concerns that always travel together stay in one package (e.g. job creation + worker handler both live in `jobs/` because they share the job lifecycle domain)
- HTTP handlers and the templates they render belong together in `web/` — they are tightly coupled by design
- Do not create `utils/`, `helpers/`, or `common/` packages — these are symptoms of unclear ownership
**Anti-pattern to reject:** Clean Architecture / DDD layers (`service/`, `repository/`, `controller/`, `domain/`). These layer-named packages cause circular imports, force interface proliferation, and add zero clarity in Go. Domain-named packages (`auth/`, `billing/`, `jobs/`) are the correct middle ground between "too flat" and "over-engineered."
## Interface Design
### 1. Interfaces are Discovered, Not Designed Upfront
Write concrete types first. Only define an interface when you discover that multiple types need to be used interchangeably by a consumer.
### 2. Define Interfaces Where They Are UsedFrom PascaleBeier/hitkeep, MIT.
More from PascaleBeier/hitkeep
- 0.679score
hitkeep-development
PascaleBeier
Implement and route HitKeep contributions through the repository-owned hk developer platform.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
go-spec-reviewer
PascaleBeier
Review design specification documents for Go programs before implementation begins.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
cobra-viper
PascaleBeier
Expert skill for building CLI applications with Cobra and Viper, authored by spf13 — the original creator of both libraries.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
wails
PascaleBeier
Expert skill for building desktop applications in Go with Wails, covering both v2 (stable) and v3 (alpha).
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-ai-visibility-analyst
PascaleBeier
Analyze HitKeep AI visibility data.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-analytics
PascaleBeier
Official parent skill for analyzing HitKeep data through HitKeep MCP and official docs.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-traffic-diagnosis
PascaleBeier
Diagnose HitKeep traffic drops, spikes, source shifts, and suspicious changes.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-tracking-verifier
PascaleBeier
Verify HitKeep tracking setup and automatic event collection.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-workspace
PascaleBeier
Operate HitKeep safely in isolated Git worktrees.
SkillAFreshness: A★ 98Claude Code +9 - 0.671score
hitkeep-i18n
PascaleBeier
Maintain HitKeep dashboard localization.
SkillAFreshness: A★ 98Claude Code +9 - 0.671score
hitkeep-qa
PascaleBeier
Plan, execute, investigate, and report HitKeep quality gates through hk.
SkillAFreshness: A★ 98Claude Code +9 - 0.671score
hitkeep-ecommerce-analyst
PascaleBeier
Analyze HitKeep ecommerce and conversion data.
SkillAFreshness: A★ 98Claude Code +9
Signals
- Stars
- 98
- Forks
- 11
- Open issues
- 6
- Contributors
- 8
- Last commit (this folder)
- Aug 20, 2026 (2 months ago)
- Last release
- Oct 19, 2026 (11 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/PascaleBeier/hitkeep
- Website
- hitkeep.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from PascaleBeier
- 0.683score

HitKeep
PascaleBeier
Stateless 2026-07-28 read-only MCP server for aggregate HitKeep analytics and official docs.
ConnectorAFreshness: ARemote★ 98Claude Code +3 - 0.679score
hitkeep-development
PascaleBeier
Implement and route HitKeep contributions through the repository-owned hk developer platform.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
hitkeep-workspace
PascaleBeier
Operate HitKeep safely in isolated Git worktrees.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
cobra-viper
PascaleBeier
Expert skill for building CLI applications with Cobra and Viper, authored by spf13 — the original creator of both libraries.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
go-spec-reviewer
PascaleBeier
Review design specification documents for Go programs before implementation begins.
SkillAFreshness: A★ 98Claude Code +9 - 0.674score
wails
PascaleBeier
Expert skill for building desktop applications in Go with Wails, covering both v2 (stable) and v3 (alpha).
SkillAFreshness: A★ 98Claude Code +9
Cite this page
go skill. Agent Mart. https://agentmart.dev/skills/pascalebeier-go (last updated 2026-10-24)