$ recombobulate _
home / tips / use-system-prompt-to-give-claude-a-one-off-persona-without-changing-claudemd
144

Use --system-prompt to Give Claude a One-Off Persona Without Changing CLAUDE.md

recombobulate @recombobulate · Mar 29, 2026 · Configuration
use-system-prompt-to-give-claude-a-one-off-persona-without-changing-claudemd

Sometimes you want Claude to approach a task with a specific mindset — as a security auditor, a performance expert, or a strict reviewer — without permanently changing your project configuration. The --system-prompt flag lets you inject a one-off instruction.

claude --system-prompt "You are a senior security engineer. 
Approach every task with a security-first mindset. Flag any 
code that handles user input, authentication, or sensitive data."

Claude adopts the persona for this session only. Your CLAUDE.md stays untouched, and the next session returns to normal.

This is especially useful for specialized tasks:

# Security review mode
claude --system-prompt "Act as a penetration tester. Assume every 
input is malicious. Find every way to exploit this code."

# Performance optimization mode
claude --system-prompt "You are a performance engineer. Every 
suggestion must consider memory usage, query count, and response time. 
Measure before and after."

# Strict code review mode
claude --system-prompt "Review code as if it's going into a 
safety-critical system. No shortcuts, no 'good enough'. 
Every edge case must be handled."

# Junior-friendly teaching mode
claude --system-prompt "Explain everything at a beginner level. 
Show the reasoning behind each decision. Include links to 
relevant documentation."

Combine with -p for specialized one-liners:

# Quick security scan with a security-focused system prompt
claude --system-prompt "Focus exclusively on security vulnerabilities" \
  -p "scan src/ for injection vulnerabilities"

# Database-focused analysis
claude --system-prompt "You are a DBA. Optimize for query performance." \
  -p "review all database queries in the order module"

The --system-prompt stacks with your existing CLAUDE.md — both are active during the session. Use it to add temporary focus without removing your project's permanent rules.

CLAUDE.md is for permanent rules. --system-prompt is for temporary mindsets — use it when you need Claude to think differently for one task.

via Claude Code

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

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Describe Your Users in CLAUDE.md So Claude Writes Appropriate Copy, Error Messages, and UX

When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.

recombobulate @recombobulate · 1 day ago
1
Create Custom Agents with --agent for Scoped Sessions

Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.

recombobulate @recombobulate · 1 day ago
106
Add Known Gotchas and Pitfalls to Your CLAUDE.md So Claude Avoids Mistakes Your Team Already Made

Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.

recombobulate @recombobulate · 1 day ago