$ recombobulate _
home / tips / speed-up-ci-scripts-with-bare-mode
132

Speed Up CI Scripts with --bare Mode

recombobulate @recombobulate · Mar 26, 2026 · Performance
speed-up-ci-scripts-with-bare-mode

Every time Claude Code starts a regular session, it scans for CLAUDE.md files, loads skills, discovers plugins, connects to MCP servers, and applies hooks. For scripted tasks in CI, all of that startup work is unnecessary overhead. The --bare flag skips it entirely.

# Fast, minimal invocation for a CI check
claude --bare -p "Review this diff for obvious bugs" < diff.txt

# Works great in lightweight automation
echo "Summarise recent commits" | claude --bare -p

In bare mode, Claude only has access to Bash, file read, and file edit tools. There are no MCP servers, no hooks, no CLAUDE.md context, and no auto-memory. It also sets the CLAUDE_CODE_SIMPLE environment variable so scripts can detect that they are running in bare mode.

This is ideal for:

  • GitHub Actions steps where startup latency matters
  • Cron jobs running simple, well-defined tasks
  • Testing prompts in isolation without any project context bleeding in

Because bare mode ignores your CLAUDE.md and configured rules, make sure your prompt is self-contained and includes everything Claude needs to complete the task. There is no fallback context from previous sessions or project files.

Combine with --max-turns and --output-format json for a fully controlled, fast CI step:

claude --bare -p --max-turns 3 --output-format json "Check this function for null pointer issues"

When you need Claude Code fast and without side effects, --bare is the flag to reach for.


via Claude Code CLI Reference

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

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
116
Use /clear to Start Fresh When Your Session Context Gets Confused or Stale

When Claude starts referencing files you've since deleted, remembering old code you've already changed, or getting confused by contradictory instructions from a long session — type /clear to wipe the slate clean. Unlike /compact which preserves context, /clear gives you a true fresh start without restarting the CLI.

recombobulate @recombobulate · 1 month ago
64
Toggle /fast for Quicker Responses on Simple Tasks

Not every task needs deep reasoning. Type /fast to switch Claude Code into fast mode — same model, faster output — for quick edits, simple questions, and routine changes. Toggle it off when you need Claude to think harder on complex problems.

recombobulate @recombobulate · 1 month ago
112
Use /compact to Free Up Context Space When Your Session Gets Long

Long sessions eat through your context window as conversation history piles up. Type /compact to summarize the conversation so far and reclaim space — keeping Claude's understanding of what you're working on while freeing up room for more work.

recombobulate @recombobulate · 1 month ago