shindakun

Agent SDK Go — Git skill for Claude Code

Git community

A Go port of Claude Agent SDK https://github.com/anthropics/claude-agent-sdk-python.

How to install Agent SDK Go

This entry records only its repository, not the path inside it, so there is no exact command to give. Open shindakun/agent-sdk-go and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent SDK Go does

A Go port of Claude Agent SDK https://github.com/anthropics/claude-agent-sdk-python.

Alternatives in Git

README

agent-sdk-go

[![Lint](https://github.com/shindakun/agent-sdk-go/actions/workflows/lint.yml/badge.svg)](https://github.com/shindakun/agent-sdk-go/actions/workflows/lint.yml) [![Test](https://github.com/shindakun/agent-sdk-go/actions/workflows/test.yml/badge.svg)](https://github.com/shindakun/agent-sdk-go/actions/workflows/test.yml)

A Go SDK for building agents with Claude Code — a faithful, idiomatic-Go port of Anthropic's official [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) (Python and TypeScript). Addresses [claude-agent-sdk-python#498](https://github.com/anthropics/claude-agent-sdk-python/issues/498), the upstream request for a Go SDK.

Like the official SDKs, this is **not** a reimplementation of the agent loop. It drives the user-installed `claude` Code CLI as a subprocess, speaking newline-delimited `stream-json` over stdin/stdout plus a bidirectional JSON control protocol on the same stream. The CLI owns the agent loop, built-in tools, and context management; this SDK owns process lifecycle, framing, control-protocol correlation, and dispatch of in-process callbacks (permissions, hooks, and SDK MCP tools).

Verified against **Claude Code CLI 2.1.280** (the version the upstream SDK bundles, pinned as `claude.SupportedCLIVersion`), statically (133/133 public names, 49/49 options) and behaviorally (integration and e2e suites that run against the real binary). `claude.CheckCLIVersion` reports the installed binary's version and whether it matches the pin.

Installation

go get github.com/shindakun/agent-sdk-go

Requirements:

  • Go 1.26+
  • A working claude binary on PATH (or via WithCLIPath): npm install -g @anthropic-ai/claude-code
  • Claude Code auth — either ANTHROPIC_API_KEY in the environment, or an active Claude Code session.

Quick start

package main

import (
	"context"
	"fmt"

	claude "github.com/shindakun/agent-sdk-go"
)

func main() {
	ctx := context.Background()
	for msg, err := ran