upvote
there is literally a --system-prompt flag for claude code. In my mitmproxy experiments using that flag appended to the existing system prompt rather than replacing it. So I had to create a little helper to strip the system prompt sent over the wire and add my own.

here is a collection of public system prompts from claude code: https://github.com/Piebald-AI/claude-code-system-prompts

reply
Use --system-prompt-file, it will replace the whole system prompt (https://code.claude.com/docs/en/cli-reference ). You'll have to use a shell alias or function or something to always append this flag when calling Claude Code but you don't need any MitM shenanigans. Then use "/context all" to see what else is sent (here I would recommend MitM'ing since Claude Code won't show the exact tools and text), there are a lot of tools no one needs and they are bloating the context, you can deny these in the settings.json (there is also a list here: https://code.claude.com/docs/en/tools-reference ). Also set "disableClaudeAiConnectors" to false to remove even more bloat.
reply
I tried both --system-prompt and --system-prompt-file. they both appended when i tried about 6 months ago and watched the traffic. Yes I cleanup all those tools etc.
reply
--system-prompt-file replaces the prompt, I use it myself and the docs state it, too.
reply