Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

System Prompts & Conversation Control in Go

Video #02 — Claude API in Go Series Publish date: 2026-06-08 Type: Lightweight Est. duration: ~14 min

What we cover

  • How to pass a system prompt to the Claude API in Go
  • Shaping Claude's persona, tone, and output format with the System field
  • How system prompts persist across multi-turn conversations
  • Practical examples: formal assistant, code reviewer, JSON-only responder

Prerequisites

  • Go 1.23+
  • ANTHROPIC_API_KEY environment variable set
  • Familiarity with basic Claude API calls (see episode 01)

Running the example

export ANTHROPIC_API_KEY=your_key_here
go run main.go

Project structure

.
├── README.md
├── go.mod
├── go.sum
└── main.go