go-interfaces

Installation
SKILL.md

Go Interface Design

Extension Contract (4 parts)

1. Interface (small, 1-4 methods)

type ChatModel interface {
    Generate(ctx context.Context, msgs []schema.Message, opts ...GenerateOption) (*schema.AIMessage, error)
    Stream(ctx context.Context, msgs []schema.Message, opts ...GenerateOption) iter.Seq2[schema.StreamChunk, error]
    BindTools(tools []tool.Tool) ChatModel
    ModelID() string
}

2. Hooks (all fields optional, nil = skip)

type Hooks struct {
Related skills
Installs
8
GitHub Stars
12
First Seen
Feb 10, 2026