golang-patterns

This skill provides a reference guide for idiomatic Go programming, covering best practices for error handling, concurrency, interface design, project structure, and performance optimization.

9.8K
Installs
4
Use cases
5/10
Quality

Is golang-patterns safe to install?

Safe to install

Safe to install: our audit of golang-patterns's source files found 12 shell commands, 0 external URLs, no file writes (none risk). Every command and URL listed appears verbatim in the skill's source. The skill provides documentation and code examples. It does not perform file system operations or network requests itself, though it lists shell commands for the user to execute.

How we audit skills: our security review methodology.

Who is this skill for?

Go developers seeking to write maintainable, efficient, and idiomatic code.

What can you do with it?

  • Refactoring existing Go codebases for better readability
  • Designing new Go packages and modules
  • Reviewing Go code for idiomatic patterns
  • Implementing standard project layouts and tooling configurations

How good is this skill?

Quality score: 5/10. The skill is a comprehensive, well-structured reference for Go development. It clearly distinguishes between idiomatic and non-idiomatic code with specific examples.

What does the skill file contain?

SKILL.md
# Go Development Patterns

Idiomatic Go patterns and best practices for building robust, efficient, and maintainable applications.

## When to Activate

- Writing new Go code
- Reviewing Go code
- Refactoring existing Go code
- Designing Go packages/modules

## Core Principles

### 1. Simplicity and Clarity

Go favors simplicity over cleverness. Code should be obvious and easy to read.

```go
// Good: Clear and direct
func GetUser(id string) (*User, error) {
    user, err := db.FindUser(id)
    if err != nil {
        return nil, fmt.Errorf("get user %s: %w", id, err)
    }
    return user, ni...

Frequently asked questions

Does this skill automatically refactor my code?

No. The skill provides patterns and examples for the user to apply manually.

What project structure does this skill recommend?

It recommends a standard layout including cmd/, internal/, pkg/, api/, and testdata/ directories.

Does this skill provide a linter configuration?

Yes, it includes a sample .golangci.yml configuration file with recommended linters like errcheck, gosimple, and staticcheck.

Data sourced from affaan-m/everything-claude-code on GitHub. Install counts from skills.sh. The summary and security audit are derived from the skill's source files: every command and URL listed appears verbatim in the source.

Related skills