Skip to content
Agentmart
Submit a tool

golang

Expert Go developer.

Skill by https://github.com/lrstanley

IndexedMIT★ 1
Write a review

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/lrstanley-golang

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.

We use your email only for this newsletter. Privacy

About

Expert Go developer. Use when building Go applications, designing interfaces, writing tests, profiling, working with goroutines, HTTP servers/clients, error handling, tracing, CLI tools, generics, caching, writing Go documentation, structured logging, and more.

Use cases: writing

No 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/golang

What's inside

Skill name
golang
Description
Expert Go developer. Use when building Go applications, designing interfaces, writing tests, profiling, working with goroutines, HTTP servers/clients, error handling, tracing, CLI tools, generics, caching, writing Go documentation, structured logging, and more.
License
MIT
Metadata
role: specialist · scope: implementation · author: https://github.com/lrstanley · domain: language · triggers: Go, Golang, goroutines, channels, REST, microservices, generics, generic methods, interfaces, CLI, ORM, database, pprof, goroutineleak, benchmarks, testing, synctest, httptest, HTTP client, tracing, OpenTelemetry, OTEL, error handling, context, logging, JSON, encoding/json/v2, documentation, godoc, go doc, clix, chix, caching · output-format: code · related-skills: golang-tui, golang-packages
Instructions
137 lines in SKILL.md · view on GitHub

Files (19)

  • SKILL.md
  • benchmarking.md · references/
  • caching.md · references/
  • cli-tools.md · references/
  • concurrency.md · references/
  • context.md · references/
  • documentation.md · references/
  • errors.md · references/
  • generics.md · references/
  • http-clients.md · references/
  • http-servers.md · references/
  • interfaces.md · references/
  • json.md · references/
  • logging.md · references/
  • pprof.md · references/
  • project-structure.md · references/
  • scheduling.md · references/
  • testing.md · references/
  • tracing.md · references/

SKILL.md (first lines)

# Golang

Senior Go developer with deep expertise in Go 1.27+, concurrent programming, and
cloud-native microservices. Specializes in idiomatic patterns, performance
optimization, and production-grade systems.

## Core Workflow

1. **Analyze architecture** — Review module structure, interfaces, and concurrency patterns
2. **Design interfaces** — Create small, focused interfaces with composition
3. **Implement** — Write idiomatic Go with proper error handling and context propagation; run `go vet ./...` before proceeding
4. **Lint & validate** — Run `golangci-lint run` and fix all reported issues before proceeding
5. **Optimize** — Eliminate allocations
6. **Test** — Table-driven tests with `-race` flag, fuzzing; confirm race detector passes before committing

## Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When |
| --- | --- | --- |
| Concurrency | `references/concurrency.md` | Goroutines, channels, select, sync primitives, leaks |
| Context | `references/context.md` | Context values, request-scoped metadata, cancellation propagation |
| Errors | `references/errors.md` | Error wrapping, sentinel errors, `errors.Is`/`As`, custom error types |
| Interfaces | `references/interfaces.md` | Interface design, io.Reader/Writer, composition |
| Generics | `references/generics.md` | Type parameters, generic methods, constraints, generic patterns |
| Testing | `references/testing.md` | Table-driven tests, synctest, httptest, mocks, fuzzing, coverage |
| Benchmarking | `references/benchmarking.md` | `go test -bench`, `-benchmem`, `-benchtime`, `-trace`, profiles |
| Profiling (pprof) | `references/pprof.md` | CPU/heap/`goroutineleak` profiles, `go tool pprof`, contention, leaks |
| Logging | `references/logging.md` | Structured logging, JSON logging |
| JSON | `references/json.md` | `encoding/json/v2`, struct tags, Options |
| Tracing | `references/tracing.md` | Distributed tracing, OpenTelemetry, spans, trace propagation |
| Documentation | `references/documentation.md` | Code comments, godoc conventions, deprecations, `//go:fix inline` |
| Project Structure | `references/project-structure.md` | Module layout, internal packages, go.mod |
| CLI Tools | `references/cli-tools.md` | CLI design, flags, subcommands, env vars, configuration |
| Scheduler | `references/scheduling.md` | Background jobs, cron schedules, long-running workers, graceful shutdown |
| HTTP Servers | `references/http-servers.md` | HTTP routing, middleware, logging, error handling, API design, h2c |
| HTTP Clients | `references/http-clients.md` | HTTP client config, transports, timeouts, retries, observability |
| Caching | `references/caching.md` | In-memory caching, FIFO, LRU, TTL |

## Core Pattern Example

Goroutine with proper context cancellation and error propagation:

```go
// worker runs until ctx is cancelled or an error occurs. Errors are returned via
// the errs channel; the caller must drain it.
func worker(ctx context.Context, jobs <-chan Job, errs chan<- error) {
    for {
        select {
        case <-ctx.Done():
            errs <- fmt.Errorf("worker cancelled: %w", ctx.Err())
            return
        case job, ok := <-jobs:
            if !ok {
                return // jobs channel closed; clean exit
            }
            if err := process(ctx, job); err != nil {
                errs <- fmt.Errorf("process job %v: %w", job.ID, err)
                return
            }
        }
    }
}

func runPipeline(ctx context.Context, jobs []Job) error {
    ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
    defer cancel()

    jobs := make(chan Job, len(jobs))
    errs := make(chan error, 1)

    go worker(ctx, jobs, errs)

    for _, j := range jobs {
        jobs <- j
    }
    close(jobs)

    select {
    case err := <-errs:
        return err
    case <-ctx.Done():
        return fmt.Errorf("pipeline timed out: %w", ctx.Err())
    }
}
```

Key properties demonstrated: bounded goroutine lifetime via `ctx`, error propagation with `%w`, no goroutine leak on cancellation.

## Constraints

### MUST DO

- Use gofumpt (when available, otherwise gofmt) and golangci-lint on all code
- Add context.Context to all blocking operations
- Handle all errors explicitly (no naked returns)
- Write table-driven tests with subtests
- Document all exported functions, types, and packages
- Propagate errors with `fmt.Errorf("%w", err)`, `errors.Join`
- Run tests with `-race` (race detector), `-count N`, `-cpu 1,8`, `-timeout T`

### MUST NOT DO

- Ignore errors (avoid _ assignment without justification)
- Use panic for normal error handling
- Create goroutines without clear lifecycle management
- Skip context cancellation handling
- Use reflection without performance justification
- Mix sync and async patterns carelessly
- Hardcode configuration (use functional options or env vars)
- Implementing `min`, `max` or other functions that are now built-in (Go 1.21+)
- Explicitly define a variable that is only consumed in one place (e.g. `foo := bar(); use(foo)`, just do `use(bar())` instead)
- Use legacy `foo := foo` in loops on Go 1.22+ codebases
- Fork a dependency and patch it locally unless explicitly asked to do so (implement workaroudn OR halt and ask how to proceed)
- Import `encoding/json` in new code; use `encoding/json/v2` (existing v1 call sites are fine)

## Output Templates

From lrstanley/skills, MIT.

More from lrstanley/skills

Signals

Stars
1
Forks
1
Open issues
0
Last commit (this folder)
Oct 12, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from https://github.com/lrstanley

Cite this page

golang skill. Agent Mart. https://agentmart.dev/skills/lrstanley-golang (last updated 2026-10-24)