Pretty sure Anthropic and other providers prepend these "official" system prompts to your conversation even if you send in a custom system prompt otherwise it would be trivial to produce CSAM, etc.
CSAM, and other harms, are typically detected using a set of specially trained, faster and cheaper models (and out of band matching techniques) that run before and after the main model.
Any mention in the system prompt is mostly defense in depth, and to make refusals more graceful.
Also, the system prompt, or even something reinforced on every message, is nowhere near as strong as its internal training or as an external safeguard.
If the prompt were the only protection, it would be extremely easy to produce illegal content after a long session.
I don’t think so. If you start a new Claude Code session without a system prompt, it doesn’t even know what model it is and hallucinates being some old variant of Sonnet.
at the least it takes away thousands of tokens in the most important part of the context window (!)
also see the comment by comboy on contradictions not helping performance
the system prompt is the most important part of the instruction you can give the model
it comes before everything else + the model is trained to pay extra attention to it
edit: that's also why in smol (minimalist agent harness) there currently is no system prompt at all (you can add one easily if you want to though)
https://github.com/smol-env/smol
the context window is precious
it should be filled with your task and helpful context for that task