Go SDK — Git skill for Claude Code
by anthropics - 官方 Go 客户端库.
How to install Go SDK
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open anthropics/anthropic-sdk-go and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Go SDK does
Alternatives in Git
- Claude Code GitHub Issues — by anthropics - 问题反馈和功能请求 81.1k ★
- Anthropic 课程 — by anthropics - 官方课程材料 19.7k ★
- Claude Code Base Action — This repo is a mirror of the contents of base-action in https://github.com/anthropics/claude-code-action 799 ★
README
Claude SDK for Go
The Claude SDK for Go provides access to the [Claude API](https://docs.anthropic.com/en/api/) from Go applications.
Documentation
Full documentation is available at **[platform.claude.com/docs/en/api/sdks/go](https://platform.claude.com/docs/en/api/sdks/go)**.
Installation
import (
"github.com/anthropics/anthropic-sdk-go" // imported as anthropic
)
Or explicitly add the dependency:
go get -u 'github.com/anthropics/anthropic-sdk-go@v1.28.0'
Getting started
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"), // defaults to os.LookupEnv("ANTHROPIC_API_KEY")
)
message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
MaxTokens: 1024,
Messages: []anthropic.MessageParam{
anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")),
},
Model: anthropic.ModelClaudeOpus4_6,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", message.Content)
}
Requirements
Go 1.22+
Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Related Skills
Agent SDK Go
A Go port of Claude Agent SDK https://github.com/anthropics/claude-agent-sdk-python
Claude Agent SDK Java
No longer maintained — active development moved to https://github.com/markpollack/claude-agent-sdk-java
Claude Code Hooks SDK
by beyondcode - A Laravel-inspired PHP SDK for building Claude Code hook responses with a clean, fluent API. T
Claude Code JS
GitHub Repo stars Claude Code SDK for Javascript & Typescript JS/TS SDK
Claude Agent SDK Go
Port of the official Python SDK to Go
Claude Agent Sdk.Github.Io
Claude Agent SDK questions answered honestly: where claude.com sends developers, why subscription and API bill
Related Agents
Claude Mem
A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresse
Auto Claude
by AndyMik90 - Autonomous multi-agent coding framework for Claude Code (Claude Agent SDK) that integrates the
Agentica Agent
You are a specialized agent for building Python agents using the Agentica SDK. You implement agentic functions