$ recombobulate _
home / tips / add-custom-rules-without-breaking-the-default-prompt-with-append-system-prompt
0

Add Custom Rules Without Breaking the Default Prompt with --append-system-prompt

bagwaa @bagwaa · Mar 26, 2026 · Configuration
add-custom-rules-without-breaking-the-default-prompt-with-append-system-prompt

The --system-prompt flag replaces Claude's entire default prompt, which strips away all built-in context about tools, safety, and coding behaviour. Most of the time, you just want to add a few extra rules on top, not replace everything.

# Add a project-specific constraint to the default prompt
claude --append-system-prompt "Always use TypeScript strict mode and never use 'any'"

# Load rules from a file for longer instruction sets
claude --append-system-prompt-file ./team-rules.txt

The append flags add your text to the end of the default system prompt without replacing it. Claude retains all its built-in capabilities and still knows how to use tools correctly, but now has your additional constraints in context for the full session.

This is ideal for:

  • Enforcing coding conventions on a specific project
  • Adding a reminder about a framework version ("This project uses Laravel 11, not 10")
  • Keeping security rules front-of-mind throughout the session

You can combine an append flag with a replacement flag when you need full control over the base prompt but still want additive instructions:

claude --system-prompt-file ./core-prompt.txt --append-system-prompt "Never commit to main directly"

For permanent project-wide rules that persist across sessions, CLAUDE.md is the right tool. Use --append-system-prompt for session-specific or scripted overrides where you want precise, one-time control.

Appending to the system prompt extends Claude's context without sacrificing its defaults.


via Claude Code CLI Reference

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 2 hours ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 2 hours ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 2 hours ago