Claude Skill

go-development

Use when developing Go applications, implementing job schedulers or cron (netresearch/go-cron, ofelia), Docker API integrations, LDAP/AD clients, building resilient services with retry logic, setting up Go test suites (unit/integration/fuzz/mutation), or running golangci-lint.

LLM Mart · 0 points · 0 views 57 listing impressions 0 install-command copies
Download netresearch-go-development-skill-skills_go-development-e2ecc3d.zip · 87 KB

Install

skills CLI npx skills add https://github.com/netresearch/go-development-skill/tree/main/skills/go-development
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install netresearch-go-development-skill@llmmart
Git git clone https://github.com/netresearch/go-development-skill.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole netresearch/go-development-skill collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Go Development Patterns

Core Principles

Type Safety

  • Avoid: interface{} (use any), sync.Map, scattered type assertions, reflection
  • Prefer: Generics [T any], errors.AsType[T] (Go 1.26), concrete types
  • Run go fix ./... after upgrades

Consistency

  • One pattern per problem domain
  • Match existing codebase patterns
  • Refactor holistically or not at all
  • Config precedence: defaults < config file < env vars < flags

Testing

  • Build tags isolate test tiers: unit (default), integration, e2e
  • Always use t.Parallel(), t.Helper(), table-driven subtests
  • Use log/slog directly -- never wrap it in custom Logger interfaces

Conventions

  • Naming: ID, URL, HTTP (not Id, Url, Http) — not tool-enforced (ST1003 is off by default)
  • Error wrapping: fmt.Errorf("failed to process: %w", err)

References

Git hooks: ls lefthook.yml 2>/dev/null && lefthook install || echo "Add lefthook — see references/lefthook-template.md"

Load as needed:

Reference Purpose
references/architecture.md Package structure, state mutation completeness
references/logging.md Structured logging with log/slog, migration from logrus
references/cron-scheduling.md go-cron patterns: named jobs, runtime updates, resilience
references/resilience.md Pointer to go-cron's built-in retry/circuit-breaker/timeout wrappers
references/docker.md Docker client patterns, buffer pooling
references/ldap.md LDAP/Active Directory integration
references/testing.md Build tags, resource isolation, race gotchas
references/linting.md golangci-lint v2, staticcheck
references/api-design.md Enum/status defensive handling
references/fuzz-testing.md Go fuzzing patterns, security seeds
references/contracts-and-invariants.md Contracts, invariants, property tests
references/mutation-testing.md Gremlins configuration, test quality measurement
references/makefile.md Standard Makefile interface for CI/CD
references/modernization.md go fix modernizers and their build-tag trap, errors.AsType[T], b.Loop
references/dependencies.md Upgrades: go get -u all, majors, build-set scoping
references/lefthook-template.md Ready-to-use lefthook.yml for Go project git hooks
references/branch-protection.md Ruleset watermark: three-ruleset gate, bypass modes
references/reusable-workflows.md Reusable Actions workflow callers, permission propagation, release-gate outputs
references/single-build-release.md Single-build release: cross-compile once, reuse for release+container
references/awesome-go-submission.md awesome-go submission: CI-parsed PR body, name collisions

Quality Gates

Run before completing any review:

golangci-lint run --timeout 5m    # Linting
go vet ./...                       # Static analysis
staticcheck ./...                  # Additional checks
govulncheck ./...                  # Vulnerability scan
go test -race ./...                # Race detection

Stdlib Vulnerability Fixes

When govulncheck reports stdlib vulnerabilities: check fix version via vuln.go.dev, update go X.Y.Z in go.mod, run go mod tidy.


Contributing: Submit improvements to https://github.com/netresearch/go-development-skill

Files (go-development-skill)
  • evals
    • evals.json 10.7 KB
      Loading…
  • references
    • api-design.md 2.1 KB
      Loading…
    • architecture.md 1.9 KB
      Loading…
    • awesome-go-submission.md 7.3 KB
      Loading…
    • branch-protection.md 6.5 KB
      Loading…
    • contracts-and-invariants.md 8.3 KB
      Loading…
    • cron-scheduling.md 10.4 KB
      Loading…
    • dependencies.md 14.5 KB
      Loading…
    • docker.md 11.2 KB
      Loading…
    • fuzz-testing.md 4.1 KB
      Loading…
    • ldap.md 24.4 KB
      Loading…
    • lefthook-template.md 2.4 KB
      Loading…
    • linting.md 15.7 KB
      Loading…
    • logging.md 10.2 KB
      Loading…
    • makefile.md 6.2 KB
      Loading…
    • modernization.md 15.8 KB
      Loading…
    • mutation-testing.md 9.7 KB
      Loading…
    • resilience.md 853 B
      Loading…
    • reusable-workflows.md 9.9 KB
      Loading…
    • single-build-release.md 13.3 KB
      Loading…
    • testing.md 16.9 KB
      Loading…
  • scripts
    • verify-go-project.sh 2.5 KB
      Loading…
  • checkpoints.yaml 6.3 KB
    Loading…
  • SKILL.md 4 KB
    ---
    # SPDX-License-Identifier: CC-BY-SA-4.0
    # SPDX-FileCopyrightText: Netresearch DTT GmbH
    name: go-development
    description: "Use when developing Go applications, implementing job schedulers or cron (netresearch/go-cron, ofelia), Docker API integrations, LDAP/AD clients, building resilient services with retry logic, setting up Go test suites (unit/integration/fuzz/mutation), or running golangci-lint."
    license: "(MIT AND CC-BY-SA-4.0). See LICENSE-MIT and LICENSE-CC-BY-SA-4.0"
    compatibility: "Requires go 1.21+, golangci-lint, docker."
    metadata:
      author: Netresearch DTT GmbH
      version: "1.16.5"
      repository: https://github.com/netresearch/go-development-skill
    allowed-tools: Bash(go:*) Bash(make:*) Bash(docker:*) Bash(golangci-lint:*) Read Write Glob Grep
    ---
    
    # Go Development Patterns
    
    ## Core Principles
    
    ### Type Safety
    
    - **Avoid:** `interface{}` (use `any`), `sync.Map`, scattered type assertions, reflection
    - **Prefer:** Generics `[T any]`, `errors.AsType[T]` (Go 1.26), concrete types
    - Run `go fix ./...` after upgrades
    
    ### Consistency
    
    - One pattern per problem domain
    - Match existing codebase patterns
    - Refactor holistically or not at all
    - Config precedence: defaults < config file < env vars < flags
    
    ### Testing
    
    - Build tags isolate test tiers: unit (default), `integration`, `e2e`
    - Always use `t.Parallel()`, `t.Helper()`, table-driven subtests
    - Use `log/slog` directly -- never wrap it in custom Logger interfaces
    
    ### Conventions
    
    - Naming: ID, URL, HTTP (not Id, Url, Http) — not tool-enforced (ST1003 is off by default)
    - Error wrapping: `fmt.Errorf("failed to process: %w", err)`
    
    ## References
    
    Git hooks: `ls lefthook.yml 2>/dev/null && lefthook install || echo "Add lefthook — see references/lefthook-template.md"`
    
    Load as needed:
    
    | Reference | Purpose |
    |-----------|---------|
    | `references/architecture.md` | Package structure, state mutation completeness |
    | `references/logging.md` | Structured logging with log/slog, migration from logrus |
    | `references/cron-scheduling.md` | go-cron patterns: named jobs, runtime updates, resilience |
    | `references/resilience.md` | Pointer to go-cron's built-in retry/circuit-breaker/timeout wrappers |
    | `references/docker.md` | Docker client patterns, buffer pooling |
    | `references/ldap.md` | LDAP/Active Directory integration |
    | `references/testing.md` | Build tags, resource isolation, race gotchas |
    | `references/linting.md` | golangci-lint v2, staticcheck |
    | `references/api-design.md` | Enum/status defensive handling |
    | `references/fuzz-testing.md` | Go fuzzing patterns, security seeds |
    | `references/contracts-and-invariants.md` | Contracts, invariants, property tests |
    | `references/mutation-testing.md` | Gremlins configuration, test quality measurement |
    | `references/makefile.md` | Standard Makefile interface for CI/CD |
    | `references/modernization.md` | `go fix` modernizers and their build-tag trap, `errors.AsType[T]`, `b.Loop` |
    | `references/dependencies.md` | Upgrades: `go get -u all`, majors, build-set scoping |
    | `references/lefthook-template.md` | Ready-to-use lefthook.yml for Go project git hooks |
    | `references/branch-protection.md` | Ruleset watermark: three-ruleset gate, bypass modes |
    | `references/reusable-workflows.md` | Reusable Actions workflow callers, permission propagation, release-gate outputs |
    | `references/single-build-release.md` | Single-build release: cross-compile once, reuse for release+container |
    | `references/awesome-go-submission.md` | awesome-go submission: CI-parsed PR body, name collisions |
    
    ## Quality Gates
    
    Run before completing any review:
    
    ```bash
    golangci-lint run --timeout 5m    # Linting
    go vet ./...                       # Static analysis
    staticcheck ./...                  # Additional checks
    govulncheck ./...                  # Vulnerability scan
    go test -race ./...                # Race detection
    ```
    
    ## Stdlib Vulnerability Fixes
    
    When `govulncheck` reports stdlib vulnerabilities: check fix version via `vuln.go.dev`, update `go X.Y.Z` in `go.mod`, run `go mod tidy`.
    
    ---
    
    > **Contributing:** Submit improvements to https://github.com/netresearch/go-development-skill
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.