A local HTTP proxy that sits between Claude Code and the Anthropic API. It rewrites the system prompt before forwarding — letting you swap in custom personalities, tone, or style instructions.
go run . -port 8080Then start Claude Code pointing at the proxy:
ANTHROPIC_BASE_URL=http://localhost:8080 claudeCreate a prompts/ directory to modify the system prompt before it reaches Anthropic.
Replace an entire system prompt block by index:
prompts/system-2-replace.txt
The file contents become the new text for that block.
Create prompts/replacements.yaml:
- block: 2
find: |
# Tone and style
- Your responses should be short and concise.
replace: |
# Custom personality
You are a friendly pirate. Respond in pirate speak.
- block: 3
find: "some text"
replace: "new text"
disabled: true # skip this ruleFull replacement files take precedence over find-and-replace rules for the same block. Unmatched find rules log a warning.
The Claude Code system prompt is an array of text blocks. Typically:
| Index | Content |
|---|---|
| 0 | Billing metadata |
| 1 | Identity intro |
| 2 | Main instructions, tone, and style |
| 3 | Memory and environment |
Blocks 0 and 1 are generally left unchanged. Blocks 2 and 3 are where personality and style live.
Opt-in with the -log flag:
go run . -port 8080 -logEach API call creates files in requests/ named {timestamp}-{request-id}-{model}-{part}.json:
tools.json— tool definitionsmessages.json— conversation messagessystem.json— system promptusage.json— token usage from the response