Claude Code

How do you configure Claude Code with a custom system prompt?

QUICK ANSWER

Set a custom system prompt in Claude Code by editing the configuration file or using the configuration slash command: '/config set systemPrompt "<your-prompt>"'.

Terminal Command Example

Run the configuration command directly in the terminal interface:

/config set systemPrompt "Write code output strictly matching ECMAScript 2022 standards."

This setting updates the active user configuration profile and will persist across future restarts.

Verified against: Claude Code CLI v0.2.5