After the basics, you can customize and automate Claude Code to fit your workflow: output styles, status line, scheduled tasks, sandboxing, building plugins and much more.
22.1 Customization
Feature
How
What it does
Output styles
/config (output style)
Default, Explanatory (explains things), Learning (makes you write the code), or a custom style
Status line
/statusline or a statusLine command in settings
Info like model, branch, cost, context at the bottom
Keybindings
~/.claude/keybindings.json
Rebind shortcuts, chord bindings
Model aliases
/model or --model opus
opus, sonnet, haiku; opusplan (plan with Opus, do the work with Sonnet)
Fast mode
/fast
Opus with faster output
Effort
/model / settings
From low to max; xhigh is the default for coding
Theme / vim mode
/config
Terminal look, vim keys
22.2 Memory and history
Auto memory: Claude Code itself saves important facts (user preferences, feedback, project context) in the project memory directory and recalls them in the next session from the MEMORY.md index.
Checkpoints / /rewind : a snapshot of the code before every prompt; if it goes in the wrong direction, restore the code and/or the conversation.
/resume, claude -c : continue old sessions; session history is saved locally.
/compact and auto-compaction: a summary when the context fills up.
22.3 Automation and scheduling
Feature
What it does
/loop
Run a prompt or command repeatedly on an interval ("check the deploy every 5 min")
/schedule (routines)
Agents that run on a cron in the cloud, even when your laptop is off
Background tasks
Long commands (server, build) run in the background; Claude is notified when they finish
Monitor
Wait for a condition/log without polling
Headless (-p)
CI/CD, git hooks, scripts: claude -p "..." --output-format json
GitHub Actions / GitLab CI
PR review, issue to PR, @claude mentions
Hooks
Deterministic automation (Section 16)
22.4 Multi-agent: subagents and workflows
Feature
Detail
Built-in subagents
Explore (read-only fast code search), Plan (implementation plan), general-purpose
Custom subagents
`.claude/agents/*.md`: your own tools, model, prompt
Parallel agents
Several independent subagents run together in a single message
Workflows
Orchestrate dozens of agents from a script (pipelines like review → verify); only when the user explicitly asks
Git worktrees
Each agent in its own worktree, so no conflicts
Agent teams / messaging
Send messages to running agents, collect results
22.5 Security and sandboxing
Option
Detail
/sandbox
Run Bash commands in filesystem + network isolation; fewer permission prompts
--dangerously-skip-permissions
= bypassPermissions; only in a disposable container/VM
/permissions, deny rules
Block things like .env, secrets, rm -rf
Managed settings
Org admin policy that users cannot override
Prompt injection guard
Treat instructions in web/file content as data; approval for suspicious commands
/security-review
Security review of pending changes
22.6 Useful CLI flags and env vars
Terminal
claude--modelopus--permission-modeplan# set model + modeclaude-p"fix the tests"--allowedTools"Bash(npm test:*)"Edit--max-turns10claude--add-dir../shared-lib# access to an extra folderclaude--append-system-prompt"Always write in Hinglish"claudedoctor# installation health check# Env varsANTHROPIC_API_KEY=...# auth with an API key (instead of a subscription)CLAUDE_CODE_USE_BEDROCK=1# via Amazon BedrockCLAUDE_CODE_USE_VERTEX=1# via Google Vertex AI