ilude/claude-code-config/go-workflow
Claude Code and agent skill by ilude/claude-code-config
- community
Checking that the SKILL.md file is still in the repository.
Go project workflow guidelines. Activate when working with Go files (.go), go.mod, Go modules, golang, or Go-specific tooling.
Install
npx vskill@latest install ilude/claude-code-config/go-workflowSKILL.md
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Go Projects Workflow
Guidelines for working with Go projects using modern tooling.
Tool Grid
| Task | Tool | Command | |
|---|---|---|---|
| Lint | golangci-lint | golangci-lint run | |
| Format | goimports | goimports -w . | |
| Build | go build | go build ./... | |
| Test | go test | go test ./... | |
| Coverage | go test | go test -cover ./... | |
| Fuzzing | native | go test -fuzz=Fuzz | |
| Race detection | built-in | go test -race ./... | |
| Vulnerability | govulncheck | govulncheck ./... |
Go Modules
go.mod Management
- You MUST use Go modules for all new projects
- You SHOULD run
go mod tidyafter adding or removing dependencies - You MUST NOT commit a go.mod with
replacedirectives unless for local development - You SHOULD use exact version pinning for critical dependencies
go.sum Handling
- You MUST commit go.sum to version control
- You SHOULD NOT manually edit go.sum
- Run
go mod verifyto check integrity
Dependency Updates
Error Handling
Error Wrapping
- You MUST wrap errors with context using
fmt.Errorfand%w - You SHOULD include the operation that failed in the error message
Custom Error Types
- You SHOULD define custom error types for domain-specific errors
- You MUST implement the
errorinterface
Error Checking
- You MUST use
errors.Is()for sentinel error comparison - You MUST use
errors.As()for type assertion on errors
Sentinel Errors
- You SHOULD define sentinel errors as package-level variables
- You MUST use
errors.New()for simple sentinel errors
Context Propagation
Function Signatures
- You MUST pass
context.Contextas the first parameter - You MUST name the parameter
ctx
Context Usage
- You MUST NOT store context in structs
- You SHOULD check for context cancellation in long-running operations
- You SHOULD use
context.WithTimeoutorcontext.WithDeadlinefor operations with time limits
Context Values
- You SHOULD avoid using
context.WithValuefor passing optional parameters - Context values SHOULD only be used for request-scoped data (trace IDs, auth tokens)
- You MUST use typed keys to avoid collisions
Concurrency Patterns
Goroutines
- You MUST NOT start goroutines without a way to stop them
- You SHOULD use
sync.WaitGroupto wait for goroutines to complete - You MUST handle panics in goroutines
Channels
- You SHOULD prefer channels for communication between goroutines
- You MUST close channels from the sender side only
- You SHOULD use buffered channels when the number of items is known
Sync Package
- You SHOULD use
sync.Mutexfor protecting shared state - You SHOULD use
sync.RWMutexwhen reads significantly outnumber writes - You SHOULD use
sync.Oncefor one-time initialization
Testing
Table-Driven Tests
- You SHOULD use table-driven tests for testing multiple cases
Test Fixtures
- You SHOULD place test data in a
testdata/directory - The
testdata/directory is ignored by the Go toolchain
Test Helpers
- You SHOULD use
t.Helper()in test helper functions - Helper functions SHOULD take
testing.TBto work with both tests and benchmarks
Race Detection
- You MUST run tests with
-raceflag in CI - You SHOULD run
go test -race ./...locally before pushing
Project Structure
Standard Layout
Package Organization
cmd/SHOULD contain only main packages with minimal logicinternal/MUST contain code that SHOULD NOT be imported by other projectspkg/MAY contain code intended for external use- You SHOULD avoid deeply nested package structures
Main Package
- The
mainpackage SHOULD be minimal - You SHOULD move business logic to internal packages
Naming Conventions
General Rules
- You MUST use MixedCaps (PascalCase for exported, camelCase for unexported)
- You MUST NOT use underscores in Go names
- You SHOULD use short names for local variables with small scope
Package Names
- Package names MUST be lowercase, single-word
- You MUST NOT use underscores or mixedCaps
- Package name SHOULD NOT repeat the import path
Interface Names
- Single-method interfaces SHOULD end in -er suffix
- You SHOULD NOT prefix interface names with "I"
Acronyms
- Acronyms SHOULD be all caps or all lowercase
- You MUST be consistent within a project
Interface Design
Accept Interfaces, Return Structs
- Function parameters SHOULD accept interfaces when possible
- Functions SHOULD return concrete types
Small Interfaces
- You SHOULD define small, focused interfaces
- You SHOULD compose larger interfaces from smaller ones
Interface Location
- Interfaces SHOULD be defined where they are used, not where they are implemented
- This allows consumers to define only what they need
Common Patterns
Functional Options
- You SHOULD use functional options for configurable constructors
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/go-workflow/SKILL.md
Popularity
- Repository stars
- 7
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ilude/claude-code-config/go-workflow)