Back to Skills

go-fundamentals

verified

Core Go programming concepts - syntax, types, interfaces, error handling

View on GitHub

Marketplace

pluginagentmarketplace-go

pluginagentmarketplace/custom-plugin-go

Plugin

go-development-assistant

Repository

pluginagentmarketplace/custom-plugin-go
3stars

skills/go-fundamentals/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-go/blob/main/skills/go-fundamentals/SKILL.md -a claude-code --skill go-fundamentals

Installation paths:

Claude
.claude/skills/go-fundamentals/
Powered by add-skill CLI

Instructions

# Go Fundamentals Skill

Master core Go programming concepts for production-ready applications.

## Overview

Comprehensive skill covering Go syntax, type system, interfaces, and idiomatic error handling patterns following Effective Go and Google Go Style Guide.

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| topic | string | yes | - | Topic to learn: "types", "interfaces", "errors", "packages" |
| level | string | no | "intermediate" | Skill level: "beginner", "intermediate", "advanced" |
| include_examples | bool | no | true | Include code examples |

## Validation Rules

```go
func ValidateRequest(req SkillRequest) error {
    validTopics := []string{"types", "interfaces", "errors", "packages", "structs"}
    if !slices.Contains(validTopics, req.Topic) {
        return fmt.Errorf("invalid topic %q: must be one of %v", req.Topic, validTopics)
    }
    return nil
}
```

## Core Topics

### Types & Structs
```go
type User struct {
    ID        int64     `json:"id" db:"id"`
    Name      string    `json:"name" db:"name"`
    Email     string    `json:"email" db:"email"`
    CreatedAt time.Time `json:"created_at" db:"created_at"`
}

func (u *User) Validate() error {
    if u.Name == "" {
        return errors.New("name is required")
    }
    if !strings.Contains(u.Email, "@") {
        return errors.New("invalid email format")
    }
    return nil
}
```

### Interface Design
```go
// Small, focused interfaces
type Reader interface {
    Read(p []byte) (n int, err error)
}

type Writer interface {
    Write(p []byte) (n int, err error)
}

// Composition over inheritance
type ReadWriter interface {
    Reader
    Writer
}
```

### Error Handling
```go
// Sentinel errors
var (
    ErrNotFound     = errors.New("not found")
    ErrUnauthorized = errors.New("unauthorized")
)

// Error wrapping with context
func GetUser(id int64) (*User, error) {
    user, err := db.FindByID(id)
    if err !

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4022 chars