All skills
openshift avatar

/effective-go

@68cf559 official
by openshiftopenshift/hypershift543 stars
576

Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.

Use this Skill: https://skilld.dev/gh/openshift/hypershift/effective-go

This session only. Nothing lands on disk.

SKILL.md

≈52 tokens always: the name and description. ≈273 when used: this file.

Effective Go

Apply best practices and conventions from the official Effective Go guide to write clean, idiomatic Go code.

When to Apply

Use this skill automatically when:

  • Writing new Go code
  • Reviewing Go code
  • Refactoring existing Go implementations

Key Reminders

Follow the conventions and patterns documented at https://go.dev/doc/effective_go, with particular attention to:

  • Formatting: Always use gofmt - this is non-negotiable
  • Naming: No underscores, use MixedCaps for exported names, mixedCaps for unexported
  • Error handling: Always check errors; return them, don't panic
  • Concurrency: Share memory by communicating (use channels)
  • Interfaces: Keep small (1-3 methods ideal); accept interfaces, return concrete types
  • Documentation: Document all exported symbols, starting with the symbol name

References

Source: SKILL.md on GitHub

1 warning5mo5 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    This skill provides static guidelines for writing idiomatic Go code based on official documentation. It contains no executable code, makes no network requests, and has no security risks.

  • Socket6mo

    No alerts

  • Snyk7mo

    Risk: LOW · No issues

  • Runlayer7mo

    1/1 file flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 68cf559. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last year
  • Go
  • golang
  • best-practices
  • code-review
  • idioms
  • formatting
  • naming-conventions
  • error-handling
  • concurrency
  • interfaces

README badge

README badge for openshift/hypershift/effective-go

Applies Go idioms and conventions from the official Effective Go guide during code writing, review, and refactoring. Enforces gofmt formatting, naming conventions (MixedCaps/mixedCaps), error handling patterns, channel-based concurrency, small interfaces, and documentation standards.

Generated from the current SKILL.md.

Does this skill enforce gofmt automatically?
No. The skill reminds you to use gofmt as a requirement, but doesn't run it—you or your agent must apply gofmt explicitly.
Does this cover the entire Effective Go guide?
Yes. The skill references the full guide at golang.org/doc/effective_go and emphasizes key areas: formatting, naming, error handling, concurrency, interfaces, and documentation.
Can I use this skill for code review?
Yes. The skill is designed to be applied when reviewing Go code to ensure implementations follow idiomatic conventions and best practices.
Does this skill provide linting or static analysis?
No. It's an instruction guide for applying Go conventions manually. Use separate linting tools like golangci-lint for automated checks.

Generated from the current SKILL.md. These answers refresh after source changes.