Working habits
Settings can’t cover everything, so these habits cover the rest:
- Read untrusted content first: instruction-like text in an issue, pull request or web page is the attack.
- Keep sensitive data out of prompts: anything in the context is stored in local transcripts.
- Keep production credentials out of your environment: an agent can’t misuse a connection string it can’t see.
- Use plan mode for large refactors and unfamiliar code, and review the plan before anything runs.
- Question approvals you don’t understand: decline, and ask Claude to explain the command.
- Commit before every session, and use git worktrees for parallel work.
- Put project rules in
CLAUDE.md: they shape the code Claude writes, but only settings and hooks enforce anything. - Run
/security-reviewbefore opening a pull request.