golang

Specify and validate Go conventions for formatting, error handling, concurrency, and testing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Pyl-Tech/stream-coding --skill golang-pyl-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang
Source: https://github.com/Pyl-Tech/stream-coding/tree/main/.agents/skills/golang
Command: npx skills add https://github.com/Pyl-Tech/stream-coding --skill golang-pyl-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents broken Go implementations by forcing a documentation-first specification that can be checked by gates before any code is produced or shipped.

Core Features & Use Cases

  • Formatting enforcement: Requires gofmt and goimports to be validated in CI to remove style ambiguity.
  • Design and interface constraints: Standardizes interface usage (small interfaces, interface placement) to improve maintainability.
  • Production-grade error handling: Requires contextual error wrapping and explicit enumeration of error messages in the spec.
  • Mandatory testing patterns: Requires table-driven tests, -race, and coverage targets to reduce regressions.
  • Security and concurrency guardrails: Enforces gosec scanning and context.WithTimeout for external calls, plus concurrency checks like goroutine leak prevention.

Use case: When building a Go service that calls external APIs and stores data, this Skill ensures the spec defines timeouts, dependencies, error cases, and table-driven tests so verification gates can approve the result.

Quick Start

Activate the golang Skill when you are writing or reviewing .go code and describe your changes as a spec that includes formatting requirements, error cases, security constraints, and table-driven tests.

Frequently Asked Questions about golang

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Go formatting and error handling conventions in CI?

To enforce Go conventions in CI, validate gofmt and goimports checks, require contextual error wrapping, and document explicit error messages in your spec before code is produced or shipped.

What testing patterns should I use for reliable Go codebases?

For reliable Go codebases, use table-driven unit tests, run tests with the -race flag, and enforce coverage targets to reduce regressions and catch concurrency issues early.

How do I prevent goroutine leaks and secure external API calls in Go?

Prevent goroutine leaks and secure external API calls in Go by enforcing gosec scanning for security vulnerabilities and requiring context.WithTimeout for all external calls to prevent hanging.

What is the best way to specify and verify Go language conventions?

The best way to specify and verify Go conventions is using a documentation-first specification that defines formatting, error cases, security constraints, and table-driven tests for CI-ready verification gates.

Does this approach to Go code review check concurrency and interface design?

Yes, this Go code review approach checks concurrency, security, and quality, while standardizing interface usage by enforcing small interfaces and proper interface placement to improve maintainability.